From cc9745bb878a114c604aa074e5af97f33c196555 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Mon, 21 May 2012 09:36:02 +0000 Subject: [PATCH] Accept PostGIS 1.5 WKB type numbers in WKB parser (#1807) git-svn-id: http://svn.osgeo.org/postgis/trunk@9761 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwin_wkb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/liblwgeom/lwin_wkb.c b/liblwgeom/lwin_wkb.c index ca3b4cde6..769cb2adb 100644 --- a/liblwgeom/lwin_wkb.c +++ b/liblwgeom/lwin_wkb.c @@ -202,6 +202,18 @@ static void lwtype_from_wkb_state(wkb_parse_state *s, uint32_t wkb_type) case WKB_TRIANGLE_TYPE: s->lwtype = TRIANGLETYPE; break; + + /* PostGIS 1.5 emits 13, 14 for CurvePolygon, MultiCurve */ + /* These numbers aren't SQL/MM (numbers currently only */ + /* go up to 12. We can handle the old data here (for now??) */ + /* converting them into the lwtypes that are intended. */ + case WKB_CURVE_TYPE: + s->lwtype = CURVEPOLYTYPE; + break; + case WKB_SURFACE_TYPE: + s->lwtype = MULTICURVETYPE; + break; + default: /* Error! */ lwerror("Unknown WKB type (%d)! Full WKB type number was (%d).", wkb_simple_type, wkb_type); break; -- 2.50.1