[fdo-users] Using CircularArc in NEN1878 provider

Piet Bibber piet.bibber at gmail.com
Mon Oct 1 10:08:47 EDT 2007


Great Gavin, works like a charm!
Piet


FdoIDirectPosition* dpStart = factory->CreatePositionXY(mCoordinates[0].x,
mCoordinates[0].y);

FdoIDirectPosition* dpMid = factory->CreatePositionXY(mCoordinates[1].x,
mCoordinates[1].y);

FdoIDirectPosition* dpEnd = factory->CreatePositionXY(mCoordinates[2].x,
mCoordinates[2].y);

FdoPtr<FdoICircularArcSegment> circularArc =
factory->CreateCircularArcSegment(dpStart, dpMid, dpEnd);

FdoPtr<FdoCurveSegmentCollection> curveSegments =
FdoCurveSegmentCollection::Create();

curveSegments->Add(circularArc);

FdoPtr<FdoICurveString> curveStrings =
factory->CreateCurveString(curveSegments);

return factory->GetFgf(curveStrings);


On 10/1/07, Gavin Cramer <gavin.cramer at autodesk.com> wrote:
>
> Hello, Piet.
>
> Arcs can only appear as curve segments.  They do not actually derive
> from FdoIGeometry.  To get an FdoIGeometry from an arc, add the
> FdoICircularArcSegment to an FdoCurveSegmentCollection and then create a
> FdoICurveString.  FdoICurveString is derived from FdoIGeometry.  The
> unit tests have some examples of this, e.g. see CreateCurveString() in
> GeometryTest.cpp.
>
> If you are trying to involve the arc in a polygon rather than a curve,
> you can use the FdoCurveSegmentCollection to create an FdoIRing instead.
> One or more FdoIRing values can be use to create an FdoICurvePolygon.
>
> Gavin
>
>
>
> -----Original Message-----
> From: fdo-users-bounces at lists.osgeo.org
> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Piet Bibber
> Sent: Monday, October 01, 2007 7:37 AM
> To: fdo-users at lists.osgeo.org
> Subject: [fdo-users] Using CircularArc in NEN1878 provider
>
>
> Hey,
>
> The NEN1878 provides info as a CircularArc. I'm capabale of creating a
> FdoICircularArcSegment, but have difficulties returning the IGeometry*
> for
> it (or the FdoByteArray*).
>
> Question: How do I convert a FdoICircularArcSegment into a FdoIGeometry*
> or
> FdoByteArray*? (for usage in the readers GetGeometry function)
>
> Note: Turning the FdoICircularArcSegment into Geometry via Envelope
> doesn't
> seem to work; or returning the 3 points as part of a CurveString. (But I
> might be overlooking something)
>
> Thanks in advance
> Piet
> --
> View this message in context:
> http://www.nabble.com/Using-CircularArc-in-NEN1878-provider-tf4547783s18
> 162.html#a12977578
> Sent from the fdo-users mailing list archive at Nabble.com.
>
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
>
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-users/attachments/20071001/606ec4a3/attachment.html


More information about the fdo-users mailing list