systemed / tilemaker

Make OpenStreetMap vector tiles without the stack
https://tilemaker.org/
Other
1.44k stars 229 forks source link

Ocean Tiles Incomplete #739

Open CarmeloCoy opened 1 month ago

CarmeloCoy commented 1 month ago

Hello,

Firstly, thanks this wonderful tile generation tool!

I am generating a map and in the ocean layer I have some incomplete tiles, for example:

image

I have created the following minimal configuration to reproduce the issue:

  1. Download OSM data for Canarias Islands:
if ! [ -f "canary-islands-latest.osm.pbf" ]; then
  curl -SfO http://download.geofabrik.de/africa/canary-islands-latest.osm.pbf
fi
  1. Download OSM Water Polygons and unzip it:
if ! [ -f "water-polygons-split-4326.zip" ]; then
  curl -SfO https://osmdata.openstreetmap.de/download/water-polygons-split-4326.zip
fi

mkdir -p coastline
unzip -o -d coastline -j water-polygons-split-4326.zip
  1. Minimal config file:
{
    "layers": {
        "water":  { "minzoom": 0,  "maxzoom": 8},
        "ocean": { "minzoom": 0,  "maxzoom": 8, "source": "/data/coastline/water_polygons.shp", "write_to": "water" }
    },
    "settings": {
        "minzoom": 0,
        "maxzoom": 8,
        "basezoom": 8,
        "include_ids": false,
        "combine_below": 8,
        "name": "Coastline",
        "version": "3.0",
        "description": "Coastline, low-resolution",
        "compress": "gzip",
        "filemetadata": {
            "tilejson": "2.0.0", 
            "scheme": "xyz", 
            "type": "baselayer", 
            "format": "pbf", 
            "tiles": ["https://example.com/canary/{z}/{x}/{y}.pbf"]
        }
    }
}
  1. Minimal lua file:
-- Enter/exit Tilemaker
function init_function()
end
function exit_function()
end

node_keys = {}
function node_function()
end

function way_function()
end

function attribute_function(attr,layer)
    if layer=="ocean" then
        return { class="ocean" }
    else
        return attr
    end
end
  1. Generate tiles using latest docker image:
docker run -it --rm -v $(pwd):/data ghcr.io/systemed/tilemaker:master --config /data/config-coastline.json --process /data/process-coastline.lua --bbox '-19.4957,26.9898,-12.5084,29.9684' --input /data/canary-islands-latest.osm.pbf --output /data/canary-islands-latest.pmtiles
  1. Inspecting the result with https://pmtiles.io/:

image