]> granicus.if.org Git - postgis/commitdiff
[style only] remove trailing blanks
authorSandro Santilli <strk@kbt.io>
Tue, 22 Aug 2017 12:38:59 +0000 (12:38 +0000)
committerSandro Santilli <strk@kbt.io>
Tue, 22 Aug 2017 12:38:59 +0000 (12:38 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@15565 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwcircstring.c
liblwgeom/lwgeom.c

index 9b6805f78cd3f39dfb265351cedc74a04a4425aa..fba36c576117c444beec35cfe44e93574ded2bdd 100644 (file)
@@ -65,7 +65,7 @@ lwcircstring_construct(int srid, GBOX *bbox, POINTARRAY *points)
        result = (LWCIRCSTRING*) lwalloc(sizeof(LWCIRCSTRING));
 
        result->type = CIRCSTRINGTYPE;
-       
+
        result->flags = points->flags;
        FLAGS_SET_BBOX(result->flags, bbox?1:0);
 
@@ -98,7 +98,7 @@ lwcircstring_release(LWCIRCSTRING *lwcirc)
 void lwcircstring_free(LWCIRCSTRING *curve)
 {
        if ( ! curve ) return;
-       
+
        if ( curve->bbox )
                lwfree(curve->bbox);
        if ( curve->points )
@@ -188,7 +188,7 @@ lwcircstring_from_lwpointarray(int srid, uint32_t npoints, LWPOINT **points)
                ptr += ptsize;
        }
        pa = ptarray_construct_reference_data(zmflag&2, zmflag&1, npoints, newpoints);
-       
+
        return lwcircstring_construct(srid, NULL, pa);
 }
 
@@ -223,7 +223,7 @@ lwcircstring_from_lwmpoint(int srid, LWMPOINT *mpoint)
        }
 
        pa = ptarray_construct_reference_data(zmflag&2, zmflag&1, mpoint->ngeoms, newpoints);
-       
+
        LWDEBUGF(3, "lwcurve_from_lwmpoint: constructed pointarray for %d points, %d zmflag", mpoint->ngeoms, zmflag);
 
        return lwcircstring_construct(srid, NULL, pa);
@@ -289,7 +289,7 @@ double lwcircstring_length_2d(const LWCIRCSTRING *circ)
 {
        if ( lwcircstring_is_empty(circ) )
                return 0.0;
-       
+
        return ptarray_arc_length_2d(circ->points);
 }
 
