[postgis-users] raster efficiency

Denis Rouzaud denis.rouzaud at gmail.com
Sun Apr 1 22:12:13 PDT 2012

Hi Pierre,

Thanks for your answer.

To compute profile, here is what I do:
Input is a linestring
Initializes raster ID to NULL
I segmentize to the desired length
Force 3D
For all points do:
     Get point in 2d
     If point does not intersect with current raster ID:
         get new raster ID
     Get altitude with ST_Value
     Set current point with 3rd coordinates

Here is the full SQL if you want 
I noticed that searching for the correct raster took time, so that's why 
I keep current raster ID. And having bit tiles, the probability to stay 
on the same raster is quite high.

Also my 14 tiles are 6x9km at 2m, so this is about 3000x4500.

Do you suggest to cut them before with gdal and have something like 1000 
small tiles rather than my 14 big ones?



On 03/30/2012 03:47 PM, Pierre Racine wrote:
>> I found quite to calculate a profile: it takes approx 1-2 secondes to calculate a
>> profile of 4-6 points.
>> Is there any thing that I can do to fasten the process?
> How do you compute your profile?
>> What is the best strategy: having more small rasters or a single big one?
> For raster/vector operations, smaller raster tiles (10x10) is generally preferable/faster.
> Pierre
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120402/a5d1edbb/attachment.html>

More information about the postgis-users mailing list