[postgis-users] PostGIS Raster efficient enough to get height given coords from a large DEM?

Stefan Keller sfkeller at gmail.com
Fri Dec 2 11:17:55 PST 2011


Hi Bborie

2011/12/2 Bborie Park wrote:
> The question of tile size comes because the serialized raster data is
> stored in TOAST, which may compress the data.

Good point.

I know that a heap table is 8kb (unless changed in postgresql.conf)
and I assume that one wants to avoid that tuples have to use TOAST.
Are there any rules of thumb on how to estimate the tile size (in bytes)?

Yours, Stefan


2011/12/2 Bborie Park <bkpark at ucdavis.edu>:
> On Fri, Dec 2, 2011 at 8:15 AM, Stefan Keller <sfkeller at gmail.com> wrote:
>> In a server side program I'd like to get the height given a 2D lat/lon
>> coordinate.
>>
>> The area covered is smaller than Europe with a resolution of at least
>> 25m. We'll take ASTER or SRTM as DEM/DTM data.
>>
>> I know there are webservices like geonames' Elevation API (e.g.
>> http://api.geonames.org/astergdem?lat=50.01&lng=10.2&username=demo ).
>> But I'd like to know if this is feasible using PostgreSQL.
>>
>> Is PostGIS Raster efficient enough to process and query such an amount of data?
>> Any experiences?
>>
>
> Stefan,
>
> Assuming you test to see what the ideal (or "good-enough") tile size
> is for the elevation rasterset, you should see good performance using
>
> ST_Value(rast, ST_SetSRID(ST_MakePoint(long, lat), srid))
>
> You could eliminate the ST_SetSRID and ST_MakePoint by passing a
> correct EWKT instead
>
> ST_Value(rast, 'YOUREWKT'::geometry)
>
> The question of tile size comes because the serialized raster data is
> stored in TOAST, which may compress the data.
>
> -bborie
> --
> Bborie Park
> Programmer
> Center for Vectorborne Diseases
> UC Davis
> 530-752-8380
> bkpark at ucdavis.edu
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list