]> granicus.if.org Git - postgis/commitdiff
Remove trailing blankspaces
authorSandro Santilli <strk@kbt.io>
Mon, 21 Nov 2016 15:27:19 +0000 (15:27 +0000)
committerSandro Santilli <strk@kbt.io>
Mon, 21 Nov 2016 15:27:19 +0000 (15:27 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@15242 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwgeom_api.c
liblwgeom/lwgeom_geos.c

index deb1071e3116398a7e82a08b9992231e8a55c71b..a3fe27774bee014c317fb1412051d02ee2f21295 100644 (file)
@@ -503,7 +503,7 @@ const POINT3DZ*
 getPoint3dz_cp(const POINTARRAY *pa, int n)
 {
        if ( ! pa ) return 0;
-       
+
        if ( ! FLAGS_GET_Z(pa->flags) )
        {
                lwerror("getPoint3dz_cp: no Z coordinates in point array");
@@ -524,7 +524,7 @@ const POINT4D*
 getPoint4d_cp(const POINTARRAY *pa, int n)
 {
        if ( ! pa ) return 0;
-       
+
        if ( ! (FLAGS_GET_Z(pa->flags) && FLAGS_GET_Z(pa->flags)) )
        {
                lwerror("getPoint3dz_cp: no Z and M coordinates in point array");
index c9a7dcd20a71c36d4c8f3630ef98832e8092f281..64659dec0ba9e4178e9c53a04c1e0cade5b29122 100644 (file)
@@ -246,7 +246,7 @@ ptarray_to_GEOSCoordSeq(const POINTARRAY *pa)
 
                GEOSCoordSeq_setX(sq, i, p2d->x);
                GEOSCoordSeq_setY(sq, i, p2d->y);
-               
+
                if ( dims == 3 )
                        GEOSCoordSeq_setZ(sq, i, p3d->z);
        }
@@ -350,17 +350,17 @@ LWGEOM2GEOS(const LWGEOM *lwgeom, int autofix)
                lwgeom_free(lwgeom_stroked);
                return g;
        }
-       
+
        switch (lwgeom->type)
        {
                LWPOINT *lwp = NULL;
                LWPOLY *lwpoly = NULL;
                LWLINE *lwl = NULL;
                LWCOLLECTION *lwc = NULL;
-               
+
        case POINTTYPE:
                lwp = (LWPOINT *)lwgeom;
-               
+
                if ( lwgeom_is_empty(lwgeom) )
                {
                        g = GEOSGeom_createEmptyPolygon();
@@ -451,10 +451,10 @@ LWGEOM2GEOS(const LWGEOM *lwgeom, int autofix)
                for (i=0; i<ngeoms; ++i)
                {
                        GEOSGeometry* g;
-                       
+
                        if( lwgeom_is_empty(lwc->geoms[i]) )
                                continue;
-                       
+
                        g = LWGEOM2GEOS(lwc->geoms[i], 0);
                        if ( ! g )
                        {
@@ -1403,7 +1403,7 @@ lwgeom_buildarea(const LWGEOM *geom)
        initGEOS(lwnotice, lwgeom_geos_error);
 
        geos_in = LWGEOM2GEOS(geom, 0);
-       
+
        if ( 0 == geos_in )   /* exception thrown at construction */
        {
                lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg);
@@ -1496,7 +1496,7 @@ lwgeom_geos_noop(const LWGEOM* geom_in)
                        lwgeom_geos_errmsg);
        }
        return geom_out;
-       
+
 }
 
 LWGEOM*
@@ -1693,13 +1693,13 @@ lwpoly_to_points(const LWPOLY *lwpoly, int npoints)
                lwerror("%s: only polygons supported", __func__);
                return NULL;
        }
-       
+
        if (npoints == 0 || lwgeom_is_empty(lwgeom))
        {
                return NULL;
                // return lwmpoint_construct_empty(lwgeom_get_srid(poly), lwgeom_has_z(poly), lwgeom_has_m(poly));
        }
-       
+
        if (!lwpoly->bbox)
        {
                lwgeom_calculate_gbox(lwgeom, &bbox);
@@ -1718,11 +1718,11 @@ lwpoly_to_points(const LWPOLY *lwpoly, int npoints)
                lwerror("%s: zero area input polygon, TBD", __func__);
                return NULL;
        }
-       
+
        /* Gross up our test set a bit to increase odds of getting */
        /* coverage in one pass */
        sample_npoints = npoints * bbox_area / area;
-       
+
        /* We're going to generate points using a sample grid */
        /* as described http://lin-ear-th-inking.blogspot.ca/2010/05/more-random-points-in-jts.html */
        /* to try and get a more uniform "random" set of points */
@@ -1730,7 +1730,7 @@ lwpoly_to_points(const LWPOLY *lwpoly, int npoints)
        sample_sqrt = lround(sqrt(sample_npoints));
        if (sample_sqrt == 0)
                sample_sqrt = 1;
-       
+
        /* Calculate the grids we're going to randomize within */
        if (bbox_width > bbox_height)
        {
@@ -1744,7 +1744,7 @@ lwpoly_to_points(const LWPOLY *lwpoly, int npoints)
                sample_width = ceil((double)sample_npoints / (double)sample_height);
                sample_cell_size = bbox_height / sample_height;
        }
-       
+
        /* Prepare the polygon for fast true/false testing */
        initGEOS(lwnotice, lwgeom_geos_error);
        g = (GEOSGeometry *)LWGEOM2GEOS(lwgeom, 0);
@@ -1754,10 +1754,10 @@ lwpoly_to_points(const LWPOLY *lwpoly, int npoints)
                return NULL;
        }
        gprep = GEOSPrepare(g);
-       
+
        /* Get an empty multi-point ready to return */
        mpt = lwmpoint_construct_empty(srid, 0, 0);
-       
+
        /* Init random number generator */
        srand(time(NULL));
 
@@ -1774,7 +1774,7 @@ lwpoly_to_points(const LWPOLY *lwpoly, int npoints)
                }
        }
        shuffle(cells, sample_height*sample_width, 2*sizeof(int));
