While compiling osmcoastline with GDAL 1.11.0, I went into a compilation error in the file output_layers.cpp at line 227 because of a signature change in the undocumented method OGRGeometry:: exportToGEOS. This method now needs a parameter.
The patch to apply to compile osmcoastline with GDAL 1.11.0 is :
--- a/output_layers.cpp
+++ b/output_layers.cpp
@@ -224,7 +224,9 @@ void LayerRings::add(OGRPolygon* polygon, int osm_id, int nways, int npoints, bo
function from the GEOS C interface to get to the reason.
*/
- std::string reason = GEOSisValidReason(polygon->exportToGEOS());
+ GEOSContextHandle_t contextHandle = OGRGeometry::createGEOSContext();
+ std::string reason = GEOSisValidReason(polygon->exportToGEOS(contextHandle));
+ OGRGeometry::freeGEOSContext(contextHandle);
size_t left_bracket = reason.find('[');
size_t right_bracket = reason.find(']');
While compiling osmcoastline with GDAL 1.11.0, I went into a compilation error in the file output_layers.cpp at line 227 because of a signature change in the undocumented method OGRGeometry:: exportToGEOS. This method now needs a parameter.
The patch to apply to compile osmcoastline with GDAL 1.11.0 is :