mirror of
https://github.com/cfpwastaken/planetiler-openmaptiles.git
synced 2026-02-04 12:31:10 +00:00
Make planetiler-openmaptiles runnable as a standalone project (#19)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package com.onthegomap.planetiler.openmaptiles;
|
||||
package org.openmaptiles;
|
||||
|
||||
import static com.onthegomap.planetiler.expression.Expression.*;
|
||||
import static java.util.stream.Collectors.joining;
|
||||
@@ -161,9 +161,9 @@ public class Generate {
|
||||
tables.putAll(layer.tables);
|
||||
}
|
||||
|
||||
String packageName = "com.onthegomap.planetiler.openmaptiles.generated";
|
||||
String packageName = "org.openmaptiles.generated";
|
||||
String[] packageParts = packageName.split("\\.");
|
||||
Path output = Path.of("planetiler-openmaptiles", "src", "main", "java")
|
||||
Path output = Path.of("src", "main", "java")
|
||||
.resolve(Path.of(packageParts[0], Arrays.copyOfRange(packageParts, 1, packageParts.length)));
|
||||
|
||||
FileUtils.deleteDirectory(output);
|
||||
@@ -188,7 +188,7 @@ public class Generate {
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.expression.MultiExpression;
|
||||
import com.onthegomap.planetiler.openmaptiles.Layer;
|
||||
import org.openmaptiles.Layer;
|
||||
import com.onthegomap.planetiler.util.Translations;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -225,7 +225,7 @@ public class Generate {
|
||||
info.languages.stream().map(Format::quote).collect(joining(", ")),
|
||||
layers.stream()
|
||||
.map(
|
||||
l -> "new com.onthegomap.planetiler.openmaptiles.layers.%s(translations, config, stats)"
|
||||
l -> "new org.openmaptiles.layers.%s(translations, config, stats)"
|
||||
.formatted(lowerUnderscoreToUpperCamel(l.layer.id)))
|
||||
.collect(joining("," + LINE_SEPARATOR))
|
||||
.indent(6).trim()
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.onthegomap.planetiler.openmaptiles;
|
||||
package org.openmaptiles;
|
||||
|
||||
import com.onthegomap.planetiler.ForwardingProfile;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.onthegomap.planetiler.openmaptiles;
|
||||
package org.openmaptiles;
|
||||
|
||||
import com.onthegomap.planetiler.Planetiler;
|
||||
import com.onthegomap.planetiler.config.Arguments;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import java.nio.file.Path;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
|
||||
/**
|
||||
* Main entrypoint for generating a map using the OpenMapTiles schema.
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.onthegomap.planetiler.openmaptiles;
|
||||
package org.openmaptiles;
|
||||
|
||||
import static com.onthegomap.planetiler.geo.GeoUtils.EMPTY_LINE;
|
||||
import static com.onthegomap.planetiler.geo.GeoUtils.EMPTY_POINT;
|
||||
@@ -10,10 +10,6 @@ import com.onthegomap.planetiler.Planetiler;
|
||||
import com.onthegomap.planetiler.Profile;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.expression.MultiExpression;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.openmaptiles.layers.Transportation;
|
||||
import com.onthegomap.planetiler.openmaptiles.layers.TransportationName;
|
||||
import com.onthegomap.planetiler.reader.SimpleFeature;
|
||||
import com.onthegomap.planetiler.reader.SourceFeature;
|
||||
import com.onthegomap.planetiler.reader.osm.OsmElement;
|
||||
@@ -21,6 +17,10 @@ import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.Translations;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
import org.openmaptiles.layers.Transportation;
|
||||
import org.openmaptiles.layers.TransportationName;
|
||||
|
||||
/**
|
||||
* Delegates the logic for generating a map to individual implementations in the {@code layers} package.
|
||||
@@ -35,17 +35,20 @@ See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for deta
|
||||
*/
|
||||
// AUTOGENERATED BY Generate.java -- DO NOT MODIFY
|
||||
|
||||
package com.onthegomap.planetiler.openmaptiles.generated;
|
||||
package org.openmaptiles.generated;
|
||||
|
||||
import static com.onthegomap.planetiler.expression.Expression.*;
|
||||
import static com.onthegomap.planetiler.expression.Expression.FALSE;
|
||||
import static com.onthegomap.planetiler.expression.Expression.and;
|
||||
import static com.onthegomap.planetiler.expression.Expression.matchAny;
|
||||
import static com.onthegomap.planetiler.expression.Expression.or;
|
||||
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.expression.MultiExpression;
|
||||
import com.onthegomap.planetiler.openmaptiles.Layer;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.Translations;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import org.openmaptiles.Layer;
|
||||
|
||||
/**
|
||||
* All vector tile layer definitions, attributes, and allowed values generated from the
|
||||
@@ -68,22 +71,22 @@ public class OpenMapTilesSchema {
|
||||
/** Returns a list of expected layer implementation instances from the {@code layers} package. */
|
||||
public static List<Layer> createInstances(Translations translations, PlanetilerConfig config, Stats stats) {
|
||||
return List.of(
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.Water(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.Waterway(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.Landcover(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.Landuse(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.MountainPeak(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.Park(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.Boundary(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.Aeroway(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.Transportation(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.Building(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.WaterName(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.TransportationName(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.Place(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.Housenumber(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.Poi(translations, config, stats),
|
||||
new com.onthegomap.planetiler.openmaptiles.layers.AerodromeLabel(translations, config, stats)
|
||||
new org.openmaptiles.layers.Water(translations, config, stats),
|
||||
new org.openmaptiles.layers.Waterway(translations, config, stats),
|
||||
new org.openmaptiles.layers.Landcover(translations, config, stats),
|
||||
new org.openmaptiles.layers.Landuse(translations, config, stats),
|
||||
new org.openmaptiles.layers.MountainPeak(translations, config, stats),
|
||||
new org.openmaptiles.layers.Park(translations, config, stats),
|
||||
new org.openmaptiles.layers.Boundary(translations, config, stats),
|
||||
new org.openmaptiles.layers.Aeroway(translations, config, stats),
|
||||
new org.openmaptiles.layers.Transportation(translations, config, stats),
|
||||
new org.openmaptiles.layers.Building(translations, config, stats),
|
||||
new org.openmaptiles.layers.WaterName(translations, config, stats),
|
||||
new org.openmaptiles.layers.TransportationName(translations, config, stats),
|
||||
new org.openmaptiles.layers.Place(translations, config, stats),
|
||||
new org.openmaptiles.layers.Housenumber(translations, config, stats),
|
||||
new org.openmaptiles.layers.Poi(translations, config, stats),
|
||||
new org.openmaptiles.layers.AerodromeLabel(translations, config, stats)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for deta
|
||||
*/
|
||||
// AUTOGENERATED BY Generate.java -- DO NOT MODIFY
|
||||
|
||||
package com.onthegomap.planetiler.openmaptiles.generated;
|
||||
package org.openmaptiles.generated;
|
||||
|
||||
import static com.onthegomap.planetiler.expression.Expression.*;
|
||||
|
||||
@@ -33,20 +33,20 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty;
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullOrEmpty;
|
||||
import static org.openmaptiles.util.Utils.nullIfEmpty;
|
||||
import static org.openmaptiles.util.Utils.nullOrEmpty;
|
||||
|
||||
import com.onthegomap.planetiler.FeatureCollector;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.expression.MultiExpression;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.openmaptiles.util.OmtLanguageUtils;
|
||||
import com.onthegomap.planetiler.openmaptiles.util.Utils;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.Translations;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
import org.openmaptiles.util.OmtLanguageUtils;
|
||||
import org.openmaptiles.util.Utils;
|
||||
|
||||
/**
|
||||
* Defines the logic for generating map elements in the {@code aerodrome_label} layer from source features.
|
||||
@@ -33,14 +33,14 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import com.onthegomap.planetiler.FeatureCollector;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.Translations;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
|
||||
/**
|
||||
* Defines the logic for generating map elements in the {@code aeroway} layer from source features.
|
||||
@@ -33,7 +33,7 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import static com.onthegomap.planetiler.util.MemoryEstimator.CLASS_HEADER_BYTES;
|
||||
import static com.onthegomap.planetiler.util.MemoryEstimator.POINTER_BYTES;
|
||||
@@ -49,8 +49,6 @@ import com.onthegomap.planetiler.collection.Hppc;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.geo.GeoUtils;
|
||||
import com.onthegomap.planetiler.geo.GeometryException;
|
||||
import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.reader.SimpleFeature;
|
||||
import com.onthegomap.planetiler.reader.SourceFeature;
|
||||
import com.onthegomap.planetiler.reader.osm.OsmElement;
|
||||
@@ -79,6 +77,8 @@ import org.locationtech.jts.geom.prep.PreparedGeometry;
|
||||
import org.locationtech.jts.geom.prep.PreparedGeometryFactory;
|
||||
import org.locationtech.jts.operation.linemerge.LineMerger;
|
||||
import org.locationtech.jts.operation.polygonize.Polygonizer;
|
||||
import org.openmaptiles.OpenMapTilesProfile;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -33,21 +33,18 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.coalesce;
|
||||
import static com.onthegomap.planetiler.util.MemoryEstimator.CLASS_HEADER_BYTES;
|
||||
import static com.onthegomap.planetiler.util.Parse.parseDoubleOrNull;
|
||||
import static java.util.Map.entry;
|
||||
import static org.openmaptiles.util.Utils.coalesce;
|
||||
|
||||
import com.onthegomap.planetiler.FeatureCollector;
|
||||
import com.onthegomap.planetiler.FeatureMerge;
|
||||
import com.onthegomap.planetiler.VectorTile;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.geo.GeometryException;
|
||||
import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.reader.osm.OsmElement;
|
||||
import com.onthegomap.planetiler.reader.osm.OsmRelationInfo;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
@@ -56,6 +53,9 @@ import com.onthegomap.planetiler.util.Translations;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import org.openmaptiles.OpenMapTilesProfile;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
|
||||
/**
|
||||
* Defines the logic for generating map elements for buildings in the {@code building} layer from source features.
|
||||
@@ -33,14 +33,14 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import com.onthegomap.planetiler.FeatureCollector;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.Translations;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
|
||||
/**
|
||||
* Defines the logic for generating map elements in the {@code housenumber} layer from source features.
|
||||
@@ -33,7 +33,7 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import com.onthegomap.planetiler.FeatureCollector;
|
||||
import com.onthegomap.planetiler.FeatureMerge;
|
||||
@@ -41,9 +41,6 @@ import com.onthegomap.planetiler.VectorTile;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.expression.MultiExpression;
|
||||
import com.onthegomap.planetiler.geo.GeometryException;
|
||||
import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.reader.SourceFeature;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.Translations;
|
||||
@@ -52,6 +49,9 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.openmaptiles.OpenMapTilesProfile;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
|
||||
/**
|
||||
* Defines the logic for generating map elements for natural land cover polygons like ice, sand, and forest in the
|
||||
@@ -33,16 +33,13 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.coalesce;
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty;
|
||||
import static org.openmaptiles.util.Utils.coalesce;
|
||||
import static org.openmaptiles.util.Utils.nullIfEmpty;
|
||||
|
||||
import com.onthegomap.planetiler.FeatureCollector;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.reader.SourceFeature;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.Parse;
|
||||
@@ -50,6 +47,9 @@ import com.onthegomap.planetiler.util.Translations;
|
||||
import com.onthegomap.planetiler.util.ZoomFunction;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.openmaptiles.OpenMapTilesProfile;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
|
||||
/**
|
||||
* Defines the logic for generating map elements for man-made land use polygons like cemeteries, zoos, and hospitals in
|
||||
@@ -33,10 +33,10 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.elevationTags;
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty;
|
||||
import static org.openmaptiles.util.Utils.elevationTags;
|
||||
import static org.openmaptiles.util.Utils.nullIfEmpty;
|
||||
|
||||
import com.carrotsearch.hppc.LongIntMap;
|
||||
import com.onthegomap.planetiler.FeatureCollector;
|
||||
@@ -44,10 +44,6 @@ import com.onthegomap.planetiler.VectorTile;
|
||||
import com.onthegomap.planetiler.collection.Hppc;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.geo.GeometryException;
|
||||
import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.openmaptiles.util.OmtLanguageUtils;
|
||||
import com.onthegomap.planetiler.reader.SourceFeature;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.Parse;
|
||||
@@ -58,6 +54,10 @@ import org.locationtech.jts.geom.Geometry;
|
||||
import org.locationtech.jts.geom.Point;
|
||||
import org.locationtech.jts.geom.prep.PreparedGeometry;
|
||||
import org.locationtech.jts.geom.prep.PreparedGeometryFactory;
|
||||
import org.openmaptiles.OpenMapTilesProfile;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
import org.openmaptiles.util.OmtLanguageUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -33,11 +33,11 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import static com.onthegomap.planetiler.collection.FeatureGroup.SORT_KEY_BITS;
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.coalesce;
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty;
|
||||
import static org.openmaptiles.util.Utils.coalesce;
|
||||
import static org.openmaptiles.util.Utils.nullIfEmpty;
|
||||
|
||||
import com.carrotsearch.hppc.LongIntMap;
|
||||
import com.onthegomap.planetiler.FeatureCollector;
|
||||
@@ -48,15 +48,15 @@ import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.geo.GeoUtils;
|
||||
import com.onthegomap.planetiler.geo.GeometryException;
|
||||
import com.onthegomap.planetiler.geo.GeometryType;
|
||||
import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.openmaptiles.util.OmtLanguageUtils;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.SortKey;
|
||||
import com.onthegomap.planetiler.util.Translations;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import org.openmaptiles.OpenMapTilesProfile;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
import org.openmaptiles.util.OmtLanguageUtils;
|
||||
|
||||
/**
|
||||
* Defines the logic for generating map elements for designated parks polygons and their label points in the {@code
|
||||
@@ -33,12 +33,12 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import static com.onthegomap.planetiler.collection.FeatureGroup.SORT_KEY_BITS;
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.coalesce;
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty;
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullOrEmpty;
|
||||
import static org.openmaptiles.util.Utils.coalesce;
|
||||
import static org.openmaptiles.util.Utils.nullIfEmpty;
|
||||
import static org.openmaptiles.util.Utils.nullOrEmpty;
|
||||
|
||||
import com.carrotsearch.hppc.LongIntMap;
|
||||
import com.onthegomap.planetiler.FeatureCollector;
|
||||
@@ -49,10 +49,6 @@ import com.onthegomap.planetiler.geo.GeoUtils;
|
||||
import com.onthegomap.planetiler.geo.GeometryException;
|
||||
import com.onthegomap.planetiler.geo.PointIndex;
|
||||
import com.onthegomap.planetiler.geo.PolygonIndex;
|
||||
import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.openmaptiles.util.OmtLanguageUtils;
|
||||
import com.onthegomap.planetiler.reader.SourceFeature;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.Parse;
|
||||
@@ -71,6 +67,10 @@ import java.util.stream.DoubleStream;
|
||||
import java.util.stream.Stream;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.locationtech.jts.geom.Point;
|
||||
import org.openmaptiles.OpenMapTilesProfile;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
import org.openmaptiles.util.OmtLanguageUtils;
|
||||
|
||||
/**
|
||||
* Defines the logic for generating label points for populated places like continents, countries, cities, and towns in
|
||||
@@ -33,13 +33,13 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.coalesce;
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty;
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfLong;
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullOrEmpty;
|
||||
import static java.util.Map.entry;
|
||||
import static org.openmaptiles.util.Utils.coalesce;
|
||||
import static org.openmaptiles.util.Utils.nullIfEmpty;
|
||||
import static org.openmaptiles.util.Utils.nullIfLong;
|
||||
import static org.openmaptiles.util.Utils.nullOrEmpty;
|
||||
|
||||
import com.carrotsearch.hppc.LongIntMap;
|
||||
import com.onthegomap.planetiler.FeatureCollector;
|
||||
@@ -48,14 +48,14 @@ import com.onthegomap.planetiler.VectorTile;
|
||||
import com.onthegomap.planetiler.collection.Hppc;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.expression.MultiExpression;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.openmaptiles.util.OmtLanguageUtils;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.Parse;
|
||||
import com.onthegomap.planetiler.util.Translations;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
import org.openmaptiles.util.OmtLanguageUtils;
|
||||
|
||||
/**
|
||||
* Defines the logic for generating map elements for things like shops, parks, and schools in the {@code poi} layer from
|
||||
@@ -33,13 +33,13 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.*;
|
||||
import static com.onthegomap.planetiler.util.MemoryEstimator.CLASS_HEADER_BYTES;
|
||||
import static com.onthegomap.planetiler.util.MemoryEstimator.POINTER_BYTES;
|
||||
import static com.onthegomap.planetiler.util.MemoryEstimator.estimateSize;
|
||||
import static java.util.Map.entry;
|
||||
import static org.openmaptiles.util.Utils.*;
|
||||
|
||||
import com.onthegomap.planetiler.FeatureCollector;
|
||||
import com.onthegomap.planetiler.FeatureMerge;
|
||||
@@ -48,9 +48,6 @@ import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.expression.MultiExpression;
|
||||
import com.onthegomap.planetiler.geo.GeoUtils;
|
||||
import com.onthegomap.planetiler.geo.GeometryException;
|
||||
import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.reader.SourceFeature;
|
||||
import com.onthegomap.planetiler.reader.osm.OsmElement;
|
||||
import com.onthegomap.planetiler.reader.osm.OsmReader;
|
||||
@@ -73,6 +70,9 @@ import org.locationtech.jts.geom.Geometry;
|
||||
import org.locationtech.jts.geom.LineString;
|
||||
import org.locationtech.jts.geom.prep.PreparedGeometry;
|
||||
import org.locationtech.jts.geom.prep.PreparedGeometryFactory;
|
||||
import org.openmaptiles.OpenMapTilesProfile;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -33,12 +33,12 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import static com.onthegomap.planetiler.openmaptiles.layers.Transportation.highwayClass;
|
||||
import static com.onthegomap.planetiler.openmaptiles.layers.Transportation.highwaySubclass;
|
||||
import static com.onthegomap.planetiler.openmaptiles.layers.Transportation.isFootwayOrSteps;
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.*;
|
||||
import static org.openmaptiles.layers.Transportation.highwayClass;
|
||||
import static org.openmaptiles.layers.Transportation.highwaySubclass;
|
||||
import static org.openmaptiles.layers.Transportation.isFootwayOrSteps;
|
||||
import static org.openmaptiles.util.Utils.*;
|
||||
|
||||
import com.carrotsearch.hppc.LongArrayList;
|
||||
import com.carrotsearch.hppc.LongByteMap;
|
||||
@@ -50,10 +50,6 @@ import com.onthegomap.planetiler.ForwardingProfile;
|
||||
import com.onthegomap.planetiler.VectorTile;
|
||||
import com.onthegomap.planetiler.collection.Hppc;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.openmaptiles.util.OmtLanguageUtils;
|
||||
import com.onthegomap.planetiler.reader.osm.OsmElement;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.Parse;
|
||||
@@ -64,6 +60,10 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import org.openmaptiles.OpenMapTilesProfile;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
import org.openmaptiles.util.OmtLanguageUtils;
|
||||
|
||||
/**
|
||||
* Defines the logic for generating map elements for road, shipway, rail, and path names in the {@code
|
||||
@@ -33,7 +33,7 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import com.onthegomap.planetiler.FeatureCollector;
|
||||
import com.onthegomap.planetiler.FeatureMerge;
|
||||
@@ -42,14 +42,14 @@ import com.onthegomap.planetiler.VectorTile;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.expression.MultiExpression;
|
||||
import com.onthegomap.planetiler.geo.GeometryException;
|
||||
import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.openmaptiles.util.Utils;
|
||||
import com.onthegomap.planetiler.reader.SourceFeature;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.Translations;
|
||||
import java.util.List;
|
||||
import org.openmaptiles.OpenMapTilesProfile;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
import org.openmaptiles.util.Utils;
|
||||
|
||||
/**
|
||||
* Defines the logic for generating map elements for oceans and lakes in the {@code water} layer from source features.
|
||||
@@ -33,9 +33,9 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty;
|
||||
import static org.openmaptiles.util.Utils.nullIfEmpty;
|
||||
|
||||
import com.carrotsearch.hppc.LongObjectMap;
|
||||
import com.onthegomap.planetiler.FeatureCollector;
|
||||
@@ -43,10 +43,6 @@ import com.onthegomap.planetiler.collection.Hppc;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.geo.GeoUtils;
|
||||
import com.onthegomap.planetiler.geo.GeometryException;
|
||||
import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.openmaptiles.util.OmtLanguageUtils;
|
||||
import com.onthegomap.planetiler.reader.SourceFeature;
|
||||
import com.onthegomap.planetiler.stats.Stats;
|
||||
import com.onthegomap.planetiler.util.Parse;
|
||||
@@ -54,6 +50,10 @@ import com.onthegomap.planetiler.util.Translations;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentSkipListMap;
|
||||
import org.locationtech.jts.geom.Geometry;
|
||||
import org.openmaptiles.OpenMapTilesProfile;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
import org.openmaptiles.util.OmtLanguageUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -33,9 +33,9 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.layers;
|
||||
package org.openmaptiles.layers;
|
||||
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty;
|
||||
import static org.openmaptiles.util.Utils.nullIfEmpty;
|
||||
|
||||
import com.carrotsearch.hppc.LongObjectHashMap;
|
||||
import com.google.common.util.concurrent.AtomicDouble;
|
||||
@@ -45,11 +45,6 @@ import com.onthegomap.planetiler.VectorTile;
|
||||
import com.onthegomap.planetiler.collection.Hppc;
|
||||
import com.onthegomap.planetiler.config.PlanetilerConfig;
|
||||
import com.onthegomap.planetiler.geo.GeometryException;
|
||||
import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import com.onthegomap.planetiler.openmaptiles.generated.Tables;
|
||||
import com.onthegomap.planetiler.openmaptiles.util.OmtLanguageUtils;
|
||||
import com.onthegomap.planetiler.openmaptiles.util.Utils;
|
||||
import com.onthegomap.planetiler.reader.SourceFeature;
|
||||
import com.onthegomap.planetiler.reader.osm.OsmElement;
|
||||
import com.onthegomap.planetiler.reader.osm.OsmReader;
|
||||
@@ -59,6 +54,11 @@ import com.onthegomap.planetiler.util.Translations;
|
||||
import com.onthegomap.planetiler.util.ZoomFunction;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.openmaptiles.OpenMapTilesProfile;
|
||||
import org.openmaptiles.generated.OpenMapTilesSchema;
|
||||
import org.openmaptiles.generated.Tables;
|
||||
import org.openmaptiles.util.OmtLanguageUtils;
|
||||
import org.openmaptiles.util.Utils;
|
||||
|
||||
/**
|
||||
* Defines the logic for generating river map elements in the {@code waterway} layer from source features.
|
||||
@@ -33,10 +33,10 @@ Design license: CC-BY 4.0
|
||||
|
||||
See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage
|
||||
*/
|
||||
package com.onthegomap.planetiler.openmaptiles.util;
|
||||
package org.openmaptiles.util;
|
||||
|
||||
import static com.onthegomap.planetiler.openmaptiles.util.Utils.coalesce;
|
||||
import static com.onthegomap.planetiler.util.LanguageUtils.*;
|
||||
import static org.openmaptiles.util.Utils.coalesce;
|
||||
|
||||
import com.onthegomap.planetiler.util.LanguageUtils;
|
||||
import com.onthegomap.planetiler.util.Translations;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.onthegomap.planetiler.openmaptiles.util;
|
||||
package org.openmaptiles.util;
|
||||
|
||||
import com.onthegomap.planetiler.util.Parse;
|
||||
import java.util.Map;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.onthegomap.planetiler.openmaptiles.util;
|
||||
package org.openmaptiles.util;
|
||||
|
||||
import com.onthegomap.planetiler.mbtiles.Mbtiles;
|
||||
import com.onthegomap.planetiler.mbtiles.Verify;
|
||||
Reference in New Issue
Block a user