]> granicus.if.org Git - postgis/commitdiff
Fixed a bug in outputput dimension detection for makeline()
authorSandro Santilli <strk@keybit.net>
Fri, 15 Oct 2004 15:21:55 +0000 (15:21 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 15 Oct 2004 15:21:55 +0000 (15:21 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@1015 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwline.c

index 2aa87df00b91975741c7ff59d0c6b08e68c29589..f167f097be5447213f231654ba38b71d278169cb 100644 (file)
@@ -396,7 +396,8 @@ make_lwline(int SRID, unsigned int npoints, LWPOINT **points)
                                lwgeom_typename(TYPE_GETTYPE(points[i]->type)));
                        return NULL;
                }
-               zmflag = TYPE_GETZM(points[i]->type);
+               if ( TYPE_HASZ(points[i]->type) ) zmflag |= 2;
+               if ( TYPE_HASM(points[i]->type) ) zmflag |= 1;
                if ( zmflag == 3 ) break;
        }