Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
package org.elasticsearch.common.geo;
import org.elasticsearch.search.aggregations.bucket.geogrid.GeoTileUtils;
import java.util.List;
import java.util.Locale;
import java.util.function.Function;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* A facade for SimpleFeatureFactory that converts it into FormatterFactory for use in GeoPointFieldMapper
*/
public class SimpleVectorTileFormatter implements GeoFormatterFactory.FormatterFactory {
public static final String MVT = "mvt";
public static final int DEFAULT_EXTENT = 4096;
public static final int DEFAULT_BUFFER_PIXELS = 5;
public static final String EXTENT_PREFIX = "@";
public static final String BUFFER_PREFIX = ":";
// we expect either z/x/y or z/x/y@extent or z/x/y@extent:buffer or z/x/y:buffer
private static final Pattern pattern = Pattern.compile("(\\d+)/(\\d+)/(\\d+)(" + EXTENT_PREFIX + "\\d+)?(" + BUFFER_PREFIX + "\\d+)?");
@Override
public String getName() {
return MVT;
}
@Override
public Function, List