[postgis-users] raster2pgsql vs gdal2wktraster ...can someone clarify?

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Mon Mar 14 08:38:36 PDT 2011


>So would you advise me to get postgis from the trunk, and compile the
>source, or its fine to work with the version from kyngchaos for now?

Depends if what you want to do is included or/and working fine in this version. The last version is always better.

>In terms of the image - well the image pixels all have a certain value
>associated to them (its a probability map actually, so all the values per
>pixel are between 0->1.

Every images have values associated with their pixels. When its not just RGB values, it's other values.

I want to intersect a polygon (region) with this
>image raster and pull out the mean probability depending on which pixels
>were covered. The image is 3.5mb

This is a pretty small image. You would probably not gain much tiling it but you can give it a try. In the first case do not add the -k option and in the second case add -k 25x25.

>If I don't import -k 1x1, then what is the best way to proceed? That's how
>the image has been produced for me to work with - there is only 1 image.

You must understand what -k is actually doing. It will cut your raster into XxX tiles, one tile per row. This fasten most operation on big raster coverages which is not really your case. "1x1" is not a way to say you have only one raster...

Be carefull here as PostGIS raster was not really intented to do this kind of operation on so small images. It's like using a bazooka to kill a fly. Many GIS packages will allow you to do this simple operation much easier than PostGIS...

Why do you feel the need to use PostGIS for that?

Pierre




More information about the postgis-users mailing list