[Gdal-dev] OGC Spec getExteriorRing() for a Polygon

Chapman, Martin MChapman at sanz.com
Tue Jul 20 16:40:46 EDT 2004


Frank,
 
The OGC Spec says that the Polygon method getExteriorRing() should
return a LineString.  Just out of curiosity, why do you return a
LinearRing from your implementation OGRPolygon::getExteriorRing()?  It
would make sense to me that the spec is wrong and what you want is
always a ring.  Do you think the OGC spec is wrong.  The following is
from the spec:
 
OpenGIS Simple Features Specification for SQL, Revision1.1

2.1.10.1 Methods

ExteriorRing( ):LineString-Returns the exterior ring of this Polygon.

NumInteriorRing( ):Integer-Returns the number of interior rings in this
Polygon.

InteriorRingN(N:Integer):LineString-Returns the Nth interior ring for
this Polygon as a LineString.

 

OGR is:

OGRLinearRing *getExteriorRing();
00553     const OGRLinearRing *getExteriorRing() const;
00554     int         getNumInteriorRings() const;
00555     OGRLinearRing *getInteriorRing( int );
00556     const OGRLinearRing *getInteriorRing( int ) const;
 

Thanks,

Martin Chapman
Cell 303-885-1936
Office 303-495-6300 x326
mchapman at sanz.com
http://www.sanz.com <http://www.sanz.com/> 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20040720/2adc84bb/attachment.html


More information about the Gdal-dev mailing list