Skip to content

Commit

Permalink
Merge branch 'feature/write_layers' of https://github.com/wri/cities-cif
Browse files Browse the repository at this point in the history
 into feature/smart_cities_lulc
  • Loading branch information
weiqi-tori committed Jun 7, 2024
2 parents 74f5c0c + db16303 commit dfc8d52
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,3 @@ cython_debug/
/keys
keys/
wri-gee-358d958ce7c6.json

# notebooks, you need to `git add -f` to force them to be changed
.ipynb
2 changes: 0 additions & 2 deletions city_metrix/layers/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ def write(self, bbox, output_path, tile_degrees=None):
file_names.append(file_name)

write_layer(file_name, data)

gdal.BuildVRT(f"{output_path}.vrt", file_names)
else:
data = self.aggregate.get_data(bbox)
write_layer(output_path, data)
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ dependencies:
- dask[complete]=2023.11.0
- matplotlib=3.8.2
- jupyterlab=4.0.10
- geemap=0.32.0
- s3fs=2024.5.0
- geemap=0.32.0
- pip=23.3.1
- scikit-learn=1.5.0
- pip:
Expand Down
2 changes: 1 addition & 1 deletion notebooks/tutorial/compute indicators.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2469,4 +2469,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
8 changes: 4 additions & 4 deletions notebooks/tutorial/get layers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4694,10 +4694,10 @@
"evalue": "name 'TreeCanopyHeight' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[5], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Load 1m Global Tree Canopy Hight layer\u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m city_TreeCanopyHeight \u001b[38;5;241m=\u001b[39m \u001b[43mTreeCanopyHeight\u001b[49m()\u001b[38;5;241m.\u001b[39mget_data(city_gdf\u001b[38;5;241m.\u001b[39mtotal_bounds)\n\u001b[1;32m 3\u001b[0m city_TreeCanopyHeight\n",
"\u001b[0;31mNameError\u001b[0m: name 'TreeCanopyHeight' is not defined"
"\u001B[0;31m---------------------------------------------------------------------------\u001B[0m",
"\u001B[0;31mNameError\u001B[0m Traceback (most recent call last)",
"Cell \u001B[0;32mIn[5], line 2\u001B[0m\n\u001B[1;32m 1\u001B[0m \u001B[38;5;66;03m# Load 1m Global Tree Canopy Hight layer\u001B[39;00m\n\u001B[0;32m----> 2\u001B[0m city_TreeCanopyHeight \u001B[38;5;241m=\u001B[39m \u001B[43mTreeCanopyHeight\u001B[49m()\u001B[38;5;241m.\u001B[39mget_data(city_gdf\u001B[38;5;241m.\u001B[39mtotal_bounds)\n\u001B[1;32m 3\u001B[0m city_TreeCanopyHeight\n",
"\u001B[0;31mNameError\u001B[0m: name 'TreeCanopyHeight' is not defined"
]
}
],
Expand Down

0 comments on commit dfc8d52

Please sign in to comment.