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

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Mon Mar 14 08:20:01 PDT 2011


The version you got from kyngchaos is stating to be a bit old. Since this time WKT Raster was integrated into PostGIS and gdal2wktraster.py was renamed raster2pgsql.py.

Considering the version you have gdal2wktraster.py is the right script to import raster in PostGIS.

You should not use -k 1x1 to import your raster. This would produce one row per pixel. Normally you want to tile your raster coverage to a certain tile size if it is big enough.

What is the size of your image? How many images do you have? What kind of operations do you want to do with it in the database? This will dictate if you should use the -k option and which tile size to use.

Pierre

>-----Original Message-----
>From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
>bounces at postgis.refractions.net] On Behalf Of AJ7
>Sent: 14 mars 2011 11:05
>To: postgis-users at postgis.refractions.net
>Subject: [postgis-users] raster2pgsql vs gdal2wktraster ...can someone clarify?
>
>
>Hi
>Can someone please clarify as to which script should be used to convert a
>raster tif to a postgis raster table?
>
>I have only got the gdal2wktraster script (I am on snow leopard, with
>postgres 9).
>
>Also, if I have got a raster image with each pixel representing a value,
>what is the command to export this to a postgis raster table? would this
>work (emphasis on the 1x1)?
>-> gdal2wktraster.py -r yourimage.tif -t [data_table]  -s 4326 -k 1x1 -I
>script.sql
>
>thanks
>--
>View this message in context: http://old.nabble.com/raster2pgsql-vs-gdal2wktraster-...can-someone-
>clarify--tp31145027p31145027.html
>Sent from the PostGIS - User mailing list archive at Nabble.com.
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list