diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..2cde3d69 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Michael Barry and FlatMap contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/NOTICE.md b/NOTICE.md new file mode 100644 index 00000000..da37e3df --- /dev/null +++ b/NOTICE.md @@ -0,0 +1,57 @@ +## Licenses + +FlatMap licensed under MIT license. + +Copyright 2021 Michael Barry and FlatMap Contributors. + +The `flatmap-core` module includes the following software: + +- Maven Dependencies: + - Jackson for JSON/XML handling (Apache license) + - Prometheus JVM Client (Apache license) + - SLF4j (MIT license) + - log4j (Apache license) + - org.locationtech.jts:jts-core (Eclipse Distribution License) + - org.geotools:gt-shapefile (LGPL) + - org.geotools:gt-epsg-hsql + (LGPL, [BSD for HSQL](https://github.com/geotools/geotools/blob/main/licenses/HSQL.md) + , [EPSG](https://github.com/geotools/geotools/blob/main/licenses/EPSG.md)) + - org.mapdb:mapdb (Apache license) + - org.msgpack:msgpack-core (Apache license) + - org.xerial:sqlite-jdbc (Apache license) +- Adapted code: + - `DouglasPeuckerSimplifier` from [JTS](https://github.com/locationtech/jts) (EDL) + - `OsmMultipolygon` from [imposm3](https://github.com/omniscale/imposm3) (Apache license) + - `TiledGeometry` from [geojson-vt](https://github.com/mapbox/geojson-vt) (ISC license) + - `VectorTileEncoder` + from [java-vector-tile](https://github.com/ElectronicChartCentre/java-vector-tile) (Apache + license) + - `Imposm3Parsers` from [imposm3](https://github.com/omniscale/imposm3) (Apache license) + +Additionally, the `flatmap-openmaptiles` module is a Java port +of [OpenMapTiles](https://github.com/openmaptiles/openmaptiles): + +- Maven Dependencies: + - org.yaml:snakeyaml (Apache license) + - org.commonmark:commonmark (BSD 2-clause license) + - com.ibm.icu:icu4j ([ICU license](https://github.com/unicode-org/icu/blob/main/icu4c/LICENSE)) +- Code adapted from OpenMapTiles (BSD 3-Clause License): + - `generated` package generated from OpenMapTiles + - All code in `layers` package ported from OpenMapTiles + - `LanguageUtils` ported from OpenMapTiles +- Schema + - The cartography and visual design features of the map tile schema are licensed + under [CC-BY 4.0](http://creativecommons.org/licenses/by/4.0/). Products or services using maps + derived from OpenMapTiles schema need to visibly credit "OpenMapTiles.org" or reference + "OpenMapTiles" with a link to http://openmaptiles.org/. More + details [here](https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md#design-license-cc-by-40) + +## Data + +|source | license | used as default | included in repo | +|-------|---------|-----------------|------------------| +| OpenStreetMap (OSM) data | [ODBL](https://www.openstreetmap.org/copyright) | yes | yes +| Natural Earth | [public domain](https://www.naturalearthdata.com/about/terms-of-use/) | yes | yes +| OSM Lakelines | [MIT](https://github.com/lukasmartinelli/osm-lakelines), data from OSM [ODBL](https://www.openstreetmap.org/copyright) | yes | no +| OSM Water Polygons | [acknowledgement](https://osmdata.openstreetmap.de/info/license.html), data from OSM [ODBL](https://www.openstreetmap.org/copyright) | yes | no +| Wikidata name translations | [CCO](https://www.wikidata.org/wiki/Wikidata:Licensing) | no | no diff --git a/core/src/main/java/com/onthegomap/flatmap/Imposm3Parsers.java b/core/src/main/java/com/onthegomap/flatmap/Imposm3Parsers.java new file mode 100644 index 00000000..6201dcdb --- /dev/null +++ b/core/src/main/java/com/onthegomap/flatmap/Imposm3Parsers.java @@ -0,0 +1,84 @@ +/***************************************************************** + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ****************************************************************/ +package com.onthegomap.flatmap; + +import com.carrotsearch.hppc.ObjectIntMap; +import com.graphhopper.coll.GHObjectIntHashMap; +import java.util.Map; +import java.util.Set; + +/** + * This class is ported to Java from https://github.com/omniscale/imposm3/blob/master/mapping/columns.go + */ +public class Imposm3Parsers { + + private static String string(Object object) { + return object == null ? null : object.toString(); + } + + private static final ObjectIntMap defaultRank = new GHObjectIntHashMap<>(); + + static { + defaultRank.put("minor", 3); + defaultRank.put("road", 3); + defaultRank.put("unclassified", 3); + defaultRank.put("residential", 3); + defaultRank.put("tertiary_link", 3); + defaultRank.put("tertiary", 4); + defaultRank.put("secondary_link", 3); + defaultRank.put("secondary", 5); + defaultRank.put("primary_link", 3); + defaultRank.put("primary", 6); + defaultRank.put("trunk_link", 3); + defaultRank.put("trunk", 8); + defaultRank.put("motorway_link", 3); + defaultRank.put("motorway", 9); + } + + public static int wayzorder(Map tags) { + long z = Parse.parseLong(tags.get("layer")) * 10 + + defaultRank.getOrDefault( + string(tags.get("highway")), + tags.containsKey("railway") ? 7 : 0 + ) + + (boolInt(tags.get("tunnel")) * -10L) + + (boolInt(tags.get("bridge")) * 10L); + return Math.abs(z) < 10_000 ? (int) z : 0; + } + + private static final Set forwardDirections = Set.of("1", "yes", "true"); + + public static int direction(Object string) { + if (string == null) { + return 0; + } else if (forwardDirections.contains(string(string))) { + return 1; + } else if ("-1".equals(string)) { + return -1; + } else { + return 0; + } + } + + private static final Set booleanFalseValues = Set.of("", "0", "false", "no"); + + public static boolean bool(Object tag) { + return !(tag == null || booleanFalseValues.contains(tag.toString())); + } + + public static int boolInt(Object tag) { + return bool(tag) ? 1 : 0; + } + +} diff --git a/core/src/main/java/com/onthegomap/flatmap/Parse.java b/core/src/main/java/com/onthegomap/flatmap/Parse.java index 8c711d28..1a3ff32e 100644 --- a/core/src/main/java/com/onthegomap/flatmap/Parse.java +++ b/core/src/main/java/com/onthegomap/flatmap/Parse.java @@ -1,9 +1,6 @@ package com.onthegomap.flatmap; -import com.carrotsearch.hppc.ObjectIntMap; -import com.graphhopper.coll.GHObjectIntHashMap; import java.util.Map; -import java.util.Set; import java.util.regex.Pattern; public class Parse { @@ -52,62 +49,20 @@ public class Parse { } } - private static final Set booleanFalseValues = Set.of("", "0", "false", "no"); - public static boolean bool(Object tag) { - return !(tag == null || booleanFalseValues.contains(tag.toString())); + return Imposm3Parsers.bool(tag); } public static int boolInt(Object tag) { - return bool(tag) ? 1 : 0; + return Imposm3Parsers.boolInt(tag); } - private static final Set forwardDirections = Set.of("1", "yes", "true"); - - public static int direction(Object string) { - if (string == null) { - return 0; - } else if (forwardDirections.contains(string(string))) { - return 1; - } else if ("-1".equals(string)) { - return -1; - } else { - return 0; - } - } - - private static final ObjectIntMap defaultRank = new GHObjectIntHashMap<>(); - - static { - defaultRank.put("minor", 3); - defaultRank.put("road", 3); - defaultRank.put("unclassified", 3); - defaultRank.put("residential", 3); - defaultRank.put("tertiary_link", 3); - defaultRank.put("tertiary", 4); - defaultRank.put("secondary_link", 3); - defaultRank.put("secondary", 5); - defaultRank.put("primary_link", 3); - defaultRank.put("primary", 6); - defaultRank.put("trunk_link", 3); - defaultRank.put("trunk", 8); - defaultRank.put("motorway_link", 3); - defaultRank.put("motorway", 9); - } - - private static String string(Object object) { - return object == null ? null : object.toString(); + public static int direction(Object input) { + return Imposm3Parsers.direction(input); } public static int wayzorder(Map tags) { - long z = Parse.parseLong(tags.get("layer")) * 10 + - defaultRank.getOrDefault( - string(tags.get("highway")), - tags.containsKey("railway") ? 7 : 0 - ) + - (Parse.boolInt(tags.get("tunnel")) * -10L) + - (Parse.boolInt(tags.get("bridge")) * 10L); - return Math.abs(z) < 10_000 ? (int) z : 0; + return Imposm3Parsers.wayzorder(tags); } public static Double parseDoubleOrNull(Object value) { diff --git a/core/src/main/java/com/onthegomap/flatmap/read/OsmInputFile.java b/core/src/main/java/com/onthegomap/flatmap/read/OsmInputFile.java index 4072bd0c..0374a571 100644 --- a/core/src/main/java/com/onthegomap/flatmap/read/OsmInputFile.java +++ b/core/src/main/java/com/onthegomap/flatmap/read/OsmInputFile.java @@ -36,19 +36,20 @@ public class OsmInputFile implements BoundsProvider, OsmSource { @Override public Envelope getBounds() { try (var input = Files.newInputStream(path)) { + // https://wiki.openstreetmap.org/wiki/PBF_Format var dataInput = new DataInputStream(input); int headerSize = dataInput.readInt(); - if (headerSize > 65536) { - throw new FileFormatException("Unexpectedly long header 65536 bytes. Possibly corrupt file " + path); + if (headerSize > 64 * 1024) { + throw new FileFormatException("Header longer than 64 KiB: " + path); } byte[] buf = dataInput.readNBytes(headerSize); BlobHeader header = BlobHeader.parseFrom(buf); if (!header.getType().equals("OSMHeader")) { - throw new IllegalArgumentException("Expecting OSMHeader got " + header.getType()); + throw new IllegalArgumentException("Expecting OSMHeader got " + header.getType() + " in " + path); } buf = dataInput.readNBytes(header.getDatasize()); Blob blob = Blob.parseFrom(buf); - ByteString data = null; + ByteString data; if (blob.hasRaw()) { data = blob.getRaw(); } else if (blob.hasZlibData()) { @@ -58,6 +59,8 @@ public class OsmInputFile implements BoundsProvider, OsmSource { decompresser.inflate(buf2); decompresser.end(); data = ByteString.copyFrom(buf2); + } else { + throw new FileFormatException("Header does not have raw or zlib data"); } HeaderBlock headerblock = HeaderBlock.parseFrom(data); HeaderBBox bbox = headerblock.getBbox(); @@ -68,7 +71,7 @@ public class OsmInputFile implements BoundsProvider, OsmSource { bbox.getTop() / 1e9 ); } catch (IOException | DataFormatException e) { - throw new RuntimeException(e); + throw new IllegalArgumentException(e); } } diff --git a/core/src/main/java/com/onthegomap/flatmap/render/TiledGeometry.java b/core/src/main/java/com/onthegomap/flatmap/render/TiledGeometry.java index ba40eab5..d733ed3b 100644 --- a/core/src/main/java/com/onthegomap/flatmap/render/TiledGeometry.java +++ b/core/src/main/java/com/onthegomap/flatmap/render/TiledGeometry.java @@ -1,16 +1,19 @@ /* - * ISC License - *

