Re: Storing data on a regular lat/lon grid

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Mike Charles <gamemusicmaker(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Storing data on a regular lat/lon grid
Date: 2010-03-26 19:32:32
Message-ID: b42b73151003261232i2b11cc5brd55b1ee26f11cded@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Mar 26, 2010 at 3:25 PM, Mike Charles <gamemusicmaker(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brad Nicholson 2010-03-26 19:43:02 Re: Solid State Drives with PG
Previous Message Merlin Moncure 2010-03-26 19:27:25 Re: Solid State Drives with PG