<div dir="ltr"><div><div><div><br><br>On Wed, Sep 27, 2017 at 11:15 AM, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br>><br>>  <br>><br>> > > You can force a curve geometry to its linearized version (curves are<br>><br>> ><br>><br>> > approximated with segments) with:<br>><br>> > > hGeom = OGR_G_ForceTo(hGeom,<br>><br>> ><br>><br>> > OGR_GT_GetLinear(OGR_G_GetGeometryType(hGeom)))<br>><br>> ><br>><br>> > Thanks for the hint!<br>><br>> ><br>><br>> > I'm looking for a way to support non-linear geometries in v.in.ogr. Is<br>><br>> > there any advantage of using OGR_G_ForceTo() instead of<br>><br>> > OGR_G_GetLinearGeometry()?<br>><br>>  <br>><br>> Ah, I just forgot the existence of OGR_G_GetLinearGeometry(). Might be indeed more obvious to use. Both use ultimately the same mechanisms for linear approximation.<br>><br>> The main difference being that OGR_G_GetLinearGeometry() returns a new object, whereas OGR_G_ForceTo() transforms in place.<br><br></div>As of trunk r71513, v.in.ogr converts any curve types to linear equivalents with OGR_G_GetLinearGeometry().<br><br></div>Thanks for the feedback, Even!<br><br></div>Markus M<br><div><div><div>><br>>  <br>><br>> Evven<br>><br>>  <br>><br>> --<br>><br>> Spatialys - Geospatial professional services<br>><br>> <a href="http://www.spatialys.com">http://www.spatialys.com</a><br><br></div></div></div></div>