On Thu, Sep 28, 2017 at 7:56 PM, Even Rouault <[email protected]> wrote: > > > As of trunk r71513, v.in.ogr converts any curve types to linear equivalents > > > with OGR_G_GetLinearGeometry(). > > > > r71513 is going to leak memory. The return of OGR_G_GetLinearGeometry() must be freed with OGR_G_DestroyGeometry()
I must have missed that "The ownership of the returned geometry belongs to the caller." In contrast, with OGR_G_ForceTo() "a new [geometry is] returned (or potentially the same one)", therefore OGR_G_GetLinearGeometry() is easier to use. > > (be careful to call it only on a Ogr_geometry returned by OGR_G_GetLinearGeometry() and not the one returned by OGR_F_GetGeometryRef()) OK, done in trunk r71514. By now, v.in.ogr is peppered with #if GDAL_VERSION_NUM >= X, looks like at some stage we should have two versions, one for GDAL 1.x, another one for GDAL 2.x... Markus M > -- > > Spatialys - Geospatial professional services > > http://www.spatialys.com
_______________________________________________ grass-user mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/grass-user
