File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # download module
2+
3+ ::: leafmap.download
Original file line number Diff line number Diff line change 126126 "id" : " 8" ,
127127 "metadata" : {},
128128 "outputs" : [],
129- "source" : []
130- },
131- {
132- "cell_type" : " code" ,
133- "execution_count" : null ,
134- "id" : " 9" ,
135- "metadata" : {},
136- "outputs" : [],
137129 "source" : [
138130 " m = leafmap.Map(style=\" liberty\" )\n " ,
139131 " m.add_data(\n " ,
152144 {
153145 "cell_type" : " code" ,
154146 "execution_count" : null ,
155- "id" : " 10 " ,
147+ "id" : " 9 " ,
156148 "metadata" : {},
157149 "outputs" : [],
158150 "source" : [
173165 {
174166 "cell_type" : " code" ,
175167 "execution_count" : null ,
176- "id" : " 11 " ,
168+ "id" : " 10 " ,
177169 "metadata" : {},
178170 "outputs" : [],
179171 "source" : [
194186 {
195187 "cell_type" : " code" ,
196188 "execution_count" : null ,
197- "id" : " 12 " ,
189+ "id" : " 11 " ,
198190 "metadata" : {},
199191 "outputs" : [],
200192 "source" : [
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ Use the upcase and downcase expressions to change the case of labels.
186186
187187Create choropleth maps with a variety of classification schemes.
188188
189- [ ![ ] ( https://github.com/user-attachments/assets/35ca3e17-956e-4d88-9e24-7e94c9e322f8 )] ( https://leafmap.org/maplibre/change_case_of_labels )
189+ [ ![ ] ( https://github.com/user-attachments/assets/35ca3e17-956e-4d88-9e24-7e94c9e322f8 )] ( https://leafmap.org/maplibre/choropleth )
190190
191191## Cloud Optimized GeoTIFF (COG)
192192
@@ -212,7 +212,6 @@ Utilize and refine data from the MapTiler Countries to create a Choropleth map o
212212
213213[ ![ ] ( https://i.imgur.com/k1d6k9I.png )] ( https://leafmap.org/maplibre/countries_filter )
214214
215-
216215## Create vector data
217216
218217Create vector data interactively on a map.
Original file line number Diff line number Diff line change @@ -8689,6 +8689,7 @@ def zonal_stats(
86898689
86908690 import geopandas as gpd
86918691 import rasterio
8692+ import xarray as xr
86928693
86938694 try:
86948695 import rasterstats
@@ -8708,6 +8709,9 @@ def zonal_stats(
87088709 nodata = raster.nodata
87098710 array = raster.read(band_num, masked=True)
87108711 raster_crs = raster.crs
8712+ elif isinstance(raster, xr.DataArray):
8713+ array = raster
8714+ raster_crs = raster.rio.crs
87118715 else:
87128716 array = raster
87138717
You can’t perform that action at this time.
0 commit comments