]> granicus.if.org Git - postgis/commitdiff
Harmonize ST_SimplifyVW with ST_Simplify behavior when feeded with 0 tolerance
authorNicklas Avén <nicklas.aven@jordogskog.no>
Thu, 4 Jun 2015 18:53:10 +0000 (18:53 +0000)
committerNicklas Avén <nicklas.aven@jordogskog.no>
Thu, 4 Jun 2015 18:53:10 +0000 (18:53 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13618 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/effectivearea.c
postgis/postgis.sql.in

index 80f3ce47c64f1acd85309f5c12bcbcaf464a9598..cf7d7e214b30d4991d1f6f1e8d2829431e4875fc 100644 (file)
@@ -408,7 +408,7 @@ static POINTARRAY * ptarray_set_effective_area(POINTARRAY *inpts,int avoid_colla
                /*Only return points with an effective area above the threashold*/
                for (p=0;p<ea->inpts->npoints;p++)
                {
-                       if(ea->res_arealist[p]>=trshld)
+                       if(ea->res_arealist[p]>trshld)
                        {
                                pt=getPoint4d(ea->inpts, p);
                                pt.m=ea->res_arealist[p];
@@ -421,7 +421,7 @@ static POINTARRAY * ptarray_set_effective_area(POINTARRAY *inpts,int avoid_colla
                /*Only return points with an effective area above the threashold*/
                for (p=0;p<ea->inpts->npoints;p++)
                {
-                       if(ea->res_arealist[p]>=trshld)
+                       if(ea->res_arealist[p]>trshld)
                        {
                                pt=getPoint4d(ea->inpts, p);
                                ptarray_append_point(opts, &pt, LW_TRUE);
index 446d4af1c093c5badde05b67f063634889846d86..10692bcdda7e8a410c943153c43760de1fb6d971 100644 (file)
@@ -2931,7 +2931,7 @@ CREATE OR REPLACE FUNCTION ST_SimplifyVW(geometry,  float8)
        LANGUAGE 'c' IMMUTABLE STRICT;
        
 -- Availability: 2.2.0
-CREATE OR REPLACE FUNCTION ST_SetEffectiveArea(geometry,  float8 default 0, integer default 1)
+CREATE OR REPLACE FUNCTION ST_SetEffectiveArea(geometry,  float8 default -1, integer default 1)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_SetEffectiveArea'
        LANGUAGE 'c' IMMUTABLE STRICT;