Git Product home page Git Product logo

Comments (8)

G21-Goose avatar G21-Goose commented on May 20, 2024

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

from prettymaps.

Siron777 avatar Siron777 commented on May 20, 2024

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.

from prettymaps.

G21-Goose avatar G21-Goose commented on May 20, 2024

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

from prettymaps.

Siron777 avatar Siron777 commented on May 20, 2024

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).

from prettymaps.

G21-Goose avatar G21-Goose commented on May 20, 2024

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.

from prettymaps.

salanova-elliott avatar salanova-elliott commented on May 20, 2024

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

from prettymaps.

G21-Goose avatar G21-Goose commented on May 20, 2024

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
},

from prettymaps.

salanova-elliott avatar salanova-elliott commented on May 20, 2024

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

from prettymaps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.