[Gdal-dev] ogr2ogr shapefile to postgis error

Frank Warmerdam warmerdam at pobox.com
Wed Sep 29 09:14:27 EDT 2004


Michael Mallete wrote:
> good day everyone!
> 
> i am encountering some problems converting shapefiles to postgis using
> ogr2ogr. upon execution, i get this error:
> 
> ERROR 1: INSERT command for new feature failed.
> ERROR: new row for relation "<table name here>" violates check
> constraint "enforce_geotype_wkb_geometry"
> 
> ERROR 1: Terminating translation prematurely after failed translation
> of layer <table name here>
> 
> hope you could help. thanx in advance. have a nice day everyone! :)

Myk,

Is this a new table being created by ogr2ogr?  I have never encountered
this error before.

You might want to set the CPL_DEBUG environment variable to a value of ON
and then rerun.  You will get quite a bit more information about what is
going on internally then.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list