From a82a930a667d032e33ae05017d65efcbeaeab65e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sun, 6 Dec 2009 23:12:56 +0000 Subject: [PATCH] explode point geometries if multi* in ogr driver - workaround until we have actual fix for #458 --- plugins/input/ogr/ogr_converter.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/input/ogr/ogr_converter.cpp b/plugins/input/ogr/ogr_converter.cpp index 7dfdccf6a..5cb5e1c79 100644 --- a/plugins/input/ogr/ogr_converter.cpp +++ b/plugins/input/ogr/ogr_converter.cpp @@ -66,7 +66,10 @@ void ogr_converter::convert_geometry (OGRGeometry* geom, feature_ptr feature, bo if (multiple_geometries) convert_multipoint_2 (static_cast(geom), feature); else - convert_multipoint (static_cast(geom), feature); + // Todo - using convert_multipoint_2 until we have proper multipoint handling in convert_multipoint + // http://trac.mapnik.org/ticket/458 + //convert_multipoint (static_cast(geom), feature); + convert_multipoint_2 (static_cast(geom), feature); break; case wkbMultiLineString: if (multiple_geometries) @@ -158,7 +161,11 @@ void ogr_converter::convert_multipoint (OGRMultiPoint* geom, feature_ptr feature { OGRPoint* ogrpoint = static_cast(geom->getGeometryRef (i)); point->move_to (ogrpoint->getX(), ogrpoint->getY()); + //Todo - need to accept multiple points per point_impl } + + // Todo - this only gets last point + feature->add_geometry (point); } void ogr_converter::convert_multipoint_2 (OGRMultiPoint* geom, feature_ptr feature)