- * Copyright (c) 2015, Mapbox - *

- * Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby - * granted, provided that the above copyright notice and this permission notice appear in all copies. - *

- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. +ISC License + +Copyright (c) 2015, Mapbox + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. */ package com.onthegomap.flatmap.render; diff --git a/core/src/main/java/com/onthegomap/flatmap/write/Mbtiles.java b/core/src/main/java/com/onthegomap/flatmap/write/Mbtiles.java index cdfdcdb8..685c0251 100644 --- a/core/src/main/java/com/onthegomap/flatmap/write/Mbtiles.java +++ b/core/src/main/java/com/onthegomap/flatmap/write/Mbtiles.java @@ -35,6 +35,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sqlite.SQLiteConfig; +/** + * Implements the MBTiles specification defined in: https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md + */ public final class Mbtiles implements Closeable { // https://www.sqlite.org/src/artifact?ci=trunk&filename=magic.txt diff --git a/core/src/main/resources/vector_tile.proto b/core/src/main/resources/vector_tile.proto index f128e24b..14c48047 100644 --- a/core/src/main/resources/vector_tile.proto +++ b/core/src/main/resources/vector_tile.proto @@ -1,3 +1,4 @@ +// From https://github.com/mapbox/vector-tile-spec/blob/master/2.1/vector_tile.proto syntax = "proto2"; package vector_tile; diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/Generate.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/Generate.java index ea9128ae..f54f9507 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/Generate.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/Generate.java @@ -165,11 +165,50 @@ public class Generate { emitTableDefinitions(tables, packageName, output); } + private static String GENERATED_FILE_HEADER = """ + /* + Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. + All rights reserved. + + Code license: BSD 3-Clause License + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + Design license: CC-BY 4.0 + + See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage + */ + // AUTOGENERATED BY Generate.java -- DO NOT MODIFY + """; + private static void emitTableDefinitions(Map tables, String packageName, Path output) throws IOException { StringBuilder tablesClass = new StringBuilder(); tablesClass.append(""" - // AUTOGENERATED BY Generate.java -- DO NOT MODIFY + %s package %s; import static com.onthegomap.flatmap.openmaptiles.Expression.*; @@ -197,7 +236,7 @@ public class Generate { public interface RowHandler { void process(T element, FeatureCollector features); } - """.formatted(packageName)); + """.formatted(GENERATED_FILE_HEADER, packageName)); List classNames = new ArrayList<>(); Map fieldNameToType = new TreeMap<>(); @@ -369,7 +408,7 @@ public class Generate { throws IOException { StringBuilder schemaClass = new StringBuilder(); schemaClass.append(""" - // AUTOGENERATED BY Generate.java -- DO NOT MODIFY + %s package %s; import static com.onthegomap.flatmap.openmaptiles.Expression.*; @@ -396,6 +435,7 @@ public class Generate { } """ .formatted( + GENERATED_FILE_HEADER, packageName, quote(info.name), quote(info.description), diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/LanguageUtils.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/LanguageUtils.java index 70eed8fe..99bae91f 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/LanguageUtils.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/LanguageUtils.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles; import static com.onthegomap.flatmap.openmaptiles.Utils.coalesce; diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/generated/OpenMapTilesSchema.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/generated/OpenMapTilesSchema.java index ce381269..289f95c5 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/generated/OpenMapTilesSchema.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/generated/OpenMapTilesSchema.java @@ -1,4 +1,40 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ // AUTOGENERATED BY Generate.java -- DO NOT MODIFY + package com.onthegomap.flatmap.openmaptiles.generated; import static com.onthegomap.flatmap.openmaptiles.Expression.FALSE; diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/generated/Tables.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/generated/Tables.java index 31e7b789..da1b4be0 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/generated/Tables.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/generated/Tables.java @@ -1,4 +1,40 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ // AUTOGENERATED BY Generate.java -- DO NOT MODIFY + package com.onthegomap.flatmap.openmaptiles.generated; import static com.onthegomap.flatmap.openmaptiles.Expression.*; diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/AerodromeLabel.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/AerodromeLabel.java index 609c8812..add96faa 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/AerodromeLabel.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/AerodromeLabel.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage + */ package com.onthegomap.flatmap.openmaptiles.layers; import static com.onthegomap.flatmap.openmaptiles.Utils.nullIfEmpty; @@ -12,6 +47,9 @@ import com.onthegomap.flatmap.openmaptiles.Utils; import com.onthegomap.flatmap.openmaptiles.generated.OpenMapTilesSchema; import com.onthegomap.flatmap.openmaptiles.generated.Tables; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/aerodrome_label + */ public class AerodromeLabel implements OpenMapTilesSchema.AerodromeLabel, Tables.OsmAerodromeLabelPoint.Handler { private final MultiExpression.MultiExpressionIndex classLookup; diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Aeroway.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Aeroway.java index cb383fd2..f5d61136 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Aeroway.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Aeroway.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import com.onthegomap.flatmap.Arguments; @@ -7,6 +42,9 @@ import com.onthegomap.flatmap.monitoring.Stats; import com.onthegomap.flatmap.openmaptiles.generated.OpenMapTilesSchema; import com.onthegomap.flatmap.openmaptiles.generated.Tables; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/aeroway + */ public class Aeroway implements OpenMapTilesSchema.Aeroway, Tables.OsmAerowayLinestring.Handler, Tables.OsmAerowayPolygon.Handler, Tables.OsmAerowayPoint.Handler { diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Boundary.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Boundary.java index 70be92a4..437b04d0 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Boundary.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Boundary.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import static java.util.stream.Collectors.counting; @@ -42,6 +77,9 @@ import org.locationtech.jts.operation.polygonize.Polygonizer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/boundary + */ public class Boundary implements OpenMapTilesSchema.Boundary, OpenMapTilesProfile.NaturalEarthProcessor, @@ -115,8 +153,9 @@ public class Boundary implements @Override public List preprocessOsmRelation(ReaderRelation relation) { - String typeTag = relation.getTag("type"); - if ("boundary".equals(typeTag) && relation.hasTag("admin_level") && relation.hasTag("boundary", "administrative")) { + if (relation.hasTag("type", "boundary") && + relation.hasTag("admin_level") && + relation.hasTag("boundary", "administrative")) { Integer adminLevelValue = Parse.parseIntSubstring(relation.getTag("admin_level")); String code = relation.getTag("ISO3166-1:alpha3"); if (adminLevelValue != null && adminLevelValue >= 2 && adminLevelValue <= 10) { diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Building.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Building.java index 481646e7..b87932ef 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Building.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Building.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import static com.onthegomap.flatmap.Parse.parseDoubleOrNull; @@ -20,6 +55,9 @@ import java.util.List; import java.util.Locale; import java.util.Map; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/building + */ public class Building implements OpenMapTilesSchema.Building, Tables.OsmBuildingPolygon.Handler, OpenMapTilesProfile.FeaturePostProcessor, diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Housenumber.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Housenumber.java index 928acea4..c280fcfe 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Housenumber.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Housenumber.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import com.onthegomap.flatmap.Arguments; @@ -7,6 +42,9 @@ import com.onthegomap.flatmap.monitoring.Stats; import com.onthegomap.flatmap.openmaptiles.generated.OpenMapTilesSchema; import com.onthegomap.flatmap.openmaptiles.generated.Tables; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/housenumber + */ public class Housenumber implements OpenMapTilesSchema.Housenumber, Tables.OsmHousenumberPoint.Handler { public Housenumber(Translations translations, Arguments args, Stats stats) { diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Landcover.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Landcover.java index 819e8c87..cba7066a 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Landcover.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Landcover.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import com.onthegomap.flatmap.Arguments; @@ -18,6 +53,9 @@ import java.util.List; import java.util.Map; import java.util.Set; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/landcover + */ public class Landcover implements OpenMapTilesSchema.Landcover, OpenMapTilesProfile.NaturalEarthProcessor, diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Landuse.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Landuse.java index 998330b6..7dc4ceb7 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Landuse.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Landuse.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import static com.onthegomap.flatmap.openmaptiles.Utils.coalesce; @@ -16,6 +51,9 @@ import com.onthegomap.flatmap.openmaptiles.generated.Tables; import java.util.Map; import java.util.Set; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/landuse + */ public class Landuse implements OpenMapTilesSchema.Landuse, OpenMapTilesProfile.NaturalEarthProcessor, diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/MountainPeak.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/MountainPeak.java index 025fcf73..4c15971d 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/MountainPeak.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/MountainPeak.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import static com.onthegomap.flatmap.openmaptiles.Utils.elevationTags; @@ -17,6 +52,9 @@ import com.onthegomap.flatmap.openmaptiles.generated.OpenMapTilesSchema; import com.onthegomap.flatmap.openmaptiles.generated.Tables; import java.util.List; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/mountain_peak + */ public class MountainPeak implements OpenMapTilesSchema.MountainPeak, Tables.OsmPeakPoint.Handler, diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Park.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Park.java index 98994273..62ff1ea5 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Park.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Park.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import static com.onthegomap.flatmap.collections.FeatureGroup.Z_ORDER_BITS; @@ -24,6 +59,9 @@ import java.util.Locale; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/park + */ public class Park implements OpenMapTilesSchema.Park, Tables.OsmParkPolygon.Handler, diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Place.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Place.java index 175c2397..e07e3263 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Place.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Place.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import static com.onthegomap.flatmap.collections.FeatureGroup.Z_ORDER_BITS; @@ -40,6 +75,9 @@ import org.locationtech.jts.geom.Point; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/place + */ public class Place implements OpenMapTilesSchema.Place, OpenMapTilesProfile.NaturalEarthProcessor, diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Poi.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Poi.java index 960f690a..e400ef22 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Poi.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Poi.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import static com.onthegomap.flatmap.openmaptiles.Utils.coalesce; @@ -23,6 +58,9 @@ import com.onthegomap.flatmap.openmaptiles.generated.Tables; import java.util.List; import java.util.Map; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/poi + */ public class Poi implements OpenMapTilesSchema.Poi, Tables.OsmPoiPoint.Handler, Tables.OsmPoiPolygon.Handler, diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Transportation.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Transportation.java index 11a3a334..a0d5c677 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Transportation.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Transportation.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import static com.onthegomap.flatmap.openmaptiles.Utils.*; @@ -22,6 +57,9 @@ import org.locationtech.jts.geom.LineString; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/transportation + */ public class Transportation implements OpenMapTilesSchema.Transportation, Tables.OsmAerialwayLinestring.Handler, diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/TransportationName.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/TransportationName.java index 72658c3f..2daa02f8 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/TransportationName.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/TransportationName.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import static com.onthegomap.flatmap.openmaptiles.Utils.brunnel; @@ -41,6 +76,9 @@ import org.locationtech.jts.geom.prep.PreparedGeometryFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/transportation_name + */ public class TransportationName implements OpenMapTilesSchema.TransportationName, Tables.OsmHighwayLinestring.Handler, diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Water.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Water.java index 4e3d9c91..b3dcc0e6 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Water.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Water.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import com.onthegomap.flatmap.Arguments; @@ -11,6 +46,9 @@ import com.onthegomap.flatmap.openmaptiles.Utils; import com.onthegomap.flatmap.openmaptiles.generated.OpenMapTilesSchema; import com.onthegomap.flatmap.openmaptiles.generated.Tables; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/water + */ public class Water implements OpenMapTilesSchema.Water, Tables.OsmWaterPolygon.Handler, OpenMapTilesProfile.NaturalEarthProcessor, OpenMapTilesProfile.OsmWaterPolygonProcessor { diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/WaterName.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/WaterName.java index 0465736c..ff337eca 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/WaterName.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/WaterName.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import static com.onthegomap.flatmap.openmaptiles.Utils.nullIfEmpty; @@ -22,6 +57,9 @@ import org.locationtech.jts.geom.Geometry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/water_name + */ public class WaterName implements OpenMapTilesSchema.WaterName, Tables.OsmMarinePoint.Handler, Tables.OsmWaterPolygon.Handler, diff --git a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Waterway.java b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Waterway.java index b0bb8b09..4a4273c2 100644 --- a/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Waterway.java +++ b/openmaptiles/src/main/java/com/onthegomap/flatmap/openmaptiles/layers/Waterway.java @@ -1,3 +1,38 @@ +/* +Copyright (c) 2016, KlokanTech.com & OpenMapTiles contributors. +All rights reserved. + +Code license: BSD 3-Clause License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Design license: CC-BY 4.0 + +See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage +*/ package com.onthegomap.flatmap.openmaptiles.layers; import static com.onthegomap.flatmap.openmaptiles.Utils.nullIfEmpty; @@ -19,6 +54,9 @@ import com.onthegomap.flatmap.openmaptiles.generated.Tables; import java.util.List; import java.util.Map; +/** + * This class is ported to Java from https://github.com/openmaptiles/openmaptiles/tree/master/layers/waterway + */ public class Waterway implements OpenMapTilesSchema.Waterway, Tables.OsmWaterwayLinestring.Handler, OpenMapTilesProfile.FeaturePostProcessor, OpenMapTilesProfile.NaturalEarthProcessor {