forked from chrieke/prettymapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request chrieke#51 from chrieke/add_get_osm_geometries_fro…
…m_xml Add get osm geometries from xml
- Loading branch information
Showing
4 changed files
with
1,122 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from prettymapp.osm import get_osm_tags, get_osm_geometries_from_xml | ||
|
||
|
||
def test_get_osm_tags(): | ||
tags = get_osm_tags() | ||
assert tags == { | ||
"building": True, | ||
"landuse": [ | ||
"construction", | ||
"commercial", | ||
"forest", | ||
"grass", | ||
"vineyard", | ||
"orchard", | ||
"village_green", | ||
], | ||
"natural": ["water", "bay", "island", "wood"], | ||
"place": ["sea"], | ||
"leisure": ["swimming_pool", "park", "pitch", "garden", "golf_course"], | ||
"highway": [ | ||
"motorway", | ||
"trunk", | ||
"primary", | ||
"secondary", | ||
"tertiary", | ||
"cycleway", | ||
"residential", | ||
"service", | ||
"unclassified", | ||
"footway", | ||
"motorway_link", | ||
"pedestrian", | ||
], | ||
"railway": True, | ||
"amenity": ["parking"], | ||
"man_made": ["pier"], | ||
} | ||
|
||
|
||
def test_get_osm_geometries_from_xml(): | ||
filepath = "./mock_data/osm_export_xml.osm" | ||
df = get_osm_geometries_from_xml(filepath) | ||
assert df.shape == (18, 3) |