[Gdal-dev] OGR, SHP, and multi-polygons

Frank Warmerdam warmerdam at pobox.com
Fri Feb 6 00:59:56 EST 2004


Ben Discoe wrote:
>>From: Frank Warmerdam
>>
>>Patches were introduced in the fall some
>>time to try and classify rings properly and form correct 
>>multi-polygons when reading from Shapefiles.
>>This did not exist in GDAL 1.1.9 so you will need
>>a nightly snapshot.
> 
> 
> OK, does that mean it now does the following?
>  1. For each polygon 'part', tests the winding order to determine if it's
> external or internal
>  2. If more than one external part is found, a OGRMultiPolygon is created,
> otherwise a OGRPolygon.

Ben,

The above is correct.

>  3. As it can't know in advance, the layer reports geometry type as
> "Polygon", even if there might be MultiPolygons inside.

I see it still reports the layer as type Polygon when they should likely be
Geometry since they may have polygons or multipolygons.  This is technically
a bug.

> Some related questions:
>   Is 'wkbPoint25D' the OGR equivalent of SHPT_POINTZ, or does OGR just use
> wkbPoint with 3 coordinates instead of 2?

wkbPoint25D is the equivelent of SHPT_POINTZ.  Note that interlally there is
only one OGRPoint class.  It returns a wkbPoint25D type if the z is non-zero
otherwise it returns wkbPoint as the type.

>   Is there another GDAL release planned?  My 1.1.9 is dated 2003-06-27, 7
> months ago.

It is my intention to produce a 1.2.0 at some point in the near future; however,
I have mostly just been directing people to the nightly snapshots for most
purposes.  The 1.2.0 release will move to use of libtool by default.

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