<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Pierre,<br>
<br>
Thanks for your answer.<br>
<br>
To compute profile, here is what I do:<br>
Input is a linestring<br>
Initializes raster ID to NULL<br>
I segmentize to the desired length<br>
Force 3D<br>
For all points do:<br>
Get point in 2d<br>
If point does not intersect with current raster ID:<br>
get new raster ID<br>
Get altitude with ST_Value<br>
Set current point with 3rd coordinates<br>
ST_3Dlength<br>
<br>
Here is the full SQL if you want
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a
href="https://github.com/3nids/qWat/blob/0b1ced3781e135d5eb03f5172610fd8889c7ae36/sql/3d.sql">https://github.com/3nids/qWat/blob/0b1ced3781e135d5eb03f5172610fd8889c7ae36/sql/3d.sql</a><br>
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.<br>
<br>
Also my 14 tiles are 6x9km at 2m, so this is about 3000x4500. <br>
<br>
Do you suggest to cut them before with gdal and have something like
1000 small tiles rather than my 14 big ones?<br>
<br>
Thanks<br>
<br>
Denis<br>
<br>
<br>
<br>
On 03/30/2012 03:47 PM, Pierre Racine wrote:
<blockquote
cite="mid:87A96661E65C5541AB4D20721C2DD7F8CFBB0CED93@EXCH-MBX-A.ulaval.ca"
type="cite">
<blockquote type="cite">
<pre wrap="">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?
</pre>
</blockquote>
<pre wrap="">
How do you compute your profile?
</pre>
<blockquote type="cite">
<pre wrap="">What is the best strategy: having more small rasters or a single big one?
</pre>
</blockquote>
<pre wrap="">
For raster/vector operations, smaller raster tiles (10x10) is generally preferable/faster.
Pierre
_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</pre>
</blockquote>
</body>
</html>