Modify

Opened 5 months ago

Closed 4 months ago

Last modified 3 weeks ago

#18302 closed enhancement (fixed)

support national taginfo instances

Reported by: Klumbumbus Owned by: Don-vip
Priority: normal Milestone: 19.12
Component: Core Version:
Keywords: taginfo Cc:

Description (last modified by Klumbumbus)

Additional to the global taginfo page https://taginfo.openstreetmap.org/ there are national instances too, see osmwiki:Taginfo/Sites. It would be a nice feature if the context menu of a tag would support these too. I guess we would need to manually maintain the list of working (and regulary updated) instances with their base URL and match it with our internal boundaries.osm file.
If you right click an tag then JOSM needs to check if it is inside of a boundary with a national taginfo instance and if so then display a second link, e.g. "Go to Taginfo UK"


Attachments (2)

taginfo.png (11.3 KB) - added by Klumbumbus 5 months ago.
18302.png (2.2 KB) - added by Don-vip 4 months ago.

Download all attachments as: .zip

Change History (36)

Changed 5 months ago by Klumbumbus

Attachment: taginfo.png added

comment:1 Changed 5 months ago by Klumbumbus

Description: modified (diff)

comment:2 Changed 5 months ago by Klumbumbus

Description: modified (diff)

comment:3 Changed 4 months ago by Don-vip

Owner: changed from team to Don-vip
Status: newassigned

comment:4 Changed 4 months ago by Don-vip

Milestone: 19.11

comment:5 Changed 4 months ago by Don-vip

Milestone: 19.1119.12

comment:6 Changed 4 months ago by Don-vip

In 15564/josm:

see #18302 - cleanup boundaries file

comment:7 Changed 4 months ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 15565/josm:

fix #18302 - support national taginfo instances

comment:8 Changed 4 months ago by stoecker

Are you sure that REPLACING the taginfo with a national variant is right? I'd ADD the national one as a second option.

comment:9 Changed 4 months ago by Don-vip

In 15566/josm:

see #18302 - fix boundaries file broken in r15564

comment:10 in reply to:  8 ; Changed 4 months ago by Don-vip

Replying to stoecker:

Are you sure that REPLACING the taginfo with a national variant is right? I'd ADD the national one as a second option.

I didn't replace the instance but added all possible instances:


Last edited 4 months ago by Don-vip (previous) (diff)

Changed 4 months ago by Don-vip

Attachment: 18302.png added

comment:11 Changed 4 months ago by Don-vip

In 15569/josm:

see #18302 - fix NPE in unit tests

comment:12 in reply to:  10 Changed 4 months ago by stoecker

Replying to Don-vip:

Replying to stoecker:

Are you sure that REPLACING the taginfo with a national variant is right? I'd ADD the national one as a second option.

I didn't replace the instance but added all possible instances:


