2

I cannot upload into PostGIS a raster with the following code:

raster2pgsql -s 4326 -I -C -M "C:\lyr\gebco.img" -F public.gebco ¦ psql -d test -U postgres -W

It says ERROR: Unable to read raster file: public.gebco

Is it because of the sentence, or because of the configuration at my database? I don't know what to change.

  • Is your ERROR a one-liner? If not, please post the whole error message. – Stefan Feb 12 '14 at 13:11
5

Try it with the specification of your address (localhost).

raster2pgsql -s 4326 -I -C -M "C:\lyr\gebco.img" -F public.gebco | psql -h localhost -d test -U postgres

In addition to the address (localhost) you can specify the port as well: e.g. -p 5432

When your image is big you can tile it with -t 100x100. One tile represents 100x100 pixel. Tiling of very large rasters is recommended. This link provides some useful information.

See also information for batch loading here and here.

| improve this answer | |
  • Yes, It worked now by adding the localhost expression as you suggested. Cheers. – Web-GIS entrepreneur Feb 12 '14 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.