[postgis-tickets] r15677 - ST_AsMVTGeom buffer default changed from 0 to 256
bjorn at wololo.org
bjorn at wololo.org
Sun Sep 10 05:01:56 PDT 2017
Author: bjornharrtell
Date: 2017-09-10 05:01:56 -0700 (Sun, 10 Sep 2017)
New Revision: 15677
Modified:
trunk/doc/reference_output.xml
trunk/postgis/lwgeom_out_mvt.c
trunk/postgis/postgis.sql.in
Log:
ST_AsMVTGeom buffer default changed from 0 to 256
Modified: trunk/doc/reference_output.xml
===================================================================
--- trunk/doc/reference_output.xml 2017-09-10 11:57:19 UTC (rev 15676)
+++ trunk/doc/reference_output.xml 2017-09-10 12:01:56 UTC (rev 15677)
@@ -1361,7 +1361,7 @@
<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
<paramdef><type>box2d </type> <parameter>bounds</parameter></paramdef>
<paramdef choice="opt"><type>int4 </type> <parameter>extent=4096</parameter></paramdef>
- <paramdef choice="opt"><type>int4 </type> <parameter>buffer=0</parameter></paramdef>
+ <paramdef choice="opt"><type>int4 </type> <parameter>buffer=256</parameter></paramdef>
<paramdef choice="opt"><type>bool </type> <parameter>clip_geom=true</parameter></paramdef>
</funcprototype>
</funcsynopsis>
@@ -1377,7 +1377,7 @@
<para><varname>geom</varname> is the geometry to transform.</para>
<para><varname>bounds</varname> is the geometric bounds of the tile contents without buffer.</para>
<para><varname>extent</varname> is the tile extent in tile coordinate space as defined by the <ulink url="https://www.mapbox.com/vector-tiles/specification/">specification</ulink>. If NULL it will default to 4096.</para>
- <para><varname>buffer</varname> is the buffer distance in tile coordinate space to optionally clip geometries. If NULL it will default to 0.</para>
+ <para><varname>buffer</varname> is the buffer distance in tile coordinate space to optionally clip geometries. If NULL it will default to 256.</para>
<para><varname>clip_geom</varname> is a boolean to control if geometries should be clipped or encoded as is. If NULL it will default to true.</para>
<para>Availability: 2.4.0</para>
Modified: trunk/postgis/lwgeom_out_mvt.c
===================================================================
--- trunk/postgis/lwgeom_out_mvt.c 2017-09-10 11:57:19 UTC (rev 15676)
+++ trunk/postgis/lwgeom_out_mvt.c 2017-09-10 12:01:56 UTC (rev 15677)
@@ -58,7 +58,7 @@
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);
Modified: trunk/postgis/postgis.sql.in
===================================================================
--- trunk/postgis/postgis.sql.in 2017-09-10 11:57:19 UTC (rev 15676)
+++ trunk/postgis/postgis.sql.in 2017-09-10 12:01:56 UTC (rev 15677)
@@ -4442,7 +4442,7 @@
);
-- 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;
More information about the postgis-tickets
mailing list