[postgis-devel] raster2pgsql associate error

David Haynes II dahaynes at umn.edu
Wed Sep 10 06:46:21 PDT 2014


Hello,

I am having a problem placing a raster into postgresql. The raster is a 12
band raster approximately 40gig.

The following command is runs successfully:
raster2pgsql -C -x -I -Y -F -s 6842 -t 250x250 modis_igbp_stack.tif
gis_rasters.modis_IGBP_2012 | gzip -9 > modis_IGBP_2012.sql.gz

However, we have an error when trying to copy the raster into pgsql
zcat modis_IGBP_2012.sql.gz | sed -e '/^BEGIN/ d' -e '/^CREATE TABLE/ d' -e
'/^COPY/ d' -e '/^\\\./ d' -e '/^END/ d' | gzip -2 > copy/MODIS_IGBP.copy.gz

This is the error that we receive
+  Loading file modis_igbp for MODIS: Exception in thread "RubyThread-5:
/scratch/terrapop-v1/terrapop-staging2/periwinkle/lib/tasks/terrapop_gis_raster.rake:38"
org.postgresql.util.PSQLException: ERROR: rt_raster_from_hexwkb: Raster
HEXWKB input must have an even number of characters
  Where: COPY modis_igbp, line 59859, column rast: "CREATE INDEX
"modis_igbp_2012_rast_gist" ON "gis_rasters"."modis_igbp_2012" USING gist
(st_convexhul..."

-- 
David Haynes, Ph.D.
Research Associate Terra Populous
Minnesota Population Center
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20140910/f49e3c55/attachment.html>


More information about the postgis-devel mailing list