-       
+
        /* Start testing points */
        while (npoints_generated < npoints)
        {
@@ -1795,7 +1795,7 @@ lwpoly_to_points(const LWPOLY *lwpoly, int npoints)
                        gpt = GEOSGeom_createPoint(gseq);
 
                        contains = GEOSPreparedIntersects(gprep, gpt);
-                       
+
                GEOSGeom_destroy(gpt);
 
                        if (contains == 2)
@@ -1815,23 +1815,23 @@ lwpoly_to_points(const LWPOLY *lwpoly, int npoints)
                                        break;
                                }
                        }
-                       
+
                        /* Short-circuit check for ctrl-c occasionally */
                        npoints_tested++;
                        if (npoints_tested % 10000 == 0)
                        {
                                LW_ON_INTERRUPT(GEOSPreparedGeom_destroy(gprep); GEOSGeom_destroy(g); return NULL);
                        }
-                       
+
                        if (done) break;
                }
                if (done || iterations > 100) break;
        }
-       
+
        GEOSPreparedGeom_destroy(gprep);
        GEOSGeom_destroy(g);
        lwfree(cells);
-       
+
        return mpt;
 }
 
@@ -1847,19 +1847,19 @@ lwmpoly_to_points(const LWMPOLY *lwmpoly, int npoints)
        double area;
        int i;
        LWMPOINT *mpt = NULL;
-       
+
        if (lwgeom_get_type(lwgeom) != MULTIPOLYGONTYPE)
        {
                lwerror("%s: only multipolygons supported", __func__);
-               return NULL;            
+               return NULL;
        }
        if (npoints == 0 || lwgeom_is_empty(lwgeom))
        {
                return NULL;
        }
-       
+
        area = lwgeom_area(lwgeom);
-       
+
        for (i = 0; i < lwmpoly->ngeoms; i++)
        {
                double sub_area = lwpoly_area(lwmpoly->geoms[i]);
@@ -1884,7 +1884,7 @@ lwmpoly_to_points(const LWMPOLY *lwmpoly, int npoints)
                        }
                }
        }
-       
+
        return mpt;
 }
 
@@ -1900,7 +1900,7 @@ lwgeom_to_points(const LWGEOM *lwgeom, int npoints)
                        return lwpoly_to_points((LWPOLY*)lwgeom, npoints);
                default:
                        lwerror("%s: unsupported geometry type '%s'", __func__, lwtype_name(lwgeom_get_type(lwgeom)));
-                       return NULL;    
+                       return NULL;
        }
 }
 
@@ -2028,7 +2028,7 @@ LWGEOM* lwgeom_delaunay_triangulation(const LWGEOM *lwgeom_in, double tolerance,
        }
 
        return lwgeom_result;
-       
+
 #endif /* POSTGIS_GEOS_VERSION < 34 */
 }