[Shapelib] Creating an Arc

Frank Warmerdam warmerdam at pobox.com
Mon Jul 27 19:36:02 PDT 2009


Sling Blade wrote:
> 
> You are correct that shapefiles cannot store curved arcs.  The normal
> technique is to approximate them as polylines.
> 
> 
> What would be great would be to learn how to approximate an Arc with
> Polylines. Do you have any code showing how this is done?
> 
> Regards

Sling,

There is some example code for converting arcs to polylines in:

  http://svn.osgeo.org/gdal/trunk/gdal/ogr/ogrsf_frmts/oci/ogrocistroke.cpp

A lot depends on how your arcs are defined.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Shapelib mailing list