From ba034abb1f3647e880c9a74b9ead68cf75a6a28e Mon Sep 17 00:00:00 2001 From: Lucio Asnaghi Date: Thu, 18 Nov 2010 21:52:20 +0000 Subject: [PATCH] + support of WKB geometry collection --- src/wkb.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/wkb.cpp b/src/wkb.cpp index d40913795..470ca1f1b 100644 --- a/src/wkb.cpp +++ b/src/wkb.cpp @@ -111,6 +111,7 @@ public: read_multipolygon(feature); break; case wkbGeometryCollection: + read_collection(feature); break; default: break; @@ -141,6 +142,7 @@ public: read_multipolygon_2(feature); break; case wkbGeometryCollection: + read_collection_2(feature); break; default: break; @@ -329,7 +331,6 @@ private: read_coords(ar); poly->set_capacity(capacity); poly->move_to(ar[0].x,ar[0].y); - for (int j=1;jline_to(ar[j].x,ar[j].y); @@ -339,8 +340,28 @@ private: } feature.add_geometry(poly); } -}; + + void read_collection(Feature & feature) + { + int num_geometries=read_integer(); + for (int i=0;i