Add support for reading JOSM files
JOSM produces files with a dialect (info here: https://wiki.openstreetmap.org/wiki/JOSM_file_format)
It would be good if the XML parser was able to read those files.
Feel free to use this test file I've created for OSM2World to test reading JOSM files. I believe it contains most or all the ways in which JOSM XML is different from standard OSM XML:
- Deleted, modified and newly created elements (and therefore action attributes and missing metadata)
- Multiple bounds
- Bounds with origin
- Negative ids
- Root element with upload attribute
Ideally, the result would be that deleted elements would not be part of the result, while other elements would be.
I'm not sure if there's a canonical way of handling multiple bounds – I'm currently calculating the union of the bounds, but that will still incorrect results with some use cases (such as coastline calculations).