Well, now that I checked the code it was obvious on first view. Sometimes it seems I loose my ability to read code for some time. :-(

comment:13 in reply to:  7 Changed 4 months ago by Klumbumbus

Replying to Don-vip:

In 15565/josm:

fix #18302 - support national taginfo instances

Great. I think we should remove Sweden though. The data is 4 years old, see top right on http://se.taginfo.openstreetmap.se/. This doens't really represent the current tagging situation in sweden anymore.

Last edited 4 months ago by Klumbumbus (previous) (diff)

comment:14 Changed 4 months ago by Don-vip

In 15572/josm:

see #18302 - remove outdated taginfo instance from Sweden

comment:15 Changed 4 months ago by Don-vip

In 15589/josm:

see #18302 - spotbugs - SIC_INNER_SHOULD_BE_STATIC

comment:16 Changed 3 months ago by Don-vip

Geofabrik now provides one Taginfo instance per extract: https://twitter.com/HermioneNight/status/1213850596589080576

comment:17 Changed 3 months ago by Klumbumbus

So, should we add all these to boundaries.osm?

comment:18 Changed 3 months ago by Don-vip

It's not official yet, Frederik should send me an e-mail with more details soon.

comment:19 Changed 3 months ago by simon04

In 15669/josm:

see #18302 - PropertiesDialog: avoid intermediate list creation

comment:20 Changed 6 weeks ago by Don-vip

Frederik just made a new version of GeoFabrik json index:
http://download.geofabrik.de/index-v1-nogeom.json

It contains links to their regional Taginfo instances with ISO3166 ids so that we can map them with our internal boundaries.

I've set up a remote link on JOSM website:
https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json

comment:21 Changed 6 weeks ago by Don-vip

In 15876/josm:

fix #18729, see #18302 - support regional taginfo instances from Geofabrik

comment:22 Changed 6 weeks ago by simon04

Awesome, great work, Vincent and Frederik, thank you so much!

comment:23 in reply to:  20 ; Changed 5 weeks ago by simon04

Replying to Don-vip:

I've set up a remote link on JOSM website:
https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json

Vincent, can you enable gzip compression? Currently, the 416 kB file is transmitted w/o compression:

2020-02-22 23:11:29.643 INFO: GET https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json -> HTTP/1.1 200 (56 ms; 416 kB)
2020-02-22 23:11:29.644 FINE: RESPONSE: {Keep-Alive=[timeout=5, max=99], null=[HTTP/1.1 200 OK], Server=[Apache/2.4.29 (Ubuntu)], Connection=[Keep-Alive], Last-Modified=[Sat, 22 Feb 2020 04:55:02 GMT], Date=[Sat, 22 Feb 2020 22:11:29 GMT], Accept-Ranges=[bytes], Strict-Transport-Security=[max-age=16070400; includeSubDomains], ETag=["6815e-59f22f0dedd7e"], Content-Length=[426334], Age=[178], X-Clacks-Overhead=[GNU Terry Pratchett], Content-Type=[application/json]}

comment:24 Changed 5 weeks ago by Klumbumbus

Another little problem is the translation. Currently the country code and "Geofabrik" from #18729 is added to the end of the string. E.g. for german that should be in the midlle of the string instead as the verb is at the end of that word group. Could the placeholder be integrated in the translatable string so it can be moved to the correct position in the translated string by translators?

comment:25 in reply to:  23 Changed 5 weeks ago by stoecker

Vincent, can you enable gzip compression? Currently, the 416 kB file is transmitted w/o compression:

Added JSON to the compressed file types.

comment:26 in reply to:  24 ; Changed 5 weeks ago by simon04

Replying to Klumbumbus:

Could the placeholder be integrated in the translatable string so it can be moved to the correct position in the translated string by translators?

For the 20.03 release, yes. For now I'd like to find a solution that does not introduce a new i18n string. What about tr("Go to Taginfo") + " (Geofabrik AT)"?


Replying to stoecker:

Added JSON to the compressed file types.

Nice! Now, only 23 kB are transferred. :)

comment:27 in reply to:  26 ; Changed 5 weeks ago by Klumbumbus

Replying to simon04:

For the 20.03 release, yes. For now I'd like to find a solution that does not introduce a new i18n string. What about tr("Go to Taginfo") + " (Geofabrik AT)"?

We can leave it for 20.02 as is and change it after 20.02.

Last edited 5 weeks ago by Klumbumbus (previous) (diff)

comment:28 in reply to:  27 ; Changed 5 weeks ago by stoecker

Replying to Klumbumbus:

Replying to simon04:

For the 20.03 release, yes. For now I'd like to find a solution that does not introduce a new i18n string. What about tr("Go to Taginfo") + " (Geofabrik AT)"?

We can leave it for 20.02 as is and change it after 20.02.

It should be tr("Go to Taginfo {0}", "(Geofabrik AT)"), but better would be tr("Go to Taginfo ({0} {1})", "Geofabrik", "AT"). Best is to don't assume anything about translated string.

P.S. There is no harm in adding a new tr() before the release when the current state is untranslated. No need to wait in this case.

comment:29 in reply to:  28 Changed 5 weeks ago by Klumbumbus

Replying to stoecker:

P.S. There is no harm in adding a new tr() before the release when the current state is untranslated. No need to wait in this case.

In this case the string was already translated since 2015 (for german). So it would have broken the translation for most languages.

comment:30 Changed 5 weeks ago by stoecker

With Geofabrik? Or do you refer to the plain one without additional text?

comment:31 Changed 5 weeks ago by Klumbumbus

The plain one which is still used also together with Geofabrik. See https://translations.launchpad.net/josm/trunk/+pots/josm/de/+translate?batch=2&show=all&search=taginfo

comment:32 Changed 5 weeks ago by stoecker

Well, that's illegal reuse :-) But I see your point...

comment:33 Changed 5 weeks ago by GerdP

See #18772. My fix in r15937 is probably not good enough, taginfoGeofabrikCache might contain invalid data?
Under what conditions are the invalid versions of the CachedFile overwritten / retrieved again from the server?

comment:34 Changed 3 weeks ago by simon04

In 16067/josm:

fix #18821, see #18302 - TaginfoAction: improve i18n

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.