add_osm_poi_features() one-liner to add POI features to an AOI
add_osm_road_features() one-liner to add road features to an AOI
OsmDataManager convenience class to load and automatically cache OSM data (POIs and roads) on disk and RAM.
Other notes:
I just followed the initial list of OSM POIs from previous implementation as the default. We can revisit once we experiment. Anyway, this is already a parameter so it shouldn't be a blocker should user want a different list of POIs.
Cache dir is configurable, but by default it's at ~/.geowrangler/osm, in anticipation that we'll eventually integrate this to geowrangler once stable.
So e.g. for ph, this is what the unzipped folder would look like:
I think this can be a problem for later, but heads-up that the different data sources might have different naming conventions for countries. For example, for OSM, it's the full country names (e.g. "philippines", "east-timor", "cambodia", "myanmar").
Runtime seems to be reasonable. Philippines takes the longest; ~10s when the data is already cached in RAM, ~1min+ if not.
Starting Point
test-notebooks/test_refactors/test_osm.ipynb - Short notebook that loads cluster-level data for the DHS countries (taken from the GCS bucket) and adds OSM features for them.
Overview
Adds a new
osm.py
module that provides:add_osm_poi_features()
one-liner to add POI features to an AOIadd_osm_road_features()
one-liner to add road features to an AOIOsmDataManager
convenience class to load and automatically cache OSM data (POIs and roads) on disk and RAM.Other notes:
~/.geowrangler/osm
, in anticipation that we'll eventually integrate this to geowrangler once stable. So e.g. for ph, this is what the unzipped folder would look like:Starting Point
test-notebooks/test_refactors/test_osm.ipynb
- Short notebook that loads cluster-level data for the DHS countries (taken from the GCS bucket) and adds OSM features for them.