From: Björn Harrtell Date: Sun, 10 Sep 2017 12:01:56 +0000 (+0000) Subject: ST_AsMVTGeom buffer default changed from 0 to 256 X-Git-Tag: 2.4.0rc1~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd439d4fe5904286f60554d27d1154ed2fc93e27;p=postgis ST_AsMVTGeom buffer default changed from 0 to 256 git-svn-id: http://svn.osgeo.org/postgis/trunk@15677 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_output.xml b/doc/reference_output.xml index 6294acec1..2b2ee8bb3 100644 --- a/doc/reference_output.xml +++ b/doc/reference_output.xml @@ -1361,7 +1361,7 @@ SELECT ST_GeoHash(ST_SetSRID(ST_MakePoint(-126,48),4326),5); geometry geom box2d bounds int4 extent=4096 - int4 buffer=0 + int4 buffer=256 bool clip_geom=true @@ -1377,7 +1377,7 @@ SELECT ST_GeoHash(ST_SetSRID(ST_MakePoint(-126,48),4326),5); geom is the geometry to transform. bounds is the geometric bounds of the tile contents without buffer. extent is the tile extent in tile coordinate space as defined by the specification. If NULL it will default to 4096. - buffer is the buffer distance in tile coordinate space to optionally clip geometries. If NULL it will default to 0. + buffer is the buffer distance in tile coordinate space to optionally clip geometries. If NULL it will default to 256. clip_geom is a boolean to control if geometries should be clipped or encoded as is. If NULL it will default to true. Availability: 2.4.0 diff --git a/postgis/lwgeom_out_mvt.c b/postgis/lwgeom_out_mvt.c index 321e80966..bc609c9a6 100644 --- a/postgis/lwgeom_out_mvt.c +++ b/postgis/lwgeom_out_mvt.c @@ -58,7 +58,7 @@ Datum ST_AsMVTGeom(PG_FUNCTION_ARGS) elog(ERROR, "ST_AsMVTGeom: parameter bounds cannot be null"); bounds = (GBOX *) PG_GETARG_POINTER(1); extent = PG_ARGISNULL(2) ? 4096 : PG_GETARG_INT32(2); - buffer = PG_ARGISNULL(3) ? 0 : PG_GETARG_INT32(3); + buffer = PG_ARGISNULL(3) ? 256 : PG_GETARG_INT32(3); clip_geom = PG_ARGISNULL(4) ? true : PG_GETARG_BOOL(4); lwgeom_out = mvt_geom(lwgeom_in, bounds, extent, buffer, clip_geom); lwgeom_free(lwgeom_in); diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in index 5a6bdcad1..d76b88daf 100644 --- a/postgis/postgis.sql.in +++ b/postgis/postgis.sql.in @@ -4442,7 +4442,7 @@ CREATE AGGREGATE ST_AsMVT(anyelement, text, int4, text) ); -- Availability: 2.4.0 -CREATE OR REPLACE FUNCTION ST_AsMVTGeom(geom geometry, bounds box2d, extent int4 default 4096, buffer int4 default 0, clip_geom bool default true) +CREATE OR REPLACE FUNCTION ST_AsMVTGeom(geom geometry, bounds box2d, extent int4 default 4096, buffer int4 default 256, clip_geom bool default true) RETURNS geometry AS 'MODULE_PATHNAME','ST_AsMVTGeom' LANGUAGE 'c' IMMUTABLE _PARALLEL;