AW: [Gdal-dev] ERROR import Shape to PostgreSQL

Düster Horst Horst.Duester at bd.so.ch
Mon Jan 19 06:29:02 EST 2004


Frank

I found out that the -lco OVERWRITE=YES support in the postgis driver don't
delete an existing record in geometry_columns. 

The error message:
ERROR 1: AddGeometryColumn failed for layer kva_av_liegen_tmp, layer
creation has failed.
ERROR 1: Terminating translation prematurely after failed
translation of layer lieg_lieg_geom

When I delete the record ogr2ogr works fine.

Best regards
 
Dr. Horst Düster 
GIS-Koordinator
 
Amt für Geoinformation
Abteilung SO!GIS Koordination
Werkhofstr. 65
4509 Solothurn 

Tel.: 032 627 25 32 
Fax: 032 627 22 14

horst.duester at bd.so.ch <mailto:horst.duester at bd.so.ch> 
www.sogis.so.ch <http://www.sogis.so.ch/> 



-----Ursprüngliche Nachricht-----
Von: Frank Warmerdam [mailto:warmerdam at pobox.com]
Gesendet am: Freitag, 16. Januar 2004 23:48
An: gdal-dev at remotesensing.org
Betreff: Re: AW: [Gdal-dev] ERROR import Shape to PostgreSQL

Düster Horst wrote:
> Frank
> 
> I got an idea and take a look at the shapes I sent to you with the JUMP QA
> Basic Topology Analysis. The polygon where the mentioned ogr2ogr process
> breaks is a self intersecting polygon. I seems that ogr2ogr 1.1.7.2 works
> fine with this self intersecting features and the latest ogr2ogr not.

Dr. Düster,

I have committed changes to gdal/ogr/ogrsf_frmts/shape/shape2ogr.cpp that
correct the problem.  It seems that based on the ring direction both rings
of the offending feature were identified as inner, and without an outer
polygon to attach them to they were discarded.  I have modified the code so
that any inner rings that are not successfully associated with a containing
outer ring are promoted to being outer rings.

I am still concerned that the new polygon/multipolygon code actually trusts
the ring directions for initial assumptions about inner/outer status.  I
don't
think this is wise since Shapelib (amoung other applications) has been
generating shapefiles for some time without setting winding direction
properly.
However, this shouldn't affect your data.

I also added support for the various EMPTY WKT geometry types.

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


_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev



More information about the Gdal-dev mailing list