[josm-dev] connected nodes in blue

j2megps j2megps at yahoo.com
Mon Apr 27 03:04:57 BST 2009


Quote:
<<<
Problem here is, that currently nodes don't kwow any ways and ways don't
know each other. So I really hesitate to do a bigger data model change
only to implement this feature - who knows what it will brake.
>>>


The actual problem here is not in JOSM, it is in OSM data model: "OSM data
model was not designed to store routing nodes in database " so way does not
know how to link to other ways.

We can fix this problem by adding one simple tag to node's data model as
follow:

  <node id="107629" lat="51.5108175" lon="-0.0867067" version="3"
changeset="867683" user="j2megps" uid="7037" visible="true"
timestamp="2009-03-29T12:28:34Z">
    <tag k="highway" v="routing_node"/>
  </node>

If you don't like <tag k="highway" v="routing_node"/>, we can use <tag
k="routing_node" v="yes"/>

By adding this tag "routing_node" to node "107629", all the ways that have
reference to this node id "107629" will know they are linked together and
JOSM will know how to render routing node "107629" different from other
normal nodes. We can even render routing node in different color depend on
its cardinality, for example in my application I render blue color for
routing nodes that have link to 1 other routing node, green color for
routing nodes that have link to 2 other routing nodes, yellow color for
routing nodes that have link to 3 other routing nodes, purple color for
routing nodes that have links to 4 other routing nodes and red color for
routing nodes that have links to 5+ other routing nodes.

Regards,

www.digitalmobilemap.com



Jonas Krückel wrote:
> 
> Ulf Lamping schrieb:
>> Jonas Krückel schrieb:
> 
>>> If you think this feature would be helpful i will open a trac ticket 
>>> (i have no java skills to implement this feature).
>>
>> I thought a bit about it, but I have no idea how to implement it in a 
>> good way.
>>
>> Problem here is, that currently nodes don't kwow any ways and ways 
>> don't know each other.
> Is that a general problem with osm data or are you speaking about the 
> data model of JOSM rendering?
> 
> Jonas
> 
> 
> _______________________________________________
> josm-dev mailing list
> josm-dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/josm-dev
> 
> 

-- 
View this message in context: http://www.nabble.com/connected-nodes-in-blue-tp23200103p23248976.html
Sent from the OpenStreetMap - JOSM Dev mailing list archive at Nabble.com.





More information about the josm-dev mailing list