]> granicus.if.org Git - postgis/commitdiff
Syntaxes cleanups.
authorSandro Santilli <strk@keybit.net>
Thu, 17 Feb 2005 15:54:01 +0000 (15:54 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 17 Feb 2005 15:54:01 +0000 (15:54 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@1405 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_functions_analytic.c
lwgeom/lwgeom_functions_basic.c
lwgeom/lwgeom_geos.c
lwgeom/lwgeom_geos_wrapper.cpp
lwgeom/lwgeom_ogc.c

index 124a2ab0ed9add3e028d40cfc49beec2b5f4f45c..947ae57e830a5b38a75a0e82c9d46f5ec9744070 100644 (file)
@@ -731,8 +731,8 @@ LWPOINT *
 lwpoint_grid(LWPOINT *point, gridspec *grid)
 {
        POINT2D p;
-       getPoint2d_p(point->point, 0, &p);
        double x, y;
+       getPoint2d_p(point->point, 0, &p);
        x = rint((p.x - grid->ipx)/grid->xsize) *
                grid->xsize + grid->ipx;
        y = rint((p.y - grid->ipy)/grid->ysize) *
index 429f57fbd0fede9b07aedb2ff45d4a8b6629aa47..667bbfd3274d78d411b9cf9bc6b493e662809851 100644 (file)
@@ -1413,8 +1413,10 @@ Datum LWGEOM_maxdistance2d_linestring(PG_FUNCTION_ARGS)
        for (i=0; i<line1->points->npoints; i++)
        {
                POINT2D p;
+               double dist;
+
                getPoint2d_p(line1->points, i, &p);
-               double dist = distance2d_pt_ptarray(&p, line2->points);
+               dist = distance2d_pt_ptarray(&p, line2->points);
 
                if (dist > maxdist) maxdist = dist;
        }
index 6b6ca5e196bc556c9fa5395b3fc7bd7c6d558597..21c9553b74c9e39b0c08a30dbe3ce275c9959e89 100644 (file)
@@ -543,6 +543,7 @@ Datum convexhull(PG_FUNCTION_ARGS)
        PG_LWGEOM *result;
        LWGEOM *lwout;
        int SRID;
+       BOX2DFLOAT4 bbox;
 
 #ifdef PROFILE
        profstart(PROF_QRUN);
@@ -595,8 +596,6 @@ Datum convexhull(PG_FUNCTION_ARGS)
                PG_RETURN_NULL(); //never get here
        }
 
-       BOX2DFLOAT4 bbox;
-
        /* Copy input bbox if any */
        if ( getbox2d_p(SERIALIZED_FORM(geom1), &bbox) )
        {
index b1ea70f27b5a1ecfc7fdb5f38d99a737e66d1bb2..1ca57b070f18ab285cbe96cf29ea258c1f3f166c 100644 (file)
@@ -1075,7 +1075,9 @@ int GEOSGeometryTypeId(Geometry *g1)
                        case GEOS_POINT:
                                return POINTTYPE;
                        case GEOS_LINESTRING:
+#if GEOS_LAST_INTERFACE > 1
                        case GEOS_LINEARRING:
+#endif
                                return LINETYPE;
                        case GEOS_POLYGON:
                                return POLYGONTYPE;
index 91f8b39e336f8c64cfc2741b25962fd48ba74451..d8bd14e4ea115e8dbb5e5cfdc5225d14c64e6e5d 100644 (file)
@@ -327,7 +327,7 @@ Datum LWGEOM_exteriorring_polygon(PG_FUNCTION_ARGS)
        POINTARRAY *extring;
        LWLINE *line;
        PG_LWGEOM *result;
-       BOX2DFLOAT4 bbox, *bbox2;
+       BOX2DFLOAT4 bbox, *bbox2=NULL;
 
        if ( TYPE_GETTYPE(geom->type) != POLYGONTYPE )
        {