Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing streets #53

Open
Siron777 opened this issue Sep 5, 2021 · 8 comments
Open

Missing streets #53

Siron777 opened this issue Sep 5, 2021 · 8 comments

Comments

@Siron777
Copy link

Siron777 commented Sep 5, 2021

Hi,

I am using this wonderful tool and I notice that some streets are not visible or are truncated. Here is an example for the City of Ottignies, in Belgium (address: Clinique Saint Pierre, Ottignies, Belgium). In purple there is some missing residential streets. In green there is some missing footways.
ottignies

I am using the script from the Macao example, with path and track added to the drawing.
I don't see in OSM any distinctive traits in the configuration of those streets which could explain the fact that they are not visible.

Best regards,
Simon

@G21-Goose
Copy link
Contributor

Hey Simon,

I just added a change to my PR #48 that seems to fix this. You can try it with this

pip install git+https://github.com/marceloprates/prettymaps.git@refs/pull/48/head

image

@Siron777
Copy link
Author

Siron777 commented Sep 7, 2021

Thank you. For the testing, I did try the pip command to get the modified library, something was downloaded, but I was not able to get the modified code in my prettymaps library. I will investigate what is happening in the next few days.

@G21-Goose
Copy link
Contributor

First you need to uninstall the previous prettymaps version with pip uninstall prettymaps. Also I had to close that previous PR because of some merge errors. This is the most recent one:

pip install git+https://github.com/marceloprates/prettymaps.git@refs/pull/54/head

@Siron777
Copy link
Author

Siron777 commented Sep 8, 2021

Make sense, thank you!

All the missing streets are now there. Thank you²!

A subsequent issue I see now is that some footway are drawn with the width of a residential street. This is the case with the two which where missing in the green circle in my image. It is also the case for a few others in the image. My intuition would say that it occurs when a footway is the prolongation of a residential street. So when a residential street finishes in a dead end for a car, but in a footway for pedestrians, the footway will be drawn with the width of the street (but maybe this is just a coincidence and that rule is wrong).

@G21-Goose
Copy link
Contributor

Hey,
Glad it's sort of solved the issue. The OSM ID of those footways you mentioned are 518776174 and 518776176. In the get_streets() function in fetch.pyafterstreetsis turned into aGeoDataFrame` with the line:

streets = ox.graph_to_gdfs(streets, nodes=False)

I saved it as a CSV with streets.to_csv('Belgium.csv'). If you search for the OSM ID's in the Belgium.csv file you get a result like this (only looking at two of the columns):

OSM ID Highway
[28036684, 518776174] ['residential', 'footway']
[518776176, 160717059] ['residential', 'footway']

The order of highway doesn't seem to match up with the order of the osmid. So I can't think of a way that it would be possible to determine that 518776176 and 518776174 are footways.

@salanova-elliott
Copy link

I think I could be experiencing a similar issue. I'm trying to plot the pedestrian tracks of Tromsø, Norway and prettymaps can't seem to find them with the tag I'm using. OSM says the main path is 'highway:track' (Lysløypa, 258648143), but when I try to assign that to a layer, it returns 'GEOMETRYCOLLECTION EMPTY'. Any ideas what could be happening?

I also reinstalled from refs/pull/54/head

@G21-Goose
Copy link
Contributor

Hi @salanova-elliott
Your issue doesn't seem to be the same, using the same approach I detailed before with the CSV, it is only called a track. I managed to get the tracks though I think?
image

The coordinates I used were (69.6708, 18.95) and the radius I used was radius = 5000. The streets layer I did looked like:

'streets': {
    'width': {
        'track': 3,
    },
    'circle': False,
    'buffer': 1000
},

If you have used a custom_filter you may have to set retain_all to True so that you can see all the results e.g.

'streets': {
    'custom_filter': '["highway"~"track"]',
    'width':3,
    'circle': False,
    'buffer': 1000,
    'retain_all': True
},

@salanova-elliott
Copy link

salanova-elliott commented Sep 12, 2021

Thanks for the quick response @G21-Goose! It was just my inexperience with OSM and prettymaps. I didn't realize 'highway' was filed under 'streets', I was trying to call that tag directly (ie 'foot_path': {'tags': {'highway': 'track'}}). Solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants