Comments (8)
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
from prettymaps.
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.
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.
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.
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.pyafter
streetsis turned into a
GeoDataFrame` 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.
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.
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?
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.
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)
- use backup
- AttributeError: 'NoneType' object has no attribute 'axis' HOT 2
- Error on pip/git install HOT 3
- Installing Issues with conda on Mac OS HOT 7
- Problem when plotting HOT 2
- osmnx rate limit issue HOT 2
- AttributeError: 'MultiPolygon' object has no attribute 'exterior' HOT 3
- How to color only one building. HOT 4
- Error on installation HOT 1
- Kernel crashes with larger radius
- Mac OS X Installation Error
- Create a prettymaps webapp HOT 2
- Create additional layers in postprocessing step (The sea is not queryable in OSM) HOT 2
- [Documentation] osm_credit parameter name no more valid
- [BUG] Fatal Python error: Segmentation fault
- [BUG] AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? when trying to pip install prettymaps on Debian 12 HOT 2
- Unable to use plotter mode in Google Colab Demo
- AttributeError: 'DataFrame' object has no attribute 'crs' in demo examples HOT 1
- Colab ERROR: Package 'vsketch' requires a different Python: 3.7.13 not in '<3.11,>=3.8' HOT 4
- python setup.py egg_info did not run successfully. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettymaps.