76 osm to ee
Uncomment the following line to install geemap if needed.
In [ ]:
Copied!
# %%capture
# # optional
# ! sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
# ! sudo apt-get update
# ! sudo apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev
# ! sudo apt-get install libprotobuf-dev protobuf-compiler libv8-dev libjq-dev
# # packages
# ! pip install geopandas cartopy osmnx geemap
# %%capture
# # optional
# ! sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
# ! sudo apt-get update
# ! sudo apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev
# ! sudo apt-get install libprotobuf-dev protobuf-compiler libv8-dev libjq-dev
# # packages
# ! pip install geopandas cartopy osmnx geemap
Converting OpenStreetMap data to ee.FeatureCollection¶
Credits to Erik Seras for making this feature request and providing examples.
In [ ]:
Copied!
import geemap
import geemap
In [ ]:
Copied!
# geemap.update_package()
# geemap.update_package()
In [ ]:
Copied!
Map = geemap.Map()
fc = geemap.osm_to_ee("Provincia de Lima, Lima, Perú")
Map.addLayer(fc, {}, "Lima, Peru")
Map.centerObject(fc, 9)
Map
Map = geemap.Map()
fc = geemap.osm_to_ee("Provincia de Lima, Lima, Perú")
Map.addLayer(fc, {}, "Lima, Peru")
Map.centerObject(fc, 9)
Map
In [ ]:
Copied!
geemap.osm_to_geopandas("Provincia de Lima, Lima, Perú")
geemap.osm_to_geopandas("Provincia de Lima, Lima, Perú")
In [ ]:
Copied!
# geemap.osm_to_geojson("Provincia de Lima, Lima, Perú")
# geemap.osm_to_geojson("Provincia de Lima, Lima, Perú")
In [ ]:
Copied!
Map = geemap.Map()
Map.add_osm("Provincia de Lima, Lima, Perú", layer_name="Lima, Peru")
Map
Map = geemap.Map()
Map.add_osm("Provincia de Lima, Lima, Perú", layer_name="Lima, Peru")
Map
In [ ]:
Copied!
Map = geemap.Map()
Map.add_osm("Provincia de Lima, Lima, Perú", layer_name="Lima, Peru", to_ee=True)
Map
Map = geemap.Map()
Map.add_osm("Provincia de Lima, Lima, Perú", layer_name="Lima, Peru", to_ee=True)
Map
In [ ]:
Copied!
Map = geemap.Map()
Map.add_osm("('京都市, 日本国')", layer_name="Kyoto, Japan")
Map
Map = geemap.Map()
Map.add_osm("('京都市, 日本国')", layer_name="Kyoto, Japan")
Map
In [ ]:
Copied!
Map = geemap.Map()
Map.add_osm("Knoxville, Tennessee", layer_name="Knoxville, TN")
Map
Map = geemap.Map()
Map.add_osm("Knoxville, Tennessee", layer_name="Knoxville, TN")
Map