[postgis-users] How to import/export PostGIS Raster data? Tools?

Stefan Keller sfkeller at gmail.com
Thu Nov 25 11:39:59 PST 2010


> Eventually GDAL will have both import and export functionality.  Right now
> it just has just export functionality. Jorge Arevalo can talk more about...

Thanks a lot to Regina and Jorge! So let me summarize:

A. For importing raster data to PostGIS there's gdal2wktraster.py (now
renamed to raster2pgsql.py). raster2pgsql takes any GDAL supported
raster format as input and writes an SQL text file in PostGIS Raster
WKT syntax - similar how shp2pgsql functions for vector formats.
Inside raster2pgsql, GDAL functions are called to read/import "any"
raster format, and the Python code writes PostGIS Raster WKT(!) SQL.

=> So in fact, gdal2wktraster.py/raster2pgsql.py does not necessary
need an installed "GDAL PostGIS Raster driver"?

In later versions of GDAL (> 1.7) there is a direct PostGIS Raster
writer/export for GDAL where a Postgres DB (WKB!) is the target
"format".


B. For exporting PostGIS raster data to any other raster format, one
can already use gdal_translate, gdal_warp etc. commandline tools
(which requires an installed "GDAL PostGIS Raster driver" i.e. a
reader). And since many other API tools/projects built on top of GDAL,
these are already capable of using PostGIS raster data (WKB stream) as
input source - given their GDAL library is compiled with PostGIS
Raster support.

In the near future, there are plane to also have 1. a raster2pgsql
(excutable) for direct import into a PostGIS DB and 2. a pgsql2raster
(executable) for direct export out of a PostGIS DB (without Python
dependency). => But in both cases I'm not sure what the advantage and
what the difference of this is compared to a direct call to GDAL tools
(>1.7), since in PostGIS 2.x, GDAL will be delivered anyway in the
PostGIS package?

Yours, S.

2010/11/25 Paragon Corporation <lr at pcorp.us>:
> Jorge,
>> I'd like to take a deeper look on the chapter. My last version is from
> 11/8/2010. Is it the last one?
>
> We have a slightly newer one but not too different from the version you
> have.  Jan Hartmann made some suggestions we still need to integrate and
> then we'll send your way.
>
> Thanks,
> Regina and Leo
>
>>
>> Thanks,
>> Regina and Leo
>> http://www.postgis.us
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>
> Best regards,
>
> --
> Jorge Arévalo
> Internet & Mobilty Division, DEIMOS
> jorge.arevalo at deimos-space.com
> http://mobility.grupodeimos.com/
> http://gis4free.wordpress.com
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
> _______________________________________________
> 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