> 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...
Seems to me that having 2 version of th code would be more difficult to
maintain.
To avoid cluttering the code with condition related to
OGR_G_GetLinearGeometry() for older
GDAL, you could create a dummy implementation of OGR_G_GetLinearGeometry at the
top
of the file for GDAL < 2 that just does a OGR_G_Clone()
#if GDAL_VERSION_NUM < 2000000
static OGRGeometryH my_OGR_G_GetLinearGeometry(OGRGeometryH hGeom, double
unused1, char** unused2)
{
(void)unused1;
(void)unused2;
return OGR_G_Clone(hGeom);
}
#define OGR_G_GetLinearGeometry my_OGR_G_GetLinearGeometry
#endif
(untested)
>
> Markus M
>
> > --
> >
> > Spatialys - Geospatial professional services
> >
> > http://www.spatialys.com
--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user