AW: [Gdal-dev] ERROR import Shape to PostgreSQL
Frank Warmerdam
warmerdam at pobox.com
Fri Jan 16 17:48:00 EST 2004
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
More information about the Gdal-dev
mailing list