[gdal-dev] PGeo: reading circular arcs - how?
ragi at burhum.com
Wed Jun 9 20:48:15 EDT 2010
Sorry for the delay in the reply (I am trying to clean up my e-mail today).
Answers inline below
On Sun, Jun 6, 2010 at 7:02 AM, Stefan Keller <sfkeller at gmail.com> wrote:
> Hi Ragi
> Thank you for the tips.
> I browsed through the pages you referred to but I somehow did not find
> neither a formula nor the meaning of the parameters.
Basically, there is a call to Densify. As far as the formula/algorithm to
create those lines, well, look for Douglas Peucker.
Keep in mind that I am reading the binary format of PGeo and I am
> focussing on circular arcs only. The beginning of the encoding binary
> block elements are already clear.
Great! less to worry about :)
> What's confusing is that I would expect as attributes just a starting
> point, a midpoint and an endpoint. But what's somehow there is s
> startpoint and followed by 4 or more attributes.
If I remember correctly, serialization of curves changed between 9.2 to 9.3.
So you need to know what GeoDatabase version you are reading (it is on one
of the metadata tables).
As far as what those attributes are, well, honestly, there was a reason to
my "not fun" comment.
You see, I don't think you will find a description of those attributes, but
you can make an educated guess.
If you look at the different ways to construct a Circular in ArcObjects
you will understand why it can be a pain. I don't know which attributes they
are serializing, but it definitely is the parameters of one of the listed
> 2010/6/5 Ragi Burhum <ragi at burhum.com>:
> >> 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:
> >> ESRI user doc says at
> >> "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
> >> 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.htmyou will find attributes defined on those specific types that are most
> likely the serialized bytes.
> > not fun.
> > good luck,
> > Ragi_______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev