[GRASS-user] OpenFileGDB input error
Even Rouault
even.rouault at spatialys.com
Thu Sep 28 13:34:55 PDT 2017
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170928/d9dd97a4/attachment-0001.html>
More information about the grass-user
mailing list