]> granicus.if.org Git - postgis/commitdiff
Accept PostGIS 1.5 WKB type numbers in WKB parser (#1807)
authorPaul Ramsey <pramsey@cleverelephant.ca>
Mon, 21 May 2012 09:36:02 +0000 (09:36 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Mon, 21 May 2012 09:36:02 +0000 (09:36 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9761 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwin_wkb.c

index ca3b4cde62da85e83082a3f450d48940f9fac33d..769cb2adbf6e612f3619caebb07a5ce0422a074a 100644 (file)
@@ -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;