vmarc / knooppuntnet

Route planner and quality assurance for walking and cycling networks in OpenStreetMap.
MIT License
31 stars 6 forks source link

Support name tag (or ref tag) for nodes #217

Closed pyrog closed 5 months ago

pyrog commented 3 years ago

Route 13331511 is part of a regional walking network (rwn). The start node La Verrerie is part of this network and tagged with rwn_name=*. The end node Fontaine des Près Bas is part of a local walking network (lwn) and tagged with lwn_name=*.

The analyser consider this route as broken because it can't find a rwn_name=* for the end note.

Map Details

Using simply the tag name=* avoid this issue, simplify editing :

See https://github.com/vmarc/knooppuntnet/issues/203#issuecomment-944921071

pyrog commented 3 years ago

Also network tag is not required for route relations. In France, a node network is a kind of "structured" local network, and multi practices (hiking, riding, mtb…).

So network is not really meaningful and using a xxn_ prefix is really painful.

pyrog commented 7 months ago

Discussed in wiki : KISS: keep it simple.

Examples:

node tag Display label
300161618 lcn_ref = 97
rcn_ref = 97
97
9558783785
lwn_name=Col de Chausseyras
name=Col de Chausseyras
natural=saddle
Col de Chausseyras
KISS tagging: node tag Display label
300161618 ref = 97 97
9558783785
name=Col de Chausseyras
natural=saddle
Col de Chausseyras

Of course, one could choose the preferred tagging 😄

In case if both tags are present, KPN choose the prefixed tag: node tag Display label
9558783785
lwn_name=Chausseyras
name=Col de Chausseyras
natural=saddle
Chausseyras
pyrog commented 7 months ago

I searched nodes with different xxn_ref, xxn_name tags (or a mix of both).

Unless I'm mistaken, there are only 26 nodes in the world, all in the city of Gent in Belgium. All have the same value for lcn_ref and rcn_reftags !

So please, handle also "simple" and standard tags : it will be easier for all people in the world, even in Belgium and Netherlands 😎

Overpass query
vmarc commented 5 months ago

In node network tagging (and in the knooppuntnet analysis logic) it is important to be able to differentiate between what kind of network we are dealing with:

and also:

For a route the documented OSM way to do this is using the "network" tag (second letter of the xxn value), for a node this is done with the second letter in the _"xxnref" tag (or variations of this tag).

In the node networks in Belgium and The Netherlands the guideposts on the ground look very different, and it makes sense to reflect this in the tagging.

A cycling map/planner shows cycling nodes, a hiking map/planner shows hiking nodes.

So, some tagging to differentiate between cycling and hiking nodes is needed. The currently documented way is to use the "xxn" values for this. Perhaps it is a bit unfortunate that this "xxn" value also contains the network "scope" (local, regional, national, international). But since it is there, checks are done to make sure that the scope of the nodes match the scope of the route.


In the knooppuntnet database there are currently 3820 nodes that are both hiking and cycling nodes. For none of these nodes the cycling node name and the hiking node name is the same.

Following mongodb query was used to find the 3820 nodes that are both hiking and cycling nodes:

[
  {
    $match: {
      $and: [
        {
          labels: {
            $eq: "active"
          }
        },
        {
          labels: {
            $eq: "network-type-hiking"
          }
        },
        {
          labels: {
            $eq: "network-type-cycling"
          }
        }
      ]
    }
  },
  {
    $count: "total"
  }
]

Extra filter to find nodes where cycling and hiking node name is the same:

  {
    $match:
      {
        "names[0].name": {
          $eq: "$names[1].name"
        }
      }
  }

Filter to find nodes where cycling and hiking node name is not the same:

  {
    $match:
      {
        "names[0].name": {
          $ne: "$names[1].name"
        }
      }
  }

All this to say that I think the "simple" and "standard" tags are not sufficient (and also not "standard") for node networks.

pyrog commented 5 months ago

In France, I think that most (exactly 39/19563 so 0,2%) nodes (in practice guideposts) shared with several "sports" have only one name or ref. See examples below.

All this to say that I think the "simple" and "standard" tags are not sufficient (and also not "standard") for node networks.

Again my suggestion is when there is no xxn_name tags accept name tag and no xxn_ref use ref tag. Again tags name or ref are standard for most software (editors…).

node_network scheme was written by and for Nederland peoples 😉

In the knooppuntnet database there are currently 3820 nodes that are both hiking and cycling nodes.

How many in France, Germany… ? For France where exactly ? I find only 39 nodes with rcn_ref and rwn_ref in the north of the country.

Examples

from https://overpass-turbo.eu/s/1MYL

vmarc commented 5 months ago

I can confirm your number for France. When restricting the MongoDB query to France it finds 40. In Germany there are 54.

pyrog commented 5 months ago

The last node part of an hiking and cycling network a the same reference in each one.

Capture d’écran 2024-06-17 à 13 51 52