[geos-devel] Re: (not) Empty geometry (Jo)
mateusz at loskot.net
Sun Aug 2 18:12:56 EDT 2009
> The attach was only the wkt definition of the polygon...
> Things are gettin a bit clearer now: the polygon is also valid and
> empty on OGR (so I guess no prob in importing it to geos).
> I think is outside the scope of this mailing list to tell how Im
> importing it into OGR, but I ll do it anyway :-)
> while( (poFeature = poLayer->GetNextFeature()) != NULL )
> OGRGeometry *poGeometry;
> poGeometry = poFeature->GetGeometryRef();
> if( poGeometry != NULL && wkbFlatten(poGeometry->getGeometryType())
> == wkbPolygon )
> OGRPolygon *poPolygon = (OGRPolygon*) poGeometry;
What does this return?
> Inside DoStuffWithGEOS(), I export it to text and import it (from
> text) to Geos.
You don't need to go through text export/import.
Just dump OGR geometry as GEOS geometry using
And check if GEOS geomtetry is OK now.
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
More information about the geos-devel