Re: Storing data on a regular lat/lon grid - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Storing data on a regular lat/lon grid
Date
Msg-id b42b73151003261232i2b11cc5brd55b1ee26f11cded@mail.gmail.com
Whole thread Raw
In response to Storing data on a regular lat/lon grid  (Mike Charles <gamemusicmaker@gmail.com>)
Responses Re: Storing data on a regular lat/lon grid
List pgsql-general
On Fri, Mar 26, 2010 at 3:25 PM, Mike Charles <gamemusicmaker@gmail.com> wrote:
> Hi all,
>
> I have temperature data that has been interpolated to a regular lat/lon
> grid. I have one grid per day.
>
> I want to be able to select points within a certain region, and within a
> certain time period.
>
> Now, I could store each grid point as a separate record (a new row for every
> single point/time, with columns lat, lon, time, temperature), but since my
> grid is constant, there's a lot of redundancy there, no? Disk space is
> somewhat of a constraint, since there are a lot of files.
>
> Basically, has anyone done any work with storing gridded spatial data? I see
> lot's of info on Geospatial data, but it's usually cities, stations, etc.,
> not a regular grid that doesn't change...

well, you could play around with storing information in arrays.
storing record for each point gives you the most flexibility of
querying and indexing but is extremely inefficient from storage
perspective.   arrays are better from that point of view and can work
pretty well as long as you read/write the data in blocks in a fairly
regular way (and hopefully the layout of your grid doesn't change that
often).

merlin

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Solid State Drives with PG
Next
From: Brad Nicholson
Date:
Subject: Re: Solid State Drives with PG