index bb5385a594a4e40a39d20549cf74d356853fefb0..87f966c37689b18025b42ee0a4d7b40200f6602e 100644 (file)
@@ -512,7 +512,7 @@ lwgeom_to_ewkt(const LWGEOM *lwgeom)
 {
        char* wkt = NULL;
        size_t wkt_size = 0;
-       
+
        wkt = lwgeom_to_wkt(lwgeom, WKT_EXTENDED, 12, &wkt_size);
 
        if ( ! wkt )
@@ -612,7 +612,7 @@ lwpoint_inside_circle(const LWPOINT *p, double cx, double cy, double rad)
 
        if ( ! p || ! p->point )
                return LW_FALSE;
-               
+
        pt = getPoint2d_cp(p->point, 0);
 
        center.x = cx;
@@ -655,17 +655,17 @@ lwgeom_add_bbox_deep(LWGEOM *lwgeom, GBOX *gbox)
        if ( lwgeom_is_empty(lwgeom) ) return;
 
        FLAGS_SET_BBOX(lwgeom->flags, 1);
-       
+
        if ( ! ( gbox || lwgeom->bbox ) )
        {
                lwgeom->bbox = gbox_new(lwgeom->flags);
-               lwgeom_calculate_gbox(lwgeom, lwgeom->bbox);            
+               lwgeom_calculate_gbox(lwgeom, lwgeom->bbox);
        }
        else if ( gbox && ! lwgeom->bbox )
        {
                lwgeom->bbox = gbox_clone(gbox);
        }
-       
+
        if ( lwgeom_is_collection(lwgeom) )
        {
                int i;
@@ -697,7 +697,7 @@ int lwgeom_calculate_gbox(const LWGEOM *lwgeom, GBOX *gbox)
        if( FLAGS_GET_GEODETIC(lwgeom->flags) )
                return lwgeom_calculate_gbox_geodetic(lwgeom, gbox);
        else
-               return lwgeom_calculate_gbox_cartesian(lwgeom, gbox);   
+               return lwgeom_calculate_gbox_cartesian(lwgeom, gbox);
 }
 
 void
@@ -730,31 +730,31 @@ lwgeom_segmentize2d(LWGEOM *lwgeom, double dist)
 
 LWGEOM*
 lwgeom_force_2d(const LWGEOM *geom)
-{      
+{
        return lwgeom_force_dims(geom, 0, 0);
 }
 
 LWGEOM*
 lwgeom_force_3dz(const LWGEOM *geom)
-{      
+{
        return lwgeom_force_dims(geom, 1, 0);
 }
 
 LWGEOM*
 lwgeom_force_3dm(const LWGEOM *geom)
-{      
+{
        return lwgeom_force_dims(geom, 0, 1);
 }
 
 LWGEOM*
 lwgeom_force_4d(const LWGEOM *geom)
-{      
+{
        return lwgeom_force_dims(geom, 1, 1);
 }
 
 LWGEOM*
 lwgeom_force_dims(const LWGEOM *geom, int hasz, int hasm)
-{      
+{
        switch(geom->type)
        {
                case POINTTYPE:
@@ -784,7 +784,7 @@ lwgeom_force_dims(const LWGEOM *geom, int hasz, int hasm)
 
 LWGEOM*
 lwgeom_force_sfs(LWGEOM *geom, int version)
-{      
+{
        LWCOLLECTION *col;
        int i;
        LWGEOM *g;
@@ -813,7 +813,7 @@ lwgeom_force_sfs(LWGEOM *geom, int version)
                                return (LWGEOM *)geom;
                }
        }
-       
+
 
        /* SFS 1.1 version */
        switch(geom->type)
@@ -842,7 +842,7 @@ lwgeom_force_sfs(LWGEOM *geom, int version)
                        }
                        col->type = COLLECTIONTYPE;
                        return lwmpoly_as_lwgeom((LWMPOLY*)geom);
-               
+
                case POLYHEDRALSURFACETYPE:
                        geom->type = COLLECTIONTYPE;
                        return (LWGEOM *)geom;
@@ -854,7 +854,7 @@ lwgeom_force_sfs(LWGEOM *geom, int version)
                                col->geoms[i] = lwgeom_force_sfs((LWGEOM*)col->geoms[i], version);
 
                        return lwcollection_as_lwgeom((LWCOLLECTION*)geom);
-               
+
                default:
                        return (LWGEOM *)geom;
        }
@@ -904,11 +904,11 @@ lwgeom_set_geodetic(LWGEOM *geom, int value)
        LWPOLY *ply;
        LWCOLLECTION *col;
        int i;
-       
+
        FLAGS_SET_GEODETIC(geom->flags, value);
        if ( geom->bbox )
                FLAGS_SET_GEODETIC(geom->bbox->flags, value);
-       
+
        switch(geom->type)
        {
                case POINTTYPE:
@@ -989,10 +989,10 @@ int
 lwgeom_is_closed(const LWGEOM *geom)
 {
        int type = geom->type;
-       
+
        if( lwgeom_is_empty(geom) )
                return LW_FALSE;
-       
+
        /* Test linear types for closure */
        switch (type)
        {
@@ -1009,7 +1009,7 @@ lwgeom_is_closed(const LWGEOM *geom)
        case POLYHEDRALSURFACETYPE:
                return lwpsurface_is_closed((LWPSURFACE*)geom);
        }
-       
+
        /* Recurse into collections and see if anything is not closed */
        if ( lwgeom_is_collection(geom) )
        {
@@ -1024,7 +1024,7 @@ lwgeom_is_closed(const LWGEOM *geom)
                }
                return LW_TRUE;
        }
-       
+
        /* All non-linear non-collection types we will call closed */
        return LW_TRUE;
 }
@@ -1096,7 +1096,7 @@ void lwgeom_free(LWGEOM *lwgeom)
        if( ! lwgeom ) return;
 
        LWDEBUGF(5,"freeing a %s",lwtype_name(lwgeom->type));
-       
+
        switch (lwgeom->type)
        {
        case POINTTYPE:
@@ -1182,10 +1182,10 @@ int lwgeom_needs_bbox(const LWGEOM *geom)
 int lwgeom_count_vertices(const LWGEOM *geom)
 {
        int result = 0;
-       
+
        /* Null? Zero. */
        if( ! geom ) return 0;
-       
+
        LWDEBUGF(4, "lwgeom_count_vertices got type %s",
                 lwtype_name(geom->type));
 
@@ -1236,7 +1236,7 @@ int lwgeom_dimension(const LWGEOM *geom)
 
        /* Null? Zero. */
        if( ! geom ) return -1;
-       
+
        LWDEBUGF(4, "lwgeom_dimension got type %s",
                 lwtype_name(geom->type));
 
@@ -1291,7 +1291,7 @@ int lwgeom_dimension(const LWGEOM *geom)
 int lwgeom_count_rings(const LWGEOM *geom)
 {
        int result = 0;
-       
+
        /* Null? Empty? Zero. */
        if( ! geom || lwgeom_is_empty(geom) )
                return 0;
@@ -1621,7 +1621,7 @@ LWGEOM* lwgeom_simplify(const LWGEOM *igeom, double dist, int preserve_collapsed
 double lwgeom_area(const LWGEOM *geom)
 {
        int type = geom->type;
-       
+
        if ( type == POLYGONTYPE )
                return lwpoly_area((LWPOLY*)geom);
        else if ( type == CURVEPOLYTYPE )
@@ -1880,7 +1880,7 @@ lwgeom_startpoint(const LWGEOM* lwgeom, POINT4D* pt)
 {
        if ( ! lwgeom )
                return LW_FAILURE;
-               
+
        switch( lwgeom->type )
        {
                case POINTTYPE:
@@ -1947,25 +1947,25 @@ lwgeom_subdivide_recursive(const LWGEOM *geom, int maxvertices, int depth, LWCOL
        double height = clip->ymax - clip->ymin;
        GBOX subbox1, subbox2;
        LWGEOM *clipped1, *clipped2;
-       
+
        if ( geom->type == POLYHEDRALSURFACETYPE || geom->type == TINTYPE )
        {
                lwerror("%s: unsupported geometry type '%s'", __func__, lwtype_name(geom->type));
        }
-       
+
        if ( width == 0.0 && height == 0.0 )
        {
                if ( geom->type == POINTTYPE )
                {
                        lwcollection_add_lwgeom(col, lwgeom_clone_deep(geom));
-                       return 1;                       
+                       return 1;
                }
                else
                {
                        return 0;
                }
        }
-       
+
        /* Always just recurse into collections */
        if ( lwgeom_is_collection(geom) && geom->type != MULTIPOINTTYPE )
        {
@@ -1978,7 +1978,7 @@ lwgeom_subdivide_recursive(const LWGEOM *geom, int maxvertices, int depth, LWCOL
                }
                return n;
        }
-       
+
        /* But don't go too far. 2^50 ~= 10^15, that's enough subdivision */
        /* Just add what's left */
        if ( depth > maxdepth )
@@ -1986,21 +1986,21 @@ lwgeom_subdivide_recursive(const LWGEOM *geom, int maxvertices, int depth, LWCOL
                lwcollection_add_lwgeom(col, lwgeom_clone_deep(geom));
                return 0;
        }
-       
+
        nvertices = lwgeom_count_vertices(geom);
        /* Skip empties entirely */
        if ( nvertices == 0 )
        {
                return 0;
        }
-       
+
        /* If it is under the vertex tolerance, just add it, we're done */
        if ( nvertices < maxvertices )
        {
                lwcollection_add_lwgeom(col, lwgeom_clone_deep(geom));
                return 1;
        }
-       
+
        subbox1 = subbox2 = *clip;
        if ( width > height )
        {
@@ -2010,7 +2010,7 @@ lwgeom_subdivide_recursive(const LWGEOM *geom, int maxvertices, int depth, LWCOL
        {
                subbox1.ymax = subbox2.ymin = (clip->ymin + clip->ymax)/2;
        }
-       
+
        if ( height == 0 )
        {
                subbox1.ymax += FP_TOLERANCE;
@@ -2026,12 +2026,12 @@ lwgeom_subdivide_recursive(const LWGEOM *geom, int maxvertices, int depth, LWCOL
                subbox1.xmin -= FP_TOLERANCE;
                subbox2.xmin -= FP_TOLERANCE;
        }
-               
+
        clipped1 = lwgeom_clip_by_rect(geom, subbox1.xmin, subbox1.ymin, subbox1.xmax, subbox1.ymax);
        clipped2 = lwgeom_clip_by_rect(geom, subbox2.xmin, subbox2.ymin, subbox2.xmax, subbox2.ymax);
-       
+
        ++depth;
-       
+
        if ( clipped1 )
        {
                n += lwgeom_subdivide_recursive(clipped1, maxvertices, depth, col, &subbox1);
@@ -2043,9 +2043,9 @@ lwgeom_subdivide_recursive(const LWGEOM *geom, int maxvertices, int depth, LWCOL
                n += lwgeom_subdivide_recursive(clipped2, maxvertices, depth, col, &subbox2);
                lwgeom_free(clipped2);
        }
-       
+
        return n;
-       
+
 }
 
 LWCOLLECTION *
@@ -2055,7 +2055,7 @@ lwgeom_subdivide(const LWGEOM *geom, int maxvertices)
        static int minmaxvertices = 8;
        LWCOLLECTION *col;
        GBOX clip;
-       
+
        col = lwcollection_construct_empty(COLLECTIONTYPE, geom->srid, lwgeom_has_z(geom), lwgeom_has_m(geom));
 
        if ( lwgeom_is_empty(geom) )
@@ -2066,7 +2066,7 @@ lwgeom_subdivide(const LWGEOM *geom, int maxvertices)
                lwcollection_free(col);
                lwerror("%s: cannot subdivide to fewer than %d vertices per output", __func__, minmaxvertices);
        }
-       
+
        clip = *(lwgeom_get_bbox(geom));
        lwgeom_subdivide_recursive(geom, maxvertices, startdepth, col, &clip);
        lwgeom_set_srid((LWGEOM*)col, geom->srid);