Hi Ragi Thank you very much! Let's see if there's a hint.
Yours, S. 2010/6/10 Ragi Burhum <r...@burhum.com>: > Hello Stefan, > 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 <sfkel...@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. >> > > http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriGeometry/IPolycurve_Densify.htm > 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 > http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriGeometry/IConstructCircularArc2.htm > 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 > methods. > Good luck, > - Ragi > >> >> Yours, >> Stefan >> >> >> 2010/6/5 Ragi Burhum <r...@burhum.com>: >> > >> >> From: Stefan Keller <sfkel...@gmail.com> >> >> Subject: [gdal-dev] PGeo: reading circular arcs - how? >> >> To: gdal-dev@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_______________________________________________ >> > gdal-dev mailing list >> > gdal-dev@lists.osgeo.org >> > http://lists.osgeo.org/mailman/listinfo/gdal-dev >> > > > _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev