<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>
<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>
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);
);
-- 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;