gboeing / osmnx

OSMnx is a Python package to easily download, model, analyze, and visualize street networks and other geospatial features from OpenStreetMap.
https://osmnx.readthedocs.io
MIT License
4.86k stars 826 forks source link

OSMNX - buildings_from_place - Missing Building Footprints #224

Closed ninehundred closed 5 years ago

ninehundred commented 5 years ago

Hi there,

Just wanted to say thanks first of all for the tool. Its been really fun so far!

The issue I'm having is basially that when I run the buildings from place command I'm getting a lot of blank areas. The area I'm looking for is: "Fitzroy, City of Yarra, Greater Melbourne, Victoria, Australia" Now, while I do get a return on this many of the building footprints are missing (did a visual comparison on google maps. I'm not sure yet if anyone can replicate the issue or indeed if the issue is coming from osmnx or its an issue with missing data.

Thanks for any help in advance!

python = 3.7.0 osmnx = 0.8.2 windows 10 pro

C:\Users\DanLaptop>pip list Package Version


backcall 0.1.0 certifi 2018.8.24 chardet 3.0.4 click 6.7 click-plugins 1.0.4 cligj 0.4.0 colorama 0.4.0 cycler 0.10.0 decorator 4.3.0 descartes 1.1.0 ez-setup 0.9 Fiona 1.7.13 Flask 1.0.2 GDAL 2.3.2 geographiclib 1.49 geojson 2.4.1 geopandas 0.4.0 geopy 1.17.0 geos 0.2.1 idna 2.7 ipython 7.1.1 ipython-genutils 0.2.0 itsdangerous 0.24 jedi 0.13.1 Jinja2 2.10 kiwisolver 1.0.1 lxml 4.2.5 MarkupSafe 1.0 matplotlib 3.0.0 munch 2.3.2 networkx 2.2 numpy 1.15.1 osmnx 0.8.2 pandas 0.23.4 parso 0.3.1 pickleshare 0.7.5 pip 18.1 prompt-toolkit 2.0.7 Pygments 2.2.0 pyparsing 2.2.1 pyproj 1.9.5.1 python-dateutil 2.7.3 pytz 2018.5 requests 2.19.1 Rtree 0.8.3 setuptools 40.4.1 Shapely 1.6.4.post1 six 1.11.0 traitlets 4.3.2 urllib3 1.23 wcwidth 0.1.7 Werkzeug 0.14.1 import networkx as nx import osmnx as ox import requests import matplotlib.cm as cm import matplotlib.colors as colors import matplotlib.pyplot as plt import matplotlib.patches as mpatches import numpy as np import sys import pandas as pd import csv from IPython.display import Image #used in part 3 - plotting buildings ox.config(use_cache=True, log_console=True

suburb_buildings = ox.buildings_from_place(place = "Fitzroy, City of Yarra, Greater Melbourne, Victoria, Australia") buildings_proj = ox.project_gdf(suburb_buildings) fig, ax = ox.plot_buildings(buildings_proj, bgcolor = "w", color = "#333333", save = True, show = False, close = True, filename = filename, dpi = 150 ) Image('{}/{}.{}'.format(img_folder,"things", extension), height = image_size, width = size)

AtelierLibre commented 5 years ago

Hi ninehundred,

I'm pretty new here but, as someone interested in buildings on OSM perhaps I can help. You say you checked Google maps but did you check OpenStreetMap? Having a look at Fitzroy on OSM [https://www.openstreetmap.org/#map=15/-37.7867/144.9838] there really aren't that many buildings showing. As the data source for OSMnx presumably you get the ones that are showing?

It's one of OSM's weaknesses and strengths - coverage is only what the community has mapped so far but you have the opportunity to personally map and add areas that are of interest to you.

Nick

gboeing commented 5 years ago

@ninehundred yes, as @AtelierLibre said, you cannot validate OSMnx's results against Google Maps because it is not pulling from Google Maps. Instead, go directly to https://www.openstreetmap.org/ and inspect your study area to see what data are actually there in OSM. What you see in OSM should show up when use OSMnx unless you're filtering certain objects out of the query.

ninehundred commented 5 years ago

Hi Both,

Thanks for the replies!

Yes I'd checked open street map - it did appear that there were no orange building footprints of the areas I was trying to obtain but found it easier to compare visually using google as it was more certain that i wasnt looking at a bit of pavement etc.

I'm not filtering anything out as far as I'm aware.

With regards to additional research on this Id found that the Australian Bureau of Statistics (ABS) have decided not to filter their data by postcode anymore - at least this is what I'm reading from it. I had wondered if this had anything to do with it. However, if youre saying this is because the data doesnt exist in OSM then perhaps this wouldnt affect me?

I've decided to use a more compelte part of the city for now but for future referece is there a good place to start on learning how to upload the building footprint data to OSM?

Thanks,

Dan

gboeing commented 5 years ago

Here's a good place to get started: https://wiki.openstreetmap.org/wiki/Contribute_map_data