1

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

C:\Program Files\PostgreSQL\9.6\bin>raster2pgsql.exe -s 4326 -I -C -M "D:\9.Taji\data\1_Admin Boundary-20200211T030329Z-001\check\raster\road_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 "100x100" 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?

1
  • Loading user data with the postgres login is an opportunity to damage your database instance. You should always create lesser privileged logins to create and manage user data.
    – Vince
    Feb 27 '20 at 12:35
2

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.

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.