prochitecture / blosm

GNU General Public License v3.0
11 stars 3 forks source link

Inconsistency in the returned data (berlin_karl_marx_allee.osm) #91

Closed vvoovv closed 6 months ago

vvoovv commented 6 months ago

image

OSM-Id of the first section along the direction of movement is 316869461 OSM-Id of the second section along the direction of movement is 316869459.

In the returned data structures:

street.tail.tags["id"] == "316869461" # OSM-Id of the FIRST section
street.head.tags["id"] == "316869459" # OSM-Id of the SECOND section

image

OSM-Id of the first section along the direction of movement is 303406976 OSM-Id of the second section along the direction of movement is 302694753.

street.tail.tags["id"] == "302694753" # OSM-Id of the SECOND section
street.head.tags["id"] == "303406976" # OSM-Id of the FIRST section
polarkernel commented 6 months ago

Bug fixed and committed. It was sluggish to find, but easy to fix.

vvoovv commented 6 months ago

Unfortunately, the problem persists. The values in the above examples were simply swapped.

Now:

The first example:

street.tail.tags["id"] == "316869459" # OSM-Id of the SECOND section
street.head.tags["id"] == "316869461" # OSM-Id of the FIRST section

The second example:

street.tail.tags["id"] == "303406976" # OSM-Id of the FIRST section
street.head.tags["id"] == "302694753" # OSM-Id of the SECOND section
polarkernel commented 6 months ago

Fixed and committed. The real reason was deeper, and the last fix was just symptom treatment. Sorry.

vvoovv commented 6 months ago

I've got again the result from the first message.

In addition something got wrong with styling. I guess it could be cause by the recent deletion of the line street.setStyle(streetStyle) at _action/generatestreets.py.

polarkernel commented 6 months ago

I've got again the result from the first message.

This should be finally fixed (and committed). Here what I get for your examples:

street.head.tags['id']
'316869461'
street.head.succ.succ.tags['id']
'316869459'

street.head.tags['id']
'303406976'
street.head.succ.succ.tags['id']
'302694753'

In addition something got wrong with styling. I guess it could be cause by the recent deletion of the line street.setStyle(streetStyle) at action/generate_streets.py.

I can't find any issues with this deleted code. In my opinion, this was necessary. Can you tell me more details about the problem?

By the way, all way-items have an ID, which is easier for me to identify. The first example above becomes:

street.id
503
street.head.id
126
street.head.succ.succ.id
115

When you plot the scene in script mode, you get all these IDs. For the streets, you get the combination (street id)/(section id), so for the example above 503/126 and 503/115:

vvoovv commented 6 months ago

This should be finally fixed (and committed).

Thanks. I'll create separate tickets for the other issues.