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/test/java/org/elasticsearch/xpack/vectortile/rest/VectorTileRequestTests.java
public void testFieldFetch() throws IOException {
        final String fetchField = randomAlphaOfLength(10);
        assertRestRequest(
            (builder) -> { builder.field(SearchSourceBuilder.FETCH_FIELDS_FIELD.getPreferredName(), new String[] { fetchField }); },
            (vectorTileRequest) -> {
                assertThat(vectorTileRequest.getFieldAndFormats(), Matchers.iterableWithSize(1));
                assertThat(vectorTileRequest.getFieldAndFormats().get(0).field, Matchers.equalTo(fetchField));
            }
        );
    }
    public void testFieldGridAgg() throws IOException {
        final GridAggregation grid_agg = RandomPicks.randomFrom(random(), GridAggregation.values());
        assertRestRequest(
            (builder) -> { builder.field(VectorTileRequest.GRID_AGG_FIELD.getPreferredName(), grid_agg.name()); },
            (vectorTileRequest) -> { assertThat(vectorTileRequest.getGridAgg(), Matchers.equalTo(grid_agg)); }
        );
    }
    public void testFieldGridType() throws IOException {
        final GridType grid_type = RandomPicks.randomFrom(random(), GridType.values());
        assertRestRequest(
            (builder) -> { builder.field(VectorTileRequest.GRID_TYPE_FIELD.getPreferredName(), grid_type.name()); },
            (vectorTileRequest) -> { assertThat(vectorTileRequest.getGridType(), Matchers.equalTo(grid_type)); }
        );
    }
    public void testFieldGridPrecision() throws IOException {
        final int grid_precision = randomIntBetween(1, 8);
        assertRestRequest(
            (builder) -> { builder.field(VectorTileRequest.GRID_PRECISION_FIELD.getPreferredName(), grid_precision); },
            (vectorTileRequest) -> { assertThat(vectorTileRequest.getGridPrecision(), Matchers.equalTo(grid_precision)); }
        );