[gdal-dev] PGeo: reading circular arcs - how?

Ragi Burhum ragi at burhum.com
Sat Jun 5 16:23:21 EDT 2010


> From: Stefan Keller <sfkeller at gmail.com>
> Subject: [gdal-dev] PGeo: reading circular arcs - how?
> To: gdal-dev at lists.osgeo.org
> 
> 
> Hi all
> 
> I have an ESRI Personal GeoDatabase .mdb file (PGeo) which I would
> like to read and convert e.g. to Shapefile.
> The PGeo file contains "circular arc"s (or circular curve) and since
> OGR only supports linestrings they should be segmented (similar to
> http://www.gdal.org/ogr/drv_ili.html ).
> 
> Now it turned out that the output is wrong: It seems that at least the
> midpoint(s) are misinterepreted.
> 
> In fact, when looking at the source (line 430 ff.) there's a TODO there:
> http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/pgeo/ogrpgeolayer.cpp
> 
> ESRI user doc says at
> http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002t0000000m000000.htm
> "Circular arc curves use a mathematical formula to draw the curve. If
> you export a geodatabase feature class containing circular
> arc curve features to a shapefile, the curved features are transformed
> to simple line features with closely spaced vertices to capture the
> curved shape".
> 
> => Does anybody know this formula

http://resources.esri.com/help/9.3/ArcGISEngine/java/api/arcobjects/com/esri/arcgis/geometry/IPolycurve.html#densify(double,%20double)


>  and/or the meaning of the
> additional attributes in the byte stream?
> 

depends on the type of curve. It could be a bezier curve, elliptical arc or circular arc. if you look at the coclasses of Icurve http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esrigeometry/ICurve.htm you will find attributes defined on those specific types that are most likely the serialized bytes. 

not fun.

good luck,

Ragi


More information about the gdal-dev mailing list