Id: imagery_used=MAPNIK?

Created on 26 Jul 2020  路  13Comments  路  Source: openstreetmap/iD

Why have you changed from imagery_used=OpenStreetMap (Standard) to imagery_used=MAPNIK in changesets?
Mapnik is not a mapstyle, it's just a toolkit for rendering maps. The default layer is OSM Carto.

_Note that Mapnik is a map rendering toolkit, and should not be confused with any of the common map stylesheets that may use Mapnik as a foundation. One of these, OpenStreetMap Carto is used as the main map on the OSM website._
https://wiki.openstreetmap.org/wiki/Mapnik
https://wiki.openstreetmap.org/wiki/Standard_tile_layer

bug

Most helpful comment

ID is just an ID. I think we should use names because changeset tags are for humans.

The identifiers could be made human-readable too, it's not a complete trade-off. But if the names never change and are unique, then they're essentially a second set of identifiers. Can we assume this is true?

Normally I'd be worried about accessibility for non-English speakers, but most of these are proper nouns and translation is an unsolved problem with all of OSM's tags anyway.

I'm leaning towards name, it's consistent with JOSM

Yeah, thinking more about this, the fact that iD and JOSM have used the name for years is compelling enough for me. Changing this type of pattern without a good reason is never great.

All 13 comments

To my experience the contents of the imagery_used tag depends on what imagery has actually been shown during the editing session. If you enable, even shortly, an imagery source it will be appended to this tag with semi-colon multi-value semantics.
See fx. my recent editing session in Denmark that gets the local best imagery "SDFE aerial imagery" value. However, during an earlier session in the US I went through all available imagery to find the best sources which added 4 imageries.

The data/imagery.json file contains definitions of all available imagery and their coverage (there are plenty!).

I have noticed however, that sometimes there are "other not-so-pretty strings" in this tag, and a bit of digging reveals one edit of mine where it seems like the imagery "id" ("Geodatastyrelsen_Denmark") has also been added to the tag in addition to the "name" ("SDFE aerial imagery").

So maybe there is a bug in iD putting in the imagery "id" instead of "name" under certain conditions?

The correspoding imagery.json entries;

$ grep -r -C 2 MAPNIK imagery.json 
  },
  {
    "id": "MAPNIK",
    "name": "OpenStreetMap (Standard)",
    "type": "tms",
$ grep -r -C 2 SDFE\ aerial imagery.json 
  {
    "id": "Geodatastyrelsen_Denmark",
    "name": "SDFE aerial imagery",
    "type": "tms",
    "template": "https://osmtools.septima.dk/mapproxy/tiles/1.0.0/kortforsyningen_ortoforaar/EPSG3857/{zoom}/{x}/{y}.jpeg",
$ 

So maybe there is a bug in iD putting in the imagery "id" instead of "name"?

That's how it looks.
But I don't know if this is a bug or if it was changed intentionally.

Afaik iD has always used the imagery id, not the name. We are limited to 255 chars and the names are localized and can contain anything.

I found only the one example in my recent edits done using 2.18.2 which had id of one layer and name of another. Looking further back I can see only name used.

Do you see this more consistently @maro-21? I guess maro21 is you? Looking at your recent edits (all using 2.18.4) they all seem to have id in the tag.

I just made a new changeset using 2.18.4 using imagery from both Norway and Denmark: 88950156
This also has only ids in the tag; "Geodatastyrelsen_Denmark;geovekst-nib;geovekst-nib2"

$ grep -r -e geovekst-nib -e Geodatastyrelsen_Denmark -C1 imagery.json 
  {
    "id": "geovekst-nib",
    "name": "Norway Orthophoto",
--
  {
    "id": "geovekst-nib2",
    "name": "Norway Orthophoto (more recent, less zoom)",
--
  {
    "id": "Geodatastyrelsen_Denmark",
    "name": "SDFE aerial imagery",
$ 

All of the edits before iD 2.18 used name instead of id.
https://www.openstreetmap.org/changeset/88186266

So the first issue here is that the Standard default map's name isn't "Mapnik".
The second: it's not a problem using ids instead of names, but in the example from above: "Norway Orthophoto" says more than "geovekst-nib". So it would be good to use shorter names than "Norway Orthophoto (more recent, less zoom)", but "geovekst-nib2" doesn't say much.

An important aspect of the ID is, that it is not changed later and can therefore be used to reliably perform a lookup of the full dataset. Name, link to the license and such is all part of the full dataset IMO. To change/rename IDs later, ELI would IMO need a concept of a "redirect" or reference to the now new dataset/file.

I looked into this, the string is set here:

https://github.com/openstreetmap/iD/blob/c8069a58f67a8b6700c23bd15d49b269d2d1fb33/modules/renderer/background_source.js#L99-L101

So iD is supposed to be prioritizing the name for some reason and falls back to the layer ID. However, in https://github.com/openstreetmap/iD/commit/0917bc718913892b56cf2dbd5ff691190f45bc04 we changed name to _name everywhere except here, and ESLint decided not to flag it, making iD always use the ID.

We can fix this, but the question is whether we should use the name at all or only the ID. It seems like IDs are better since they're shorter and won't change as often?

Is there a standard way/guidelines on how OSM editors should mention imagery in changesets that should be followed? Would it hurt if somebody from ELI, maybe @grischard, would comment on this?

Hi! Ideally, all editors would agree to do the same thing. JOSM uses names, and I'm not sure what the others do. It depends on whether you think those tags should be machine-readable or human-readable. DWG sometimes has to machine-read them, and there's always a part of human assistance.

ID is just an ID. I think we should use names because changeset tags are for humans.
This issue is about that Mapnik is not an imagery, there isn't such on the list in iD, so if someone sees imagery_used=MAPNIK, it is not known what it is. The same with an example mention above: "geovekst-nib" instead of "Norway Orthophoto".

I'm leaning towards name, it's consistent with JOSM and generally makes it much easier for humans to quickly see what imagery was used.

ID is just an ID. I think we should use names because changeset tags are for humans.

The identifiers could be made human-readable too, it's not a complete trade-off. But if the names never change and are unique, then they're essentially a second set of identifiers. Can we assume this is true?

Normally I'd be worried about accessibility for non-English speakers, but most of these are proper nouns and translation is an unsolved problem with all of OSM's tags anyway.

I'm leaning towards name, it's consistent with JOSM

Yeah, thinking more about this, the fact that iD and JOSM have used the name for years is compelling enough for me. Changing this type of pattern without a good reason is never great.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bhousel picture bhousel  路  19Comments

ghost picture ghost  路  20Comments

simonpoole picture simonpoole  路  55Comments

Haikuch picture Haikuch  路  27Comments

hajo4 picture hajo4  路  33Comments