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

Loop over all ways in "df" #4

Open
chazanov opened this issue Aug 5, 2018 · 0 comments
Open

Loop over all ways in "df" #4

chazanov opened this issue Aug 5, 2018 · 0 comments

Comments

@chazanov
Copy link

chazanov commented Aug 5, 2018

I would like to calculate the perimeter length of all ways (with tag man_made=) inside my boundary
length = df.geometry.length

But I'm always getting
AttributeError: 'LineString' object has no attribute 'exterior'

when using your example code and my Sarnia.geojson as input:

with open('Sarnia.geojson') as f:
    data = json.load(f)

poly = shapely.geometry.shape(data['features'][0]['geometry'])
df = geopandas_osm.osm.query_osm('way', poly, recurse='down', tags='man_made')
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

1 participant