Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
giswqs
GitHub Repository: giswqs/geemap
Path: blob/master/docs/notebooks/109_coordinate_grids.ipynb
2313 views
Kernel: Python 3

Open in Colab

Uncomment the following line to install geemap if needed.

# !pip install geemap

Import libraries.

import ee import geemap
Map = geemap.Map()

Create a latitude grid.

lat_grid = geemap.latitude_grid(step=5.0, west=-180, east=180, south=-85, north=85)
Map.addLayer(lat_grid, {}, "Latitude Grid")
Map

Convert ee.FeatureCollection to pandas.DataFrame.

df = geemap.ee_to_df(lat_grid) df

Create a longitude grid.

lon_grid = geemap.longitude_grid(step=5.0, west=-180, east=180, south=-85, north=85)
Map = geemap.Map() Map.addLayer(lon_grid, {}, "Longitude Grid") Map

Create a rectangular grid.

grid = geemap.latlon_grid( lat_step=10, lon_step=10, west=-180, east=180, south=-85, north=85 )
Map = geemap.Map() Map.addLayer(grid, {}, "Coordinate Grid") Map