tilemaker icon indicating copy to clipboard operation
tilemaker copied to clipboard

Reduce differences between official OpenMapTiles tiles and Tilemaker implementation

Open Nakaner opened this issue 1 year ago • 3 comments

This pull request reduces the differences between official OpenMapTiles tiles as served by MapTiler (the schema documentation lacks details, therefore I inspected their tiles) and the implementation of Tilemaker.

Changes:

  • Add missing features classes to layer landcover (natural=dune, natural=bare_rock/scree/scrub/shrubbery/tundra).
  • Add missing features to layer place (place=province/borough/quarter/island/isolated_dwelling).
  • Add support for place=island mapped as polygons.
  • Add attribute subclass for railway features, set correct attribute `class.
  • Do not write railway features to layer transportation_name.
  • Refactor layers transportation_name, transportation_name_mid, transportation_name_detail.
  • Do not write roads without names or reference number to layer transportation_name.
  • Do not write unnamed ferries to layer transportation_name.
  • Set correct minzoom values for all roads in the transportation and transportation_name layer.
  • Add highway=raceway.
  • Fix handling of roads under construction.
  • Do not set attribute mtb_scale if the tag is not set on the OSM way.
  • Add aerialways to layer transportation.
  • Do not set attribute expressway if the tag is missing.
  • Add areas for pedestrians and platforms to layer transportation.
  • Add man_made=bridge to layer transportation.

Some of the bugs were found by a client using a fork of the schema.

Nakaner avatar Feb 23 '24 16:02 Nakaner

I am curious about the licensing situation here. From what I see, OpenMapTiles development in the official repo has stopped (let's call it OMT 1.x) and now MapTiler is pushing into their private fork of it (let's call it OMT 2.x).

In my understanding, this PR is essentially reverse engineering some changes from OMT 2.x and includes those back into OMT 1.x, but wired inside this repo.

But doing this might be entirely legal, depending on the license. Which is something I really don't know.

So the big questions is if MapTiler pulled a Mapbox here, or we are still allowed to somehow include the changes.

hyperknot avatar Feb 26 '24 20:02 hyperknot

@Nakaner: This is great, thank you. I'll take more of a look at it shortly but very happy to see this.

@hyperknot: I don't particularly follow what OpenMapTiles is doing so I'll believe you on the development direction. My reading is that the reasonably bare-bones implementation of the schema that we provide is unlikely to be copyrightable: we are essentially just stuffing OSM tags into some fairly obvious layers with minimal additional processing. We simply don't do the more complex stuff that they do and which is more likely to attract copyright protection.

But OMT are of course aware that tilemaker exists and includes this implementation, and I'm sure they'd be in contact if they had an issue with it.

In the medium term, I envisage that we might move to Shortbread as the "endorsed" tilemaker schema and perhaps provide some tooling around extending it.

systemed avatar Feb 26 '24 20:02 systemed

@hyperknot I did not know which versions of OpenMapTiles exist at all. I found the sparse documentation that lacks many details. I had a client asking for these tiles. I produced the tiles with Tilemaker, they reported incompatibilities. I looked into the implementation and it answered some questions/confirmed some complaints. But the implementation was so difficult to read that I ended up looking in some vector tiles served by Maptiler (i.e. I reverse engineered it).

There are still a few differences left:

  • the place ranking mentioned by @systemed
  • usage of route relations for transportation_name layer
  • unsure: disputed boundaries (I did not bother)

Nakaner avatar Feb 26 '24 21:02 Nakaner

Thank you!

systemed avatar Apr 02 '24 09:04 systemed