Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding building names to basemap profile #134

Closed
lokkelvin2 opened this issue Mar 13, 2022 · 11 comments
Closed

Adding building names to basemap profile #134

lokkelvin2 opened this issue Mar 13, 2022 · 11 comments

Comments

@lokkelvin2
Copy link

Describe the bug
The names of POI/buildings are missing using the default basemap profile.

Expected behavior
The output mbtiles should include the name tags of buildings and POIs but they are dropped.

To Reproduce

  1. Download Malaysia, Singapore, and Brunei from geofabrik
  2. Run java -Xmx1g -jar planetiler.jar --download --osm_path="malaysia-singapore-brunei-old.osm.pbf"
  3. Inspect location lat: 1.29788, lon: 103.77677

Long description
I am generating vector tiles for Singapore and have been using tilemaker prior to planetiler. Using Way 427077072 as an example, the building name in OSM is 'Ridge View Tower' and I would expect the output mbtiles to contain the same information.

In the planetiler mbtiles, however, this name field is missing. Inspecting the planetiler mbtiles using QGIS reveals that planetiler only saves housenumbers and does not save POI/building names.

Here are some screenshots describing the problem:

OSM groundtruth:
osm1
Planetiler output:
planetiler1
Tilemaker output:
tilemaker1

Is there a way I can edit the planetiler profile to match the detailed output of tilemaker/OSM ?

Environment (please complete the following information):

  • OS: Windows 10
  • Java version and distribution: [e.g. Eclipse Temurin 17.0.2]
@wipfli
Copy link
Contributor

wipfli commented Mar 13, 2022

Inspecting tiles is possible with tileserver-gl

@wipfli
Copy link
Contributor

wipfli commented Mar 13, 2022

The base profile is derived from OpenMapTiles. Is the house name in OpenMapTiles?

@wipfli
Copy link
Contributor

wipfli commented Mar 13, 2022

Here is a gist on how to add an OpenStreetMap tag to OpenMapTiles in planetiler https://gist.github.com/wipfli/02ba9081b26c3a0cfae054e5c5402fe7

@wipfli
Copy link
Contributor

wipfli commented Mar 13, 2022

I am happy to help you hack stuff together. Just ping me in the slack planetiler channel.

@wipfli
Copy link
Contributor

wipfli commented Mar 13, 2022

https://osmus-slack.herokuapp.com/ generates an invite for the slack channel. Join #planetiler once you are in #general

@lokkelvin2
Copy link
Author

lokkelvin2 commented Mar 13, 2022

The base profile is derived from OpenMapTiles. Is the house name in OpenMapTiles?

After some digging it seems that OMT does not include building names in the schema (ref: openmaptiles/openmaptiles#579 openmaptiles/openmaptiles#241). This means that the planetiler is not wrong in omitting the building names and that my tilemaker script was generating non-compliant OMT tiles 😅.

Here is a gist on how to add an OpenStreetMap tag to OpenMapTiles in planetiler https://gist.github.com/wipfli/02ba9081b26c3a0cfae054e5c5402fe7

This is excellent! Just what I needed. Maybe consider pinning this info somewhere as a I had a hard time piecing together the steps needed to modify the basemap profile to my usecase.

@wipfli
Copy link
Contributor

wipfli commented Mar 13, 2022

Nice. What would be a good place to post it? How did you find planetiler by the way?

@msbarry
Copy link
Contributor

msbarry commented Mar 13, 2022

@lokkelvin2 what layer is tilemaker putting them into? poi or building? I'm trying to keep basemap profile exactly compatible with openmaptiles, but you can add features that you opt into with a command line flag, or in a fork.

Planetiler generates the mapping code in the "generated" package from openmaptiles yaml files so to put it into poi layer you could change this line to building: [__any__] https://github.com/openmaptiles/openmaptiles/blob/b0e7f7884cc826d3176505ea840bb41f12463c75/layers/poi/mapping.yaml#L375 then regenerate from that. We're eventually planning to make the basemap profile live alongside that config and you won't need to regenerate, but for now this should work.

@lokkelvin2
Copy link
Author

Tilemaker creates poi fields for both building and landuse. Thanks to your hint, I was able to tweak OMT to get mbtiles near equal with my original Tilemaker script. I'm not entirely sure if I made the OMT yaml file correctly but it seems to output what I need so I'm happy with that.

I must say that planetiler is awesome and that the blazing speed of planetiler makes iterating through different OMT schemas rather painless.

Also, being able to edit the basemap profile without regeneration would be really useful on machines that do not have a build environment set up.

@wipfli
Copy link
Contributor

wipfli commented Mar 14, 2022

Beautiful, happy to hear that! I guess our plan is to feed planetiler with yaml files directly and get mbtiles out of it. See https://github.com/onthegomap/planetiler/projects/2#card-78768754

@wipfli
Copy link
Contributor

wipfli commented Mar 14, 2022

I also like to iterate through tiles. It is just fun...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants