osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.64k stars 1.01k forks source link

Do not populate name from ref when opening POI editing while offline #14051

Closed OsmMUC closed 1 year ago

OsmMUC commented 2 years ago

When opening the edit dialogue for POIs that typically don't have a name but a "ref" tag while the device is offline, the name field gets populated from the ref field. This requires manual intervention to remove the name again before uploading, or if missed during editing results in objects that are usually not named (fire hydrants, street cabinets, ...) getting a name that duplicates the ref value.

How to reproduce?

Open the edit dialogue for a POI that has no name in OSM but a ref value while the device is offline. The name field, empty/not populated in the database, will be populated in the edit dialogue with the value taken from the ref field.

Your Environment

OsmAnd Version: OsmAnd+ 4.1.11 / OsmAnd 4.0.8 / OsmAnd 4.1.1 ( iOS) Android/iOS version: 7.0 and 9 / 5.1.1 / iOS 15.4.1 Device model: Sony Xperia L1 and Samsung Galaxy Tab S2 / Samsung Galaxy Note 10.1 2014 / iPhone 7

Maps used (online or offline):
If you have an issue related to offline maps, tell us the exact name of the map file where the issue occurs and its edition date.

vshcherb commented 2 years ago

Could you please give a link to that point? I'm afraid in some situations that will be difficult to implement OFFLINE and it requires to check what's stored inside OBF whether the ref was migrated during map creation process or later

OsmMUC commented 2 years ago

Here a fire hydrant, a power substation, a public telephone, and an aerialway pylon, respectively:

https://www.openstreetmap.org/node/1819896437 https://www.openstreetmap.org/node/8149703975 https://www.openstreetmap.org/node/809213540 https://www.openstreetmap.org/node/278226649

Note that the behavior is as expected while the device is online. I.e. when opening the edit dialog while online, the name field remains empty.

scaidermern commented 2 years ago

Can confirm. The ref value appears in the name field when editing with flight mode enabled. Strange.

vshcherb commented 2 years ago

@scaidermern it's not strange this is how it's stored in OBF, the issue to make rendering consistent, so the rendering style is not overcomplicated mostly due to mapping inconsistencies some people put data in the 'name' or 'ref' tags. Though we will investigate whether it could be changed in future.

scaidermern commented 2 years ago

@scaidermern it's not strange this is how it's stored in OBF, the issue to make rendering consistent, so the rendering style is not overcomplicated mostly due to mapping inconsistencies some people put data in the 'name' or 'ref' tags.

I see. Thanks for the clarification!

xmd5a2 commented 2 years ago

@vshcherb I can't confirm that this is OBF file issue https://www.openstreetmap.org/node/1819896437

emergency_infrastructure: fire_hydrant 2068 Lat 48.140465 Lon 11.525613 osmid=1819896437  fire_hydrant_position_sidewalk='sidewalk' fire_hydrant_type_underground='underground' ref='2068' fire_hydrant_diameter='400'
dmpr0 commented 1 year ago

Ways with ref in name, have the same issue? https://www.openstreetmap.org/way/4603579

Context menu Internet: On Internet: Off
vshcherb commented 1 year ago

Looks like we also need to ignore this https://github.com/osmandapp/OsmAnd-resources/blob/master/poi/poi_types.xml#L2304

vshcherb commented 1 year ago

rwn_ref, icn_ref need to be fixed. Template as XXX_ref

Zirochkabila commented 1 year ago

OsmAnd~ 4.4.0#14139mqta, released: 2023-01-31 Done