[gdal-dev] OGR building always requires KML, GML, GEOJSON drivers
Dmitry Baryshnikov
polimax at mail.ru
Sat Feb 4 12:15:10 EST 2012
Hi all,
OGRGeometry have such methods as exportToGML, exportToKML, exportToJson
which always requires KML (not LIBKM), GML and GEOJSON code.
I think in exportToGML, exportToKML, exportToJson should be #ifdef
KML_ENABLED GML_ENABLED, GEOJSON_ENABLED.
For example:
char *OGRGeometry::exportToKML() const
{
#ifndef _WIN32_WCE
#if defined OGR_ENABLED && defined KML_ENABLED
return OGR_G_ExportToKML( (OGRGeometryH) this, NULL );
#else
CPLError( CE_Failure, CPLE_AppDefined,
"OGRGeometry::exportToKML() not supported in builds
without OGR drivers." );
return NULL;
#endif
#else
CPLError( CE_Failure, CPLE_AppDefined,
"OGRGeometry::exportToKML() not supported in the
WinCE build." );
return NULL;
#endif
}
Can I add such code?
Best regards,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120204/ad08f35d/attachment.html
More information about the gdal-dev
mailing list