Hello Stefan,<div><br></div><div>Sorry for the delay in the reply (I am trying to clean up my e-mail today). Answers inline below<br><br><div class="gmail_quote">On Sun, Jun 6, 2010 at 7:02 AM, Stefan Keller <span dir="ltr"><<a href="mailto:sfkeller@gmail.com">sfkeller@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Ragi<br>
<br>
Thank you for the tips.<br>
<br>
I browsed through the pages you referred to but I somehow did not find<br>
neither a formula nor the meaning of the parameters.<br>
<br></blockquote><div><br></div><div><a href="http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriGeometry/IPolycurve_Densify.htm">http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriGeometry/IPolycurve_Densify.htm</a></div>
<div><br></div><div>Basically, there is a call to Densify. As far as the formula/algorithm to create those lines, well, look for Douglas Peucker.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Keep in mind that I am reading the binary format of PGeo and I am<br>
focussing on circular arcs only. The beginning of the encoding binary<br>
block elements are already clear.<br>
<br></blockquote><div><br></div><div>Great! less to worry about :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
What's confusing is that I would expect as attributes just a starting<br>
point, a midpoint and an endpoint. But what's somehow there is s<br>
startpoint and followed by 4 or more attributes.<br>
<br></blockquote><div><br></div><div>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).</div><div>
<br></div><div>As far as what those attributes are, well, honestly, there was a reason to my "not fun" comment.</div><div><br></div><div>You see, I don't think you will find a description of those attributes, but you can make an educated guess.</div>
<div><br></div><div>If you look at the different ways to construct a Circular in ArcObjects</div><div><br></div><div><a href="http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriGeometry/IConstructCircularArc2.htm">http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriGeometry/IConstructCircularArc2.htm</a></div>
<div><br></div><div>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.</div><div><br></div><div>Good luck,</div>
<div><br></div><div>- Ragi</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Yours,<br>
Stefan<br>
<br>
<br>
2010/6/5 Ragi Burhum <<a href="mailto:ragi@burhum.com">ragi@burhum.com</a>>:<br>
<div><div></div><div class="h5">><br>
>> From: Stefan Keller <<a href="mailto:sfkeller@gmail.com">sfkeller@gmail.com</a>><br>
>> Subject: [gdal-dev] PGeo: reading circular arcs - how?<br>
>> To: <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
>><br>
>><br>
>> Hi all<br>
>><br>
>> I have an ESRI Personal GeoDatabase .mdb file (PGeo) which I would<br>
>> like to read and convert e.g. to Shapefile.<br>
>> The PGeo file contains "circular arc"s (or circular curve) and since<br>
>> OGR only supports linestrings they should be segmented (similar to<br>
>> <a href="http://www.gdal.org/ogr/drv_ili.html" target="_blank">http://www.gdal.org/ogr/drv_ili.html</a> ).<br>
>><br>
>> Now it turned out that the output is wrong: It seems that at least the<br>
>> midpoint(s) are misinterepreted.<br>
>><br>
>> In fact, when looking at the source (line 430 ff.) there's a TODO there:<br>
>> <a href="http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/pgeo/ogrpgeolayer.cpp" target="_blank">http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/pgeo/ogrpgeolayer.cpp</a><br>
>><br>
>> ESRI user doc says at<br>
>> <a href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002t0000000m000000.htm" target="_blank">http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002t0000000m000000.htm</a><br>
>> "Circular arc curves use a mathematical formula to draw the curve. If<br>
>> you export a geodatabase feature class containing circular<br>
>> arc curve features to a shapefile, the curved features are transformed<br>
>> to simple line features with closely spaced vertices to capture the<br>
>> curved shape".<br>
>><br>
>> => Does anybody know this formula<br>
><br>
> <a href="http://resources.esri.com/help/9.3/ArcGISEngine/java/api/arcobjects/com/esri/arcgis/geometry/IPolycurve.html#densify(double,%20double)" target="_blank">http://resources.esri.com/help/9.3/ArcGISEngine/java/api/arcobjects/com/esri/arcgis/geometry/IPolycurve.html#densify(double,%20double)</a><br>
><br>
><br>
>> and/or the meaning of the<br>
>> additional attributes in the byte stream?<br>
>><br>
><br>
> 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 <a href="http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esrigeometry/ICurve.htm" target="_blank">http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esrigeometry/ICurve.htm</a> you will find attributes defined on those specific types that are most likely the serialized bytes.<br>
><br>
> not fun.<br>
><br>
> good luck,<br>
><br>
</div></div>> Ragi_______________________________________________<br>
> gdal-dev mailing list<br>
<div class="im">> <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
</div><div><div></div><div class="h5">> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
><br>
</div></div></blockquote></div><br></div>