How to add raster.d...
 
Avisos
Vaciar todo

How to add raster.dem


(@gkirui)
New Member
Registrado: hace 1 año
Respuestas: 4
Topic starter  

Hi I am having trouble loading raster with raster2pgsql to new project.  Below is the error

 

raster2pgsql -s 25831 -I -M -C -t 30x30 dem.tif -P -a gw.ext_raster_dem | psql -U postgres -d gw -h localhost -p 5432
Processing 1/1: dem.tif
Password for user postgres:
BEGIN
ERROR: null value in column "id" of relation "ext_cat_raster" violates not-null constraint
DETAIL: Failing row contains (null, null, null, DEM, null, null, null, null, 2024-02-23 04:21:33.537252, postgres).
CONTEXT: SQL statement "INSERT INTO ext_cat_raster (id, raster_type, tstamp, insert_user) VALUES (NEW.rastercat_id, 'DEM', now(), current_user)
ON CONFLICT (id) DO NOTHING"
PL/pgSQL function gw.gw_trg_manage_raster_dem() line 13 at SQL statement
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


Citar
Etiquetas del debate
 csar
(@csar)
Active Member
Registrado: hace 5 años
Respuestas: 7
 

Hello, @gkirui!

Please check the following link of Github: https://github.com/Giswater/docs/blob/master/admin/P27_manage_raster/es/ejemplo_insertar_raster.pdf

You should be able to solve the error with it. 

Esta publicación ha sido modificada el hace 10 meses por bgeoadmin

ResponderCitar
Compartir: