]> granicus.if.org Git - postgis/commitdiff
Cast to lwgeom for dimensionality test
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 11 Jun 2019 21:41:03 +0000 (21:41 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 11 Jun 2019 21:41:03 +0000 (21:41 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@17505 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/lwgeom_functions_analytic.c

index 4bb6aa4a7f6804ebb103f157bef24c069f24d31a..0db777b9c8747e6b9ca906cab3d669fd5760ff38 100644 (file)
@@ -433,9 +433,9 @@ Datum LWGEOM_snaptogrid_pointoff(PG_FUNCTION_ARGS)
        getPoint4d_p(in_lwpoint->point, 0, &offsetpoint);
        grid.ipx = offsetpoint.x;
        grid.ipy = offsetpoint.y;
-       if (lwgeom_has_z(in_lwpoint) ) grid.ipz = offsetpoint.z;
+       if (lwgeom_has_z((LWGEOM*)in_lwpoint)) grid.ipz = offsetpoint.z;
        else grid.ipz=0;
-       if (lwgeom_has_m(in_lwpoint) ) grid.ipm = offsetpoint.m;
+       if (lwgeom_has_m((LWGEOM*)in_lwpoint)) grid.ipm = offsetpoint.m;
        else grid.ipm=0;
 
 #if POSTGIS_DEBUG_LEVEL >= 4