[fdo-users] MPolygon <-> FDO

Gavin Cramer gavin.cramer at autodesk.com
Thu Mar 6 13:37:17 EST 2008


DirectPositionImpl does not do any rounding or conversion.  It just makes binary copies of ordinates.

Your printouts of MPolygon ordinates have 15 decimal digits of precision (13 or 14 after the decimal point), while the DirectPositionImpl printouts have two more digits.  The only differences that I can see are due to rounding for printing. What happens if the same length is used for both?

Gavin


-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Jonio, Dennis (Aviation)
Sent: Thursday, March 06, 2008 1:16 PM
To: FDO Users Mail List
Subject: RE: [fdo-users] MPolygon <-> FDO

Gavin,
It appears, on the surface at least, that DirectPositionImpl is not
returning the same values that it is being handed. Since in my test
case, that I include below, uses a CircularArc2d object I show that
also. That object hands back what it is passed so I am fairly sure that
that is not the issue.

It looks to me that there are rounding and precision differences. But at
least in this case it looks to me like the MPolygon vertices were all
correctly formed.

DirectPositionImpl? Any additional thoughts?

The Points from the Mpolygon
-               p       {Dimensions:[4]}
Autodesk.AutoCAD.Geometry.Point2d[]
+               [0]     {(61.9192385091388,10.2621902206345)}
Autodesk.AutoCAD.Geometry.Point2d
+               [1]     {(55.2181323514077,1.46976527536452)}
Autodesk.AutoCAD.Geometry.Point2d
+               [2]     {(70.4772774942939,4.8576720597566)}
Autodesk.AutoCAD.Geometry.Point2d
+               [3]     {(61.9192385091388,10.2621902206345)}
Autodesk.AutoCAD.Geometry.Point2d

Iteration:(0)
-               seg_s   {OSGeo.FDO.Geometry.DirectPositionImpl}
OSGeo.FDO.Geometry.DirectPositionImpl
+               base    {OSGeo.FDO.Geometry.DirectPositionImpl}
OSGeo.FDO.Runtime.Disposable {OSGeo.FDO.Geometry.DirectPositionImpl}
                Dimensionality  0       int
                M       NaN     double
                X       61.919238509138836      double
                Y       10.262190220634466      double
                Z       NaN     double
the MPolygon says: 61.9192385091388,10.2621902206345

-               seg_e   {OSGeo.FDO.Geometry.DirectPositionImpl}
OSGeo.FDO.Geometry.DirectPositionImpl
+               base    {OSGeo.FDO.Geometry.DirectPositionImpl}
OSGeo.FDO.Runtime.Disposable {OSGeo.FDO.Geometry.DirectPositionImpl}
                Dimensionality  0       int
                M       NaN     double
                X       55.218132351407746      double
                Y       1.4697652753645229      double
                Z       NaN     double
the MPolygon says: 55.2181323514077,1.46976527536452



Iteration:(1)

-               seg_s   {OSGeo.FDO.Geometry.DirectPositionImpl}
OSGeo.FDO.Geometry.DirectPositionImpl
+               base    {OSGeo.FDO.Geometry.DirectPositionImpl}
OSGeo.FDO.Runtime.Disposable {OSGeo.FDO.Geometry.DirectPositionImpl}
                Dimensionality  0       int
                M       NaN     double
                X       55.218132351407746      double
                Y       1.4697652753645229      double
                Z       NaN     double
the MPolygon says: 55.2181323514077,1.46976527536452

-               seg_e   {OSGeo.FDO.Geometry.DirectPositionImpl}
OSGeo.FDO.Geometry.DirectPositionImpl
+               base    {OSGeo.FDO.Geometry.DirectPositionImpl}
OSGeo.FDO.Runtime.Disposable {OSGeo.FDO.Geometry.DirectPositionImpl}
                Dimensionality  0       int
                M       NaN     double
                X       70.4772774942939        double
                Y       4.8576720597565952      double
                Z       NaN     double
the Mpolygon says: 70.4772774942939,4.8576720597566



Iteration:(2)

-               dpi_start       {OSGeo.FDO.Geometry.DirectPositionImpl}
OSGeo.FDO.Geometry.DirectPositionImpl
+               base    {OSGeo.FDO.Geometry.DirectPositionImpl}
OSGeo.FDO.Runtime.Disposable {OSGeo.FDO.Geometry.DirectPositionImpl}
                Dimensionality  0       int
                M       NaN     double
                X       70.4772774942939        double
                Y       4.8576720597565952      double
                Z       NaN     double
the Mpolygon says: 70.4772774942939,4.8576720597566


-               dpi_end {OSGeo.FDO.Geometry.DirectPositionImpl}
OSGeo.FDO.Geometry.DirectPositionImpl
+               base    {OSGeo.FDO.Geometry.DirectPositionImpl}
OSGeo.FDO.Runtime.Disposable {OSGeo.FDO.Geometry.DirectPositionImpl}
                Dimensionality  0       int
                M       NaN     double
                X       61.919238509138843      double
                Y       10.26219022063446       double
                Z       NaN     double
the Mpolygon says: 61.9192385091388,10.2621902206345



The CircularArc2d object
-               ca2d    {Autodesk.AutoCAD.Geometry.CircularArc2d}
Autodesk.AutoCAD.Geometry.CircularArc2d
+               base    {Autodesk.AutoCAD.Geometry.CircularArc2d}
Autodesk.AutoCAD.Geometry.Curve2d
{Autodesk.AutoCAD.Geometry.CircularArc2d}
+               Center  {(61.9192385091388,0.784116063691346)}
Autodesk.AutoCAD.Geometry.Point2d
                EndAngle        1.1265391183658797      double
+               EndPoint        {(61.9192385091388,10.2621902206345)}
Autodesk.AutoCAD.Geometry.Point2d
                IsClockWise     false   bool
                Radius  9.4780741569431157      double
+               ReferenceVector {(0.902930156848995,0.429787310018163)}
Autodesk.AutoCAD.Geometry.Vector2d
                StartAngle      0.0     double
+               StartPoint      {(70.4772774942939,4.8576720597566)}
Autodesk.AutoCAD.Geometry.Point2d

the Mpolygon says:START = 70.4772774942939,4.8576720597566
the Mpolygon says:END =  61.9192385091388,10.2621902206345
_______________________________________________
fdo-users mailing list
fdo-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users


More information about the fdo-users mailing list