[postgis-users] Retrieving Data from PostGIS Rasterusing ST_Value
Paragon Corporation
lr at pcorp.us
Wed Oct 12 14:41:05 PDT 2011
Guys -- I'd like to point out that the issue with ST_value performance I
think is the same issue we have with ST_GeometryN and ST_PointN.
That being the memory copy. For each ST_Value call the whole raster tile
needs to be copied into memory. Paul can correct me if I am mistaken, but
tht is how he explained the issue to me. This I consider a very fundamental
limitation / problem with the plpgsql / PostGIS C whatever interface which
causes a lot of wasted time since some things are just faster programming
wise to implement in plgsql than in C and its esier to take advantage of
PostgreSQL SQL power in plpgsql /sql than it is in C.
This is BTW why plpgsql for this kind of task is really slow. C doesn't
have the same issue if you are doing the steps in one call since its dealing
with the same pointer.
Thanks,
Regina
http://www.postgis.us
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On
> Behalf Of Nordgren, Bryce
> Sent: Wednesday, October 12, 2011 4:02 PM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Retrieving Data from PostGIS
> Rasterusing ST_Value
>
> 1.44 million pixel accesses does not sound like something
> that should take 1/2 hour.
>
> For better or worse, raster depends on Postgresql's
> underlying caching mechanism to make data I/O efficient; and
> the unit of caching is one "raster tile". If I read the SRTM3
> data description correctly, each pixel is a 16 bit int,
> making for a 2.88 Mb "raster tile" (if you loaded it all into
> one row.) I'm a little out of my depth here, but your tile
> may be too big for postgresql to cache. Does performance
> improve if you load the SRTM data into many raster tiles?
>
> Bryce
>
>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On
> Behalf Of elliott
> Sent: Wednesday, October 12, 2011 8:28 PM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Retrieving Data from PostGIS
> Raster using ST_Value
>
> It is just one SRTM3 tile which is 1201 x 1201. The data is
> used by scientific codes to determine the elevation at a
> given latitude and longitude.
>
> _______________________________________________
> 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