[gdal-dev] ogr2ogr midmif to tab format conversion

Frank Warmerdam warmerdam at pobox.com
Fri Apr 29 10:59:21 EDT 2011


On 11-04-29 10:27 AM, Zoltan Szecsei wrote:
> Spot on, Frank - thank you. (it works as desired, now).
> I'm not sure if anything is mentioned in the overview docs or help area, but
> perhaps that comment regarding assumed precision could be added somewhere
> obvious even to skip-readers like me?
> [just to save you having to repeat yourself too often :-) ]

Zoltan,

The issue is discussed in the user docs for the MapInfo driver.
The problem is TAB format specific so it doesn't belong anywhere
more general IMHO.

> BTW - any idea why the organizePolygons() routine bellows?
> Does it suggest an open polygon in my data-set, which then maybe engulfs the
> other polygons?
> Presumably 3-point polygons are classified as errors because the first and last
> points are counted as "2" ?
>
> Is there a way to get a coordinate or some debugging info to assist in finding
> the offending geometries?
...
> ******************** Starting LCLU_LANDCOVER.mif
> Warning 1: organizePolygons() received an unexpected geometry.
> Either a polygon with interior rings, or a polygon with less than 4 points,
> or a non-Polygon geometry. Return arguments as a collection.
> Warning 1: Geometry of polygon cannot be translated to Simple Geometry. All
> polygons will be contained in a multipolygon.
>
> Warning 1: organizePolygons() received an unexpected geometry.
> Either a polygon with interior rings, or a polygon with less than 4 points,
> or a non-Polygon geometry. Return arguments as a collection.
> Warning 1: Geometry of polygon cannot be translated to Simple Geometry. All
> polygons will be contained in a multipolygon.
>

It is not immediately obvious why there are problems.  If the files are
small you might inspect the geometries with ogrinfo to see if there are
some odd ones.  Adding "--debug on" to the commandline of ogr2ogr may
give some useful details on the translation failure.

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