From: Nicklas Avén Date: Thu, 4 Jun 2015 18:53:10 +0000 (+0000) Subject: Harmonize ST_SimplifyVW with ST_Simplify behavior when feeded with 0 tolerance X-Git-Tag: 2.2.0rc1~399 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=054ac575c9ac92cf22756ecdc173caa3dd7106eb;p=postgis Harmonize ST_SimplifyVW with ST_Simplify behavior when feeded with 0 tolerance git-svn-id: http://svn.osgeo.org/postgis/trunk@13618 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/effectivearea.c b/liblwgeom/effectivearea.c index 80f3ce47c..cf7d7e214 100644 --- a/liblwgeom/effectivearea.c +++ b/liblwgeom/effectivearea.c @@ -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;pinpts->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;pinpts->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); diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in index 446d4af1c..10692bcdd 100644 --- a/postgis/postgis.sql.in +++ b/postgis/postgis.sql.in @@ -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;