Closed edward17829991 closed 2 years ago
Hello Edward! Thank you for reporting this!
You're right, in input mode, it deliberately ignores --boundary-box
option, tries to read <bounds>
tag from input XML, and obviously may fail. 🥲
Your fix seems quite reasonable. Do you want to make a pull request? Or I can fix it.
Hi @enzet ,
Thanks for your fast response! Since it's a quick fix, you can fix it directly.
Overall, this is a great project and tool, it's quite flexible and hustle-free with custom xml files. I just stumbled upon this few days ago on the open-street-map wiki about rendering, and I got great result quite easily. Thank you and the community.
Edward Chen
@edward17829991
Yeah, and I definitely should review usage of other options as well. In some cases they are conflicting.
Thank you for your interest! It's nice to hear the project is useful. Please, feel free to tell me if you have any suggestions on how to improve it.
https://github.com/enzet/map-machine/blob/014e11b826d9aff2fa0e4a54b886654e42d70a7a/map_machine/slippy/tile.py#L477
When I tried
map-machine tile --input test.osm.xml --boundary-box 121.462,24.963,121.667,25.198 --zoom 16
The program complains aboutAttributeError: 'NoneType' object has no attribute 'get_left_top'
I looked at the source code a bit, noticed that when in "--input"-specified branch, --boundary-box was never been ingested. The original code set the
view_box
only by thebound
elements in the input XML files. But as stated in Generate a set of tiles, the--boundary-box
argument should override other sources.I've temporary fixed the problem by setting the view_box from arguments prior then XMLs.
Edward Chen