Ticket #3446 (closed defect: fixed)
JOSM throws an XML parsing error when opening an OSM file with a <bound> element
| Reported by: | avar | Owned by: | team |
|---|---|---|---|
| Priority: | major | Component: | Core |
| Version: | latest | Keywords: | |
| Cc: |
Description
An OSM file produced by osmosis that begins like this can't be opened by JOSM:
<?xml version='1.0' encoding='UTF-8'?> <osm version="0.6" generator="Osmosis 0.31.1"> <bound box="47.90714,7.67395,48.07441,8.01453" origin="http://www.openstreetmap.org/api/0.6"/> <node [...]
If you remove the <bound> element it loads just fine.
JOSM should just ignore the <bound> element and continue parsing.
Attachments
Change History
comment:2 follow-up: ↓ 3 Changed 2 years ago by Gubaer
- Status changed from new to closed
- Resolution set to fixed
Not sure whether this is really a defect. I'd prefer JOSM to be more restrictive about the data it loads and <bounds> is not a "standard" OSM tag. On the other hand, there are probably no "standard" OSM tags. There's not formal spec for an OSM file or is there?
Instead of throwing an exception JOSM now logs a warning.
comment:3 in reply to: ↑ 2 Changed 2 years ago by framm
Replying to Gubaer:
Not sure whether this is really a defect. I'd prefer JOSM to be more restrictive about the data it loads and <bounds> is not a "standard" OSM tag. On the other hand, there are probably no "standard" OSM tags. There's not formal spec for an OSM file or is there?
Instead of throwing an exception JOSM now logs a warning.
I would say that something which is written out by Osmosis comes pretty close to being a "standard" tag. Whenever someone cuts an area out of an OSM file it will have this tag.



(In [2092]) see #3446: JOSM throws an XML parsing error when opening an OSM file with a <bound> element