[gdal-dev] OGRCircularString - full circle from three points

Even Rouault even.rouault at spatialys.com
Thu Jan 15 02:20:10 PST 2015


Selon Martin Landa <landa.martin at gmail.com>:

> Hi,
>
> I am working with three points which define a full circle. To describe
> it using OGRCircularString
> I would need five points defining two circular arcs, right? So in my
> case to compute an intermediate point for the second arc, right?

Martin,

You can describe a full circle with 3 points by specifying (P1,P2,P1) where
P1-P2 defines a diameter of the circle, but there's an ambiguity on the
orientation to follow the CircularString (which shouldn't matter if the
CircularString is part of a CurvePolygon) and some implementation might not like
it (OGR should be fine)
Indeed using 5 points is better. You can define (P1,P2,P3,P4,P1) where all
points are on the circle. For example P1-P3 and P2-P4 being 2 diameters, but
that's not a requirement.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list