Skip to content

Commit

Permalink
@DataCube crop refactor - kamangir/bolt#746
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed Dec 9, 2024
1 parent 49f0140 commit 628ddd2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ pip install blue-geo

[![pylint](https://github.com/kamangir/blue-geo/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-geo/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-geo/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-geo/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-geo/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-geo/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-geo.svg)](https://pypi.org/project/blue-geo/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-geo)](https://pypistats.org/packages/blue-geo)

built by πŸŒ€ [`blue_options-4.173.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌐 [`blue_geo-4.835.1`](https://github.com/kamangir/blue-geo).
built by πŸŒ€ [`blue_options-4.173.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌐 [`blue_geo-4.836.1`](https://github.com/kamangir/blue-geo).
11 changes: 9 additions & 2 deletions blue_geo/.abcli/datacube/crop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ function blue_geo_datacube_crop() {
$object_name \
$cropped_datacube_id

local crs=$(gdalsrsinfo -o epsg $cutline)
abcli_log "cutline crs: $crs"

local list_of_files=$(blue_geo_datacube_list $datacube_id \
--delim space \
--exists 1 \
Expand All @@ -35,7 +38,8 @@ function blue_geo_datacube_crop() {
for filename in $list_of_files; do
source_filename=$ABCLI_OBJECT_ROOT/$datacube_id/$filename

abcli_log "cropping $filename ..."
local source_filename_crs=$(gdalsrsinfo -o epsg $source_filename)
abcli_log "cropping $filename @ $source_filename_crs ..."

destination_filename=$ABCLI_OBJECT_ROOT/$cropped_datacube_id/$filename
destination_path=$(dirname "$destination_filename")
Expand All @@ -45,9 +49,12 @@ function blue_geo_datacube_crop() {
gdalwarp -cutline $cutline \
-crop_to_cutline \
-dstalpha \
-t_srs $crs \
$source_filename \
$destination_filename
# [[ $? -ne 0 ]] && return 1

local destination_filename_crs=$(gdalsrsinfo -o epsg $destination_filename)
abcli_log "output crs: $destination_filename - expected $crs."
done

return 0
Expand Down
2 changes: 1 addition & 1 deletion blue_geo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

DESCRIPTION = f"{ICON} AI for a Blue Planet."

VERSION = "4.835.1"
VERSION = "4.836.1"

REPO_NAME = "blue-geo"

Expand Down
22 changes: 11 additions & 11 deletions blue_geo/watch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ watch the planet's story unfold.
<details>
<summary>🌐</summary>

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-Cache-Creek-2x-wider-2024-11-05/geo-watch-Cache-Creek-2x-wider-2024-11-05-4X.gif?raw=true&random=N1D8c9YQjOo7G484)
![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-Cache-Creek-2x-wider-2024-11-05/geo-watch-Cache-Creek-2x-wider-2024-11-05-4X.gif?raw=true&random=vUKC0eYPFk139qAb)

</details>

Expand All @@ -155,7 +155,7 @@ watch the planet's story unfold.
<details>
<summary>🌐</summary>

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-DrugSuperLab-2024-11-19-13954/geo-watch-DrugSuperLab-2024-11-19-13954-4X.gif?raw=true&random=dop0PDuGiCYZ50Pm)
![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-DrugSuperLab-2024-11-19-13954/geo-watch-DrugSuperLab-2024-11-19-13954-4X.gif?raw=true&random=iL4nSDuYXZxJVHvp)

</details>

Expand All @@ -170,7 +170,7 @@ watch the planet's story unfold.
<details>
<summary>🌐</summary>

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-2024-09-04-Fagradalsfjall-a/geo-watch-2024-09-04-Fagradalsfjall-a-2X.gif?raw=true&random=HApSgDPRzUgep0pR)
![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-2024-09-04-Fagradalsfjall-a/geo-watch-2024-09-04-Fagradalsfjall-a-2X.gif?raw=true&random=1UtkDbSHwtD3DXMw)

</details>

Expand All @@ -183,7 +183,7 @@ watch the planet's story unfold.
<details>
<summary>🌐</summary>

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-Jasper-2024-11-03/geo-watch-Jasper-2024-11-03-2X.gif?raw=true&random=xTQfxM6q8qxnkHlr)
![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-Jasper-2024-11-03/geo-watch-Jasper-2024-11-03-2X.gif?raw=true&random=4bWns7IFk0bBoPVm)

</details>

Expand All @@ -198,7 +198,7 @@ watch the planet's story unfold.
<details>
<summary>🌐</summary>

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-2024-10-27-16-17-36-12059/geo-watch-2024-10-27-16-17-36-12059-4X.gif?raw=true&random=ESZkSJrj3MsepsBj)
![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-2024-10-27-16-17-36-12059/geo-watch-2024-10-27-16-17-36-12059-4X.gif?raw=true&random=lnMcHhS3NmrWxQQD)

</details>

Expand All @@ -216,7 +216,7 @@ watch the planet's story unfold.
<details>
<summary>🌐</summary>

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-2024-09-04-Mount-Etna-a/geo-watch-2024-09-04-Mount-Etna-a-2X.gif?raw=true&random=dD4SAZRSjZ62wr7w)
![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-2024-09-04-Mount-Etna-a/geo-watch-2024-09-04-Mount-Etna-a-2X.gif?raw=true&random=UK9wmEF4RgP4Kr3x)

</details>

Expand All @@ -229,7 +229,7 @@ watch the planet's story unfold.
<details>
<summary>🌐</summary>

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-Silver-Peak-2024-10-12-a/geo-watch-Silver-Peak-2024-10-12-a-4X.gif?raw=true&random=sScuNcrit2iBY0B4)
![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-Silver-Peak-2024-10-12-a/geo-watch-Silver-Peak-2024-10-12-a-4X.gif?raw=true&random=EO7nsfdNTYv9GueN)

</details>

Expand All @@ -243,7 +243,7 @@ watch the planet's story unfold.
<details>
<summary>🌐</summary>

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-bellingcat-2024-09-27-nagorno-karabakh-6X-2024-10-06-a/geo-watch-bellingcat-2024-09-27-nagorno-karabakh-6X-2024-10-06-a-4X.gif?raw=true&random=ymbpZR746sUWCcGT)
![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-bellingcat-2024-09-27-nagorno-karabakh-6X-2024-10-06-a/geo-watch-bellingcat-2024-09-27-nagorno-karabakh-6X-2024-10-06-a-4X.gif?raw=true&random=LJuGrnetR81Lu1ep)

