[gdal-dev] Use Ogr Geometry childs classes in C#.

Benjamin benjamin.lux at maxsea.fr
Thu Jul 26 05:59:56 PDT 2012


Thank for the answer.

Sorry for spam you but another question,

A call to  Geometry.SimplifyPreserveTopology() and Geometry.Simplify() on a
geometry multi-object - as GeometryCollection, MultiPolygon or
MultiLigneString - is just a recursive call on each object ?

Also I read : "This function is built on the GEOS library, check it for the
definition of the geometry operation."
But in the Geos webs pages, I didn't find the PreserveTopology version.
http://geos.osgeo.org/doxygen/functions_0x73.html#index_s

Best regards,
Benjamin.



Even Rouault wrote
> 
> Selon Benjamin <benjamin.lux@>:
> 
>> Hi,
>>
>> I code in C# with Ogr wrapers - gdal_csharp.dll, gdalconst_csharp.dll,
>> ogr_csharp.dll and osr_csharp.dll -
>> "release-1600-x64-gdal-1-9-0-mapserver-6-0-1".
>>
>> I want use specifics polygon methods on my geometry as "OGRLinearRing *
>> OGRPolygon::getInteriorRing ( int iRing )".
>> (see
>>
> http://www.gdal.org/ogr/classOGRPolygon.html#af0bf0b1d1104e142b47637659518ad9c)
>>
>> But it seems that the Polygon classe doesn't exist with the C# wraper.
>> There is a enum wkbGeometryType but not the class.
> 
> Indeed, at the bindings level, only a Geometry class exists. It has a
> GetGeometryRef(int) method that, for polygons, is such that :
> 
> - GetGeometryRef(0) returns the exterior ring
> - GetGeometryRef(n) with n>=1 return what OGRPolygon::getInteriorRing(n-1)
> would
> return
> 
> For multi-geometries, such as multipolygon, multilinestring, multipoint or
> geometrycollection, GetGeometryRef(n) returns the n(th) (starting from 0)
> sub-geometry in the multi-geometry.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at .osgeo
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
> 




--
View this message in context: http://osgeo-org.1560.n6.nabble.com/gdal-dev-Use-Ogr-Geometry-childs-classes-in-C-tp4990983p4991052.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list