Vector tiles buffer is used to include data that is just outside of the tile. This data is used to prevent border effects when rendering the geometries. It is currently [hardcoded to 5 pixels](https://github.com/elastic/elasticsearch/blob/de2781f98696c1e6cfad2b5bf46fe752a5e3edbb/x-pack/plugin/vector-tile/src/main/java/org/elasticsearch/xpack/vectortile/feature/FeatureFactory.java#L63) but it should probably need to be user configurable by adding a new property on the vector tiles API which can change the value.




x-pack/plugin/vector-tile/src/main/java/org/elasticsearch/xpack/vectortile/rest/VectorTileRequest.java
import java.util.List;
import java.util.Map;
import static java.util.Collections.emptyList;
import static java.util.Collections.emptyMap;
import static org.elasticsearch.search.internal.SearchContext.DEFAULT_TRACK_TOTAL_HITS_UP_TO;
import static org.elasticsearch.search.internal.SearchContext.TRACK_TOTAL_HITS_ACCURATE;
import static org.elasticsearch.search.internal.SearchContext.TRACK_TOTAL_HITS_DISABLED;
/**
 * Transforms a rest request in a vector tile request
 */
class VectorTileRequest {
    protected static final String INDEX_PARAM = "index";
    protected static final String FIELD_PARAM = "field";
    protected static final String Z_PARAM = "z";
    protected static final String X_PARAM = "x";
    protected static final String Y_PARAM = "y";
    protected static final ParseField GRID_AGG_FIELD = new ParseField("grid_agg");
    protected static final ParseField GRID_TYPE_FIELD = new ParseField("grid_type");
    protected static final ParseField GRID_PRECISION_FIELD = new ParseField("grid_precision");
    protected static final ParseField EXTENT_FIELD = new ParseField("extent");
    protected static final ParseField EXACT_BOUNDS_FIELD = new ParseField("exact_bounds");
    protected static class Defaults {
        public static final int SIZE = 10000;
        public static final List<FieldAndFormat> FETCH = emptyList();
        public static final Map<String, Object> RUNTIME_MAPPINGS = emptyMap();
        public static final QueryBuilder QUERY = null;
        public static final List<MetricsAggregationBuilder<?, ?>> AGGS = emptyList();
        public static final GridAggregation GRID_AGG = GridAggregation.GEOTILE;
        public static final int GRID_PRECISION = 8;
        public static final GridType GRID_TYPE = GridType.GRID;