Retrieving OpenStreetMap data
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'
networkx.classes.multidigraph.MultiDiGraph
<function matplotlib.pyplot.tight_layout(*, pad=1.08, h_pad=None, w_pad=None, rect=None)>
<AxesSubplot:>
| geometry | place_name | bbox_north | bbox_south | bbox_east | bbox_west | |
|---|---|---|---|---|---|---|
| 0 | POLYGON ((-17.46941 14.68994, -17.46816 14.688... | Université Cheikh Anta Diop, Rue de Diourbel (... | 14.693334 | 14.681233 | -17.458759 | -17.469406 |
array(['geometry', 'place_name', 'bbox_north', 'bbox_south', 'bbox_east',
'bbox_west'], dtype=object)<class 'geopandas.geodataframe.GeoDataFrame'> RangeIndex: 1 entries, 0 to 0 Data columns (total 6 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 geometry 1 non-null geometry 1 place_name 1 non-null object 2 bbox_north 1 non-null float64 3 bbox_south 1 non-null float64 4 bbox_east 1 non-null float64 5 bbox_west 1 non-null float64 dtypes: float64(4), geometry(1), object(1) memory usage: 104.0+ bytes
d:\programm files\python\lib\site-packages\osmnx\footprints.py:129: UserWarning: The `footprints` module has been deprecated and will be removed in a future release. Instead, use the `geometries` module's `geometries_from_place` function, passing `tags={'building':True}`.
warnings.warn(msg)
d:\programm files\python\lib\site-packages\ipykernel\ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above. and should_run_async(code)
| unique_id | osmid | element_type | amenity | name | geometry | nodes | building | addr:city | alt_name | ... | name:fr | addr:street | office | phone | website | shop | addr:postcode | religion | ways | type | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | way/27294227 | 27294227 | way | library | Bibliothèque Universitaire Centrale | POLYGON ((-17.46261 14.68578, -17.46262 14.685... | [299625480, 2351175474, 299625481, 2351175471,... | yes | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 1 | way/44213933 | 44213933 | way | NaN | UCAD II | POLYGON ((-17.46758 14.68868, -17.46738 14.688... | [561541507, 561541508, 561541509, 561541512, 5... | yes | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 2 | way/44213944 | 44213944 | way | NaN | Faculté de Médecine | POLYGON ((-17.46615 14.68616, -17.46617 14.686... | [561541618, 561541621, 561541623, 561541624, 2... | yes | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 3 | way/140465697 | 140465697 | way | NaN | Institut Fondamental d'Afrique Noire | POLYGON ((-17.46786 14.68393, -17.46774 14.683... | [1538892006, 1538892004, 1538892008, 153889200... | university | Dakar | IFAN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 4 | way/166709851 | 166709851 | way | NaN | NaN | POLYGON ((-17.46285 14.68950, -17.46284 14.689... | [1781615389, 1781615361, 1781615363, 178161539... | yes | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
5 rows × 28 columns
Index(['unique_id', 'osmid', 'element_type', 'amenity', 'name', 'geometry',
'nodes', 'building', 'addr:city', 'alt_name', 'building:levels',
'wikidata', 'wikipedia', 'source', 'cuisine', 'operator', 'name_2',
'short_name', 'name:fr', 'addr:street', 'office', 'phone', 'website',
'shop', 'addr:postcode', 'religion', 'ways', 'type'],
dtype='object')geopandas.geodataframe.GeoDataFrame
The nodes and edges
| y | x | osmid | geometry | |
|---|---|---|---|---|
| 297236557 | 14.685538 | -17.467039 | 297236557 | POINT (-17.46704 14.68554) |
| 297236559 | 14.685428 | -17.467027 | 297236559 | POINT (-17.46703 14.68543) |
| 297236563 | 14.685435 | -17.466705 | 297236563 | POINT (-17.46671 14.68543) |
| 299625358 | 14.685460 | -17.465818 | 299625358 | POINT (-17.46582 14.68546) |
| 299625359 | 14.685454 | -17.465696 | 299625359 | POINT (-17.46570 14.68545) |
Index(['y', 'x', 'osmid', 'geometry'], dtype='object')
<AxesSubplot:>
| osmid | oneway | highway | length | junction | geometry | lanes | service | name | u | v | key | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 27294217 | True | unclassified | 90.805 | NaN | LINESTRING (-17.46704 14.68554, -17.46788 14.6... | NaN | NaN | NaN | 297236557 | 6053931928 | 0 |
| 1 | 27090881 | True | unclassified | 12.521 | roundabout | LINESTRING (-17.46704 14.68554, -17.46704 14.6... | NaN | NaN | NaN | 297236557 | 297236559 | 0 |
| 2 | 27090881 | True | unclassified | 13.808 | roundabout | LINESTRING (-17.46703 14.68543, -17.46699 14.6... | NaN | NaN | NaN | 297236559 | 952097995 | 0 |
| 3 | 27294213 | True | unclassified | 74.654 | NaN | LINESTRING (-17.46671 14.68543, -17.46601 14.6... | NaN | NaN | NaN | 297236563 | 2351175472 | 0 |
| 4 | 27090881 | True | unclassified | 14.586 | roundabout | LINESTRING (-17.46671 14.68543, -17.46669 14.6... | NaN | NaN | NaN | 297236563 | 299625374 | 0 |
Index(['osmid', 'oneway', 'highway', 'length', 'junction', 'geometry', 'lanes',
'service', 'name', 'u', 'v', 'key'],
dtype='object')<AxesSubplot:>
Comments
Post a Comment