Opened 4 weeks ago
Closed 3 weeks ago
#24930 closed defect (fixed)
Imagery list: Custom HTTP Headers missing in GeoJSON
| Reported by: | DerSeegurke | Owned by: | DerSeegurke |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Trac | Version: | |
| Keywords: | Cc: |
Description
I just noticed that custom-http-header tags are missing in https://josm.openstreetmap.de/maps?format=geojson whereas they are present in the XML version.
It would be nice if you could add that to the conversion, as some layers won't work e.g. in Vespucci without them.
Attachments (0)
Change History (4)
comment:1 by , 4 weeks ago
comment:2 by , 4 weeks ago
For the ELI it's defined as a single object containing header-name and header-value: https://github.com/osmlab/editor-layer-index/blob/gh-pages/schema.json#L225-L237
However, in contrast to the description of that field, I don't see how this schema would allow it to be specified multiple times as that is undefined in JSON. It looks like it has been copied from the JOSM documentation without realizing that this won't work: https://github.com/osmlab/editor-layer-index/pull/815
Vespucci also has a comment, that only one header is supported: https://github.com/MarcusWolschon/osmeditor4android/blob/master/src/main/java/de/blau/android/resources/eli/Eli.java#L289-L297 As far as I can tell from a quick browsing through their repo, this code seems to be used to parse the JOSM list as well.
The proper solution would of course be to modify the schema to use an array of header-name/header-value objects and modify all consuming software to handle that correctly.
As a first step, I guess it's sufficient to convert only the first tag according the ELI schema. I could not find an entry having more than one custom header, so that would at least cover all existing sources. Maybe we could add a warning about this limitation in the documentation of the JOSM list.
comment:3 by , 4 weeks ago
| Owner: | changed from to |
|---|---|
| Status: | new → needinfo |
I've added the output. Please check if it is correct.
comment:4 by , 3 weeks ago
| Resolution: | → fixed |
|---|---|
| Status: | needinfo → closed |
Looks good to me and it gets correctly picked up by Vespucci.
Thank you very much!



That's because that's not defined for GeoJSON as far as I know. I can certainly add it, question would be: How?
Keep in mind it can appear multiple times.