Hi Mauricio,<br><br>You're right, it sometimes can be quite slow to perform operations in postgis. However, your question is kind of hard to answer as there is rarely magic involved, there isn't one operation you must do to improve speed. Maybe as Pierre suggested you could post your explain query so we know a bit more about your operations. (You could explain your line intersection as well, with the result you expected.) I've worked at finding a good configuration for my specific operations, but it varies for another operation and furthermore from an hardware to another.<br>
<br>As you said, having the latest SVN might help to improve speed. <br><br>Etienne<br><br><div class="gmail_quote">2011/7/15 Pierre Racine <span dir="ltr"><<a href="mailto:Pierre.Racine@sbf.ulaval.ca">Pierre.Racine@sbf.ulaval.ca</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">> I'm trying to use postgis raster analysis and I think that it's incredibly slow. I<br>
> wonder if there is a better raster organization for analysis.<br>
> I've tryed both tiled raster and single row raster and tiled raster was a little bit<br>
> faster when calling intersection.<br>
<br>
</div>Could you give me a bit more information: What are you intersecting with what? Point, lines, polygons? (lines I guess) How many? How is your raster tiled? How big is it? Did you make sure the right index is used with an EXPLAIN?<br>

<div class="im"><br>
> I don't really understand the results of the intersection. I expected that the<br>
> command would give me a linestring with one coordinate more than the<br>
> linestring I gave. But instead it gives me many pieces of linestring. IMHO it's not<br>
> a very usefull result. I'd have to join them to get the profile.<br>
<br>
</div>What do you expect this information/coordinate to be? The id of the intersecting raster? The mean of the intersecting pixel values? The pixel value for each piece of intersecting line? There is a different query for each and performance is different for each.<br>

<br>
Here I get people intersecting 100 000 lines with a 300 MB landsat image in 8 minutes and another intersecting 500 000 lidar points in 160 seconds. Do you consider this slow?<br>
<br>
Also did you read the tutorial? <a href="http://trac.osgeo.org/postgis/wiki/WKTRasterTutorial01" target="_blank">http://trac.osgeo.org/postgis/wiki/WKTRasterTutorial01</a><br>
<br>
In opposition to Jorge answer I must say that the gdal driver is not involved when doing raster/vector intersections in PostGIS.<br>
<font color="#888888"><br>
Pierre<br>
</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br>