Posts

Showing posts from October, 2020

Retrieving OpenStreetMap data

Image
  Retrieving OpenStreetMap data In this practical tutorial from AutoGIS university of Helsinki, i will try to retrieve with the 'Universite Cheikh Anta Diop de Dakar' In [1]: # Loading all the needed libraries, you might not use all of them, but just keep them in the case of any emmergency need import osmnx as ox import matplotlib.pyplot as plt import geopandas import pandas as pd import collections import networks as nt import os import numpy as np In [2]: # Geo-localisation of the address place_name = 'Universite Cheikh Anta Diop de Dakar, Dakar, Senegal' graph = ox . graph_from_place ( place_name ) In [3]: type ( graph ) Out[3]: networkx.classes.multidigraph.MultiDiGraph In [4]: fig , ax = ox . plot_graph ( graph ) plt . tight_layout Out[4]: <function matplotlib.pyplot.tight_layout(*, pad=1.08, h_pad=None, w_pad=None, rect=None)> In [5]: area = ox . geocode_to_gdf ( place_name ) In [6]: area . plot ()...