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

[BUG] Empty output when pbf file does not contain bounds #240

Closed
msbarry opened this issue May 30, 2022 · 3 comments · Fixed by #251
Closed

[BUG] Empty output when pbf file does not contain bounds #240

msbarry opened this issue May 30, 2022 · 3 comments · Fixed by #251
Assignees
Labels
bug Something isn't working

Comments

@msbarry
Copy link
Contributor

msbarry commented May 30, 2022

Describe the bug
When planetiler processes a .osm.pbf file where bounds is not set (for example ones from http://download.openstreetmap.fr/extracts/) the output mbtiles file is empty.

To Reproduce
Steps to reproduce the behavior:

./quickstart-from-source.sh bermuda --osm-url=http://download.openstreetmap.fr/extracts/north-america/bermuda-latest.osm.pbf

In the logs you can see:

0:00:06 INF - Setting map bounds from input: Env[0.0 : 0.0, 0.0 : 0.0]

Expected behavior
This should either:

  1. fail fast with an error explaining the issue (require you to specify --bounds=...)
  2. default to planet bounds (will use 10-20gb of disk for oceans)
  3. or read all nodes in the input file to determine bounds
❯ osmium fileinfo ./data/sources/bermuda.osm.pbf                                                                              
File:
  Name: ./data/sources/bermuda.osm.pbf
  Format: PBF
  Compression: none
  Size: 1918338
Header:
  Bounding boxes:
  With history: no
  Options:
    generator=pyosmium-up-to-date/3.1.3
    osmosis_replication_base_url=http://download.openstreetmap.fr/replication/./north-america/bermuda/minute
    osmosis_replication_sequence_number=5078653
    osmosis_replication_timestamp=2022-05-29T01:19:29Z
    pbf_dense_nodes=true
    timestamp=2022-05-29T01:19:29Z
@msbarry msbarry added the bug Something isn't working label May 30, 2022
@farfromrefug
Copy link
Contributor

@msbarry about 2. You mean temporary disk usage? not mbtiles usage. I understand that it will "load" the whole planet oceans right?

@msbarry
Copy link
Contributor Author

msbarry commented May 30, 2022

For #2 the output mbtiles file will contain 10-20gb of ocean polygons since there's no bounding box to limit processing from the water polygon shapefile.

I'm leaning toward #3 - log a warning if osm.pbf bounds are empty and --bounds param is not specified then parse all of the nodes in the pbf file to determine the bounds. That should only take a few seconds to a minute, even on the planet.

@farfromrefug
Copy link
Contributor

@msbarry ok so yes i agree 3 seems best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants