[postgis-users] Postgis Raster Performance

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Fri Oct 15 07:00:44 PDT 2010


> I'm trying to use postgis raster analysis and I think that it's incredibly slow. I
> wonder if there is a better raster organization for analysis.
> I've tryed both tiled raster and single row raster and tiled raster was a little bit
> faster when calling intersection.

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?

> I don't really understand the results of the intersection. I expected that the
> command would give me a linestring with one coordinate more than the
> linestring I gave. But instead it gives me many pieces of linestring. IMHO it's not
> a very usefull result. I'd have to join them to get the profile.

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.

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?

Also did you read the tutorial? http://trac.osgeo.org/postgis/wiki/WKTRasterTutorial01

In opposition to Jorge answer I must say that the gdal driver is not involved when doing raster/vector intersections in PostGIS.

Pierre





More information about the postgis-users mailing list