[gdal-dev] gdal_translate and PostGIS

Even Rouault even.rouault at spatialys.com
Fri Apr 3 02:37:30 PDT 2015


Le vendredi 03 avril 2015 11:31:09, Martin Landa a écrit :
> Hi,
> 
> is it possible to import raster data into PostGIS using gdal_translate?
> 
> $ gdal_translate -of PostGISRaster dmt.tif PG:dbname=pokusnik
> Input file size is 19615, 11119
> 
> fails with
> 
> ERROR 6: PostGISRasterDataset::CreateCopy() only works on source
> datasets that are PostGISRaster

Martin,

As the error message suggests, no, not at the time with the PostGISRaster 
driver which basically only supports creation of a new raster through 
duplicatin an existing postgisraster table thanks to SQL copy mechanisms.

You have to use raster2pgsql provided with PostGIS for what you want to do.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list