</details>

Expand All @@ -259,7 +259,7 @@ watch the planet's story unfold.
<details>
<summary>🌐</summary>

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-2024-09-04-burning-man-2024-a/geo-watch-2024-09-04-burning-man-2024-a-2X.gif?raw=true&random=kGEgzvaqL3AOv92D)
![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-2024-09-04-burning-man-2024-a/geo-watch-2024-09-04-burning-man-2024-a-2X.gif?raw=true&random=CHNdZrVocFdWEOpd)

</details>

Expand All @@ -271,7 +271,7 @@ watch the planet's story unfold.
<details>
<summary>🌐</summary>

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-Chilcotin-2024-11-03/geo-watch-Chilcotin-2024-11-03-4X.gif?raw=true&random=AVFt2jZu53Q4NUmy)
![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-Chilcotin-2024-11-03/geo-watch-Chilcotin-2024-11-03-4X.gif?raw=true&random=4su2oALMCbP6M8bM)

</details>

Expand All @@ -290,7 +290,7 @@ watch the planet's story unfold.
<details>
<summary>🌐</summary>

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-elkhema-2024-2024-10-05-a-b/geo-watch-elkhema-2024-2024-10-05-a-b-4X.gif?raw=true&random=qFGn06D4YQZkdWaz)
![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/geo-watch-elkhema-2024-2024-10-05-a-b/geo-watch-elkhema-2024-2024-10-05-a-b-4X.gif?raw=true&random=D7vhvBzFAu6enLZg)

</details>

Expand Down

0 comments on commit 628ddd2

Please sign in to comment.