TransWikia.com

Loading raster in PostGIS

Geographic Information Systems Asked by Pratichhya on December 14, 2020

I am trying to load raster in PostGIS from my Windows cmd using:

C:Program FilesPostgreSQL9.6bin>raster2pgsql.exe -s 4326 -I -C -M "D:9.Tajidata1_Admin Boundary-20200211T030329Z-001checkrasterroad_raster.tif" -F -T 100x100 public.road  | psql -d postgres -U postgres -p 5432

But every time I run I get this error:

BEGIN ERROR: tablespace “100×100” does not exist ERROR: current
transaction is aborted, commands ignored until end of transaction
block ERROR: current transaction is aborted, commands ignored until
end of transaction block ERROR: current transaction is aborted,
commands ignored until end of transaction block ERROR: current
transaction is aborted, commands ignored until end of transaction
block ROLLBACK ERROR: relation “public.road” does not exist

How can I fix this issue?

One Answer

Read again the documentation https://postgis.net/docs/using_raster_dataman.html, especially at these points:

-T tablespace

Specify the tablespace for the new table. Note that indices (including the primary key) will still use the default tablespace unless the -X flag is also used.

-t TILE_SIZE

Cut raster into tiles to be inserted one per table row. TILE_SIZE is expressed as WIDTHxHEIGHT or set to the value "auto" to allow the loader to compute an appropriate tile size using the first raster and applied to all rasters.

Answered by user30184 on December 14, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP