Skip to content

Commit

Permalink
feat(collection): adding import subcommand for collection command
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinius committed Feb 21, 2025
1 parent 1e6d5ec commit 7c96ac4
Show file tree
Hide file tree
Showing 210 changed files with 464 additions and 7 deletions.
Binary file not shown.
Binary file not shown.
28 changes: 28 additions & 0 deletions autotest/autotest/data/index.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
python3 manage.py coveragetype import autotest/data/indices_new_chunk_test.zarr/coverage_type.json

python3 manage.py producttype create crii -c aci -c ccd_index -c pr_index -c T01_index -c T09_index -c wp_index

python3 manage.py browsetype create crii aci --grey aci --grey-range -5 5 --grey-nodata -99
python3 manage.py browsetype create crii ccd_index --grey ccd_index --grey-range -5 5 --grey-nodata -99
python3 manage.py browsetype create crii pr_index --grey pr_index --grey-range -5 5 --grey-nodata -99
python3 manage.py browsetype create crii T01_index --grey T01_index --grey-range -5 5 --grey-nodata -99
python3 manage.py browsetype create crii T09_index --grey T09_index --grey-range -5 5 --grey-nodata -99
python3 manage.py browsetype create crii wp_index --grey wp_index --grey-range -5 5 --grey-nodata -99


python3 manage.py collectiontype create crii_collection -p crii

python3 manage.py collection create crii -t crii_collection


python3 manage.py timeseries register -c crii \
--path /opt/instance/autotest/data/indices_new_chunk_test.zarr \
--product-type-name crii \
--x-dim-name "/Y" --y-dim-name "/X" --time-dim-name "/time" \
--product-template "{collection_identifier}_{file_identifier}_{index}" \
--coverage-type-mapping "/aci:aci" \
--coverage-type-mapping "/ccd_index:ccd_index" \
--coverage-type-mapping "/pr_index:pr_index" \
--coverage-type-mapping "/T0.1_index:T01_index" \
--coverage-type-mapping "/T0.9_index:T09_index" \
--coverage-type-mapping "/wp_index:wp_index"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "Feature", "stac_version": "1.0.0", "id": "LC08_L2SP_188026_20141013_02_T1", "properties": {"platform": "landsat-8", "instruments": ["oli", "tirs"], "created": "2022-11-07T06:05:12.001Z", "gsd": 30, "description": "Landsat Collection 2 Level-2", "eo:cloud_cover": 70.08, "view:off_nadir": 0, "view:sun_elevation": 32.01342002, "view:sun_azimuth": 163.62289228, "proj:epsg": 32634, "proj:shape": [8071, 7971], "proj:transform": [30, 0, 258585, 0, -30, 5534415], "proj:centroid": {"lat": 48.85311, "lon": 19.30146}, "landsat:cloud_cover_land": 70.08, "landsat:wrs_type": "2", "landsat:wrs_path": "188", "landsat:wrs_row": "026", "landsat:collection_category": "T1", "landsat:collection_number": "02", "landsat:correction": "L2SP", "landsat:scene_id": "LC81880262014286LGN01", "landsat:product_generated": "2020-09-10T19:57:36Z", "grid:code": "WRS2-188026", "sci:doi": "10.5066/P9OGBGM6", "datetime": "2014-10-13T09:33:04.219994Z", "earthsearch:payload_id": "usgs-landsat-c2l2/workflow-landsat-to-stac/LC08_L2SP_188026_20141013_20200910_02_T1_SR", "processing:software": {"landsat-to-stac": "v2023.11.16"}, "updated": "2023-12-01T19:35:09.036Z"}, "geometry": {"type": "Polygon", "coordinates": [[[18.413468663209226, 49.92932339982651], [17.76364093531144, 48.225418726496684], [20.184575515730643, 47.79277186436141], [20.915632403784084, 49.490787057499254], [18.413468663209226, 49.92932339982651]]]}, "links": [], "assets": {}, "bbox": [17.637434, 47.741349, 20.965308, 49.961208], "stac_extensions": ["https://stac-extensions.github.io/scientific/v1.0.0/schema.json", "https://stac-extensions.github.io/projection/v1.1.0/schema.json", "https://stac-extensions.github.io/processing/v1.1.0/schema.json", "https://stac-extensions.github.io/landsat/v2.0.0/schema.json", "https://stac-extensions.github.io/eo/v1.1.0/schema.json", "https://stac-extensions.github.io/grid/v1.1.0/schema.json", "https://stac-extensions.github.io/classification/v1.0.0/schema.json", "https://stac-extensions.github.io/view/v1.0.0/schema.json", "https://stac-extensions.github.io/storage/v1.0.0/schema.json", "https://stac-extensions.github.io/raster/v1.1.0/schema.json"], "collection": "landsat-c2-l2"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "Feature", "stac_version": "1.0.0", "id": "LC08_L2SP_188026_20141029_02_T1", "properties": {"platform": "landsat-8", "instruments": ["oli", "tirs"], "created": "2022-11-07T06:25:07.579Z", "gsd": 30, "description": "Landsat Collection 2 Level-2", "eo:cloud_cover": 14.96, "view:off_nadir": 0, "view:sun_elevation": 26.54166562, "view:sun_azimuth": 165.48491717, "proj:epsg": 32634, "proj:shape": [8071, 7971], "proj:transform": [30, 0, 259485, 0, -30, 5534415], "proj:centroid": {"lat": 48.85297, "lon": 19.31583}, "landsat:cloud_cover_land": 14.96, "landsat:wrs_type": "2", "landsat:wrs_path": "188", "landsat:wrs_row": "026", "landsat:collection_category": "T1", "landsat:collection_number": "02", "landsat:correction": "L2SP", "landsat:scene_id": "LC81880262014302LGN01", "landsat:product_generated": "2020-09-10T14:37:42Z", "grid:code": "WRS2-188026", "sci:doi": "10.5066/P9OGBGM6", "datetime": "2014-10-29T09:33:00.582050Z", "earthsearch:payload_id": "usgs-landsat-c2l2/workflow-landsat-to-stac/LC08_L2SP_188026_20141029_20200910_02_T1_SR", "processing:software": {"landsat-to-stac": "v2023.11.16"}, "updated": "2023-12-01T17:21:11.613Z"}, "geometry": {"type": "Polygon", "coordinates": [[[18.4281122252064, 49.92910951272109], [17.778596572642417, 48.22529926164956], [20.198994521986847, 47.79287339345743], [20.929716671074488, 49.490796471618104], [18.4281122252064, 49.92910951272109]]]}, "links": [], "assets": {}, "bbox": [17.652438, 47.741547, 20.979058, 49.960725], "stac_extensions": ["https://stac-extensions.github.io/storage/v1.0.0/schema.json", "https://stac-extensions.github.io/classification/v1.0.0/schema.json", "https://stac-extensions.github.io/raster/v1.1.0/schema.json", "https://stac-extensions.github.io/eo/v1.1.0/schema.json", "https://stac-extensions.github.io/view/v1.0.0/schema.json", "https://stac-extensions.github.io/projection/v1.1.0/schema.json", "https://stac-extensions.github.io/grid/v1.1.0/schema.json", "https://stac-extensions.github.io/landsat/v2.0.0/schema.json", "https://stac-extensions.github.io/processing/v1.1.0/schema.json", "https://stac-extensions.github.io/scientific/v1.0.0/schema.json"], "collection": "landsat-c2-l2"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "Feature", "stac_version": "1.0.0", "id": "LC08_L2SP_188026_20141114_02_T1", "properties": {"platform": "landsat-8", "instruments": ["oli", "tirs"], "created": "2022-11-07T04:05:29.859Z", "gsd": 30, "description": "Landsat Collection 2 Level-2", "eo:cloud_cover": 57.88, "view:off_nadir": 0, "view:sun_elevation": 21.81708479, "view:sun_azimuth": 166.18471534, "proj:epsg": 32634, "proj:shape": [8071, 7971], "proj:transform": [30, 0, 257985, 0, -30, 5534415], "proj:centroid": {"lat": 48.85294, "lon": 19.29635}, "landsat:cloud_cover_land": 57.88, "landsat:wrs_type": "2", "landsat:wrs_path": "188", "landsat:wrs_row": "026", "landsat:collection_category": "T1", "landsat:collection_number": "02", "landsat:correction": "L2SP", "landsat:scene_id": "LC81880262014318LGN02", "landsat:product_generated": "2020-09-10T14:47:24Z", "grid:code": "WRS2-188026", "sci:doi": "10.5066/P9OGBGM6", "datetime": "2014-11-14T09:33:04.231820Z", "earthsearch:payload_id": "usgs-landsat-c2l2/workflow-landsat-to-stac/LC08_L2SP_188026_20141114_20200910_02_T1_SR", "processing:software": {"landsat-to-stac": "v2023.11.16"}, "updated": "2023-12-01T18:56:16.757Z"}, "geometry": {"type": "Polygon", "coordinates": [[[18.408457917199318, 49.929211472764564], [17.758801512273795, 48.22528226007326], [20.179368671959875, 47.79273475600064], [20.910247244815835, 49.490783004831094], [18.408457917199318, 49.929211472764564]]]}, "links": [], "assets": {}, "bbox": [17.632336, 47.741136, 20.960187, 49.961097], "stac_extensions": ["https://stac-extensions.github.io/classification/v1.0.0/schema.json", "https://stac-extensions.github.io/processing/v1.1.0/schema.json", "https://stac-extensions.github.io/eo/v1.1.0/schema.json", "https://stac-extensions.github.io/storage/v1.0.0/schema.json", "https://stac-extensions.github.io/grid/v1.1.0/schema.json", "https://stac-extensions.github.io/view/v1.0.0/schema.json", "https://stac-extensions.github.io/projection/v1.1.0/schema.json", "https://stac-extensions.github.io/landsat/v2.0.0/schema.json", "https://stac-extensions.github.io/raster/v1.1.0/schema.json", "https://stac-extensions.github.io/scientific/v1.0.0/schema.json"], "collection": "landsat-c2-l2"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "Feature", "stac_version": "1.0.0", "id": "LC08_L2SP_188026_20141130_02_T1", "properties": {"platform": "landsat-8", "instruments": ["oli", "tirs"], "created": "2022-11-07T03:50:48.374Z", "gsd": 30, "description": "Landsat Collection 2 Level-2", "eo:cloud_cover": 25.36, "view:off_nadir": 0, "view:sun_elevation": 18.28998354, "view:sun_azimuth": 165.75681503, "proj:epsg": 32634, "proj:shape": [8071, 7971], "proj:transform": [30, 0, 257985, 0, -30, 5534415], "proj:centroid": {"lat": 48.8529, "lon": 19.29535}, "landsat:cloud_cover_land": 25.36, "landsat:wrs_type": "2", "landsat:wrs_path": "188", "landsat:wrs_row": "026", "landsat:collection_category": "T1", "landsat:collection_number": "02", "landsat:correction": "L2SP", "landsat:scene_id": "LC81880262014334LGN01", "landsat:product_generated": "2020-09-10T17:51:23Z", "grid:code": "WRS2-188026", "sci:doi": "10.5066/P9OGBGM6", "datetime": "2014-11-30T09:33:02.620494Z", "earthsearch:payload_id": "usgs-landsat-c2l2/workflow-landsat-to-stac/LC08_L2SP_188026_20141130_20200910_02_T1_SR", "processing:software": {"landsat-to-stac": "v2023.11.16"}, "updated": "2023-12-01T17:59:29.107Z"}, "geometry": {"type": "Polygon", "coordinates": [[[18.407205235611983, 49.929183457203635], [17.758011981306016, 48.22499002343451], [20.17856762000285, 47.792729026061], [20.90941875892997, 49.490782359094005], [18.407205235611983, 49.929183457203635]]]}, "links": [], "assets": {}, "bbox": [17.631138, 47.741072, 20.959395, 49.961065], "stac_extensions": ["https://stac-extensions.github.io/classification/v1.0.0/schema.json", "https://stac-extensions.github.io/storage/v1.0.0/schema.json", "https://stac-extensions.github.io/scientific/v1.0.0/schema.json", "https://stac-extensions.github.io/landsat/v2.0.0/schema.json", "https://stac-extensions.github.io/processing/v1.1.0/schema.json", "https://stac-extensions.github.io/eo/v1.1.0/schema.json", "https://stac-extensions.github.io/raster/v1.1.0/schema.json", "https://stac-extensions.github.io/grid/v1.1.0/schema.json", "https://stac-extensions.github.io/view/v1.0.0/schema.json", "https://stac-extensions.github.io/projection/v1.1.0/schema.json"], "collection": "landsat-c2-l2"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "Feature", "stac_version": "1.0.0", "id": "LC08_L2SP_188026_20141216_02_T1", "properties": {"platform": "landsat-8", "instruments": ["oli", "tirs"], "created": "2022-11-07T03:58:43.241Z", "gsd": 30, "description": "Landsat Collection 2 Level-2", "eo:cloud_cover": 97.49, "view:off_nadir": 0, "view:sun_elevation": 16.36270395, "view:sun_azimuth": 164.41951742, "proj:epsg": 32634, "proj:shape": [8071, 7971], "proj:transform": [30, 0, 258585, 0, -30, 5534415], "proj:centroid": {"lat": 48.85288, "lon": 19.30417}, "landsat:cloud_cover_land": 97.49, "landsat:wrs_type": "2", "landsat:wrs_path": "188", "landsat:wrs_row": "026", "landsat:collection_category": "T1", "landsat:collection_number": "02", "landsat:correction": "L2SP", "landsat:scene_id": "LC81880262014350LGN01", "landsat:product_generated": "2020-09-10T01:38:43Z", "grid:code": "WRS2-188026", "sci:doi": "10.5066/P9OGBGM6", "datetime": "2014-12-16T09:32:57.756245Z", "earthsearch:payload_id": "usgs-landsat-c2l2/workflow-landsat-to-stac/LC08_L2SP_188026_20141216_20200910_02_T1_SR", "processing:software": {"landsat-to-stac": "v2023.11.16"}, "updated": "2023-12-02T07:16:48.513Z"}, "geometry": {"type": "Polygon", "coordinates": [[[18.41598846897398, 49.92910973201144], [17.76690121631217, 48.22497064146861], [20.18737920516609, 47.79279174796789], [20.91811786217096, 49.49078884341267], [18.41598846897398, 49.92910973201144]]]}, "links": [], "assets": {}, "bbox": [17.640387, 47.741241, 20.96779, 49.960858], "stac_extensions": ["https://stac-extensions.github.io/projection/v1.1.0/schema.json", "https://stac-extensions.github.io/view/v1.0.0/schema.json", "https://stac-extensions.github.io/grid/v1.1.0/schema.json", "https://stac-extensions.github.io/classification/v1.0.0/schema.json", "https://stac-extensions.github.io/processing/v1.1.0/schema.json", "https://stac-extensions.github.io/landsat/v2.0.0/schema.json", "https://stac-extensions.github.io/scientific/v1.0.0/schema.json", "https://stac-extensions.github.io/storage/v1.0.0/schema.json", "https://stac-extensions.github.io/raster/v1.1.0/schema.json", "https://stac-extensions.github.io/eo/v1.1.0/schema.json"], "collection": "landsat-c2-l2"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "Feature", "stac_version": "1.0.0", "id": "LC08_L2SP_188027_20141013_02_T1", "properties": {"platform": "landsat-8", "instruments": ["oli", "tirs"], "created": "2022-11-07T06:05:13.853Z", "gsd": 30, "description": "Landsat Collection 2 Level-2", "eo:cloud_cover": 22.91, "view:off_nadir": 0, "view:sun_elevation": 33.28115094, "view:sun_azimuth": 162.82590924, "proj:epsg": 32634, "proj:shape": [8081, 7981], "proj:transform": [30, 0, 212385, 0, -30, 5378115], "proj:centroid": {"lat": 47.4366, "lon": 18.74125}, "landsat:cloud_cover_land": 22.91, "landsat:wrs_type": "2", "landsat:wrs_path": "188", "landsat:wrs_row": "027", "landsat:collection_category": "T1", "landsat:collection_number": "02", "landsat:correction": "L2SP", "landsat:scene_id": "LC81880272014286LGN01", "landsat:product_generated": "2020-09-10T23:51:31Z", "grid:code": "WRS2-188027", "sci:doi": "10.5066/P9OGBGM6", "datetime": "2014-10-13T09:33:28.106795Z", "earthsearch:payload_id": "usgs-landsat-c2l2/workflow-landsat-to-stac/LC08_L2SP_188027_20141013_20200910_02_T1_SR", "processing:software": {"landsat-to-stac": "v2023.11.16"}, "updated": "2023-12-01T19:37:11.322Z"}, "geometry": {"type": "Polygon", "coordinates": [[[17.870284546356892, 48.50965702750799], [17.24800176783551, 46.80335364052247], [19.60629617367866, 46.37799074788433], [20.304522051540737, 48.07913733417695], [17.870284546356892, 48.50965702750799]]]}, "links": [], "assets": {}, "bbox": [17.110474, 46.31629, 20.371828, 48.553468], "stac_extensions": ["https://stac-extensions.github.io/eo/v1.1.0/schema.json", "https://stac-extensions.github.io/storage/v1.0.0/schema.json", "https://stac-extensions.github.io/raster/v1.1.0/schema.json", "https://stac-extensions.github.io/projection/v1.1.0/schema.json", "https://stac-extensions.github.io/grid/v1.1.0/schema.json", "https://stac-extensions.github.io/landsat/v2.0.0/schema.json", "https://stac-extensions.github.io/scientific/v1.0.0/schema.json", "https://stac-extensions.github.io/processing/v1.1.0/schema.json", "https://stac-extensions.github.io/classification/v1.0.0/schema.json", "https://stac-extensions.github.io/view/v1.0.0/schema.json"], "collection": "landsat-c2-l2"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "Feature", "stac_version": "1.0.0", "id": "LC08_L2SP_188027_20141029_02_T1", "properties": {"platform": "landsat-8", "instruments": ["oli", "tirs"], "created": "2022-11-07T06:26:14.287Z", "gsd": 30, "description": "Landsat Collection 2 Level-2", "eo:cloud_cover": 76.04, "view:off_nadir": 0, "view:sun_elevation": 27.83211096, "view:sun_azimuth": 164.79971127, "proj:epsg": 32634, "proj:shape": [8081, 7981], "proj:transform": [30, 0, 213585, 0, -30, 5378115], "proj:centroid": {"lat": 47.43672, "lon": 18.75575}, "landsat:cloud_cover_land": 76.04, "landsat:wrs_type": "2", "landsat:wrs_path": "188", "landsat:wrs_row": "027", "landsat:collection_category": "T1", "landsat:collection_number": "02", "landsat:correction": "L2SP", "landsat:scene_id": "LC81880272014302LGN01", "landsat:product_generated": "2020-09-10T18:01:42Z", "grid:code": "WRS2-188027", "sci:doi": "10.5066/P9OGBGM6", "datetime": "2014-10-29T09:33:24.464615Z", "earthsearch:payload_id": "usgs-landsat-c2l2/workflow-landsat-to-stac/LC08_L2SP_188027_20141029_20200910_02_T1_SR", "processing:software": {"landsat-to-stac": "v2023.11.16"}, "updated": "2023-12-01T17:19:49.959Z"}, "geometry": {"type": "Polygon", "coordinates": [[[17.8849020915899, 48.5097839665062], [17.262555156686865, 46.803290451120304], [19.620725665960904, 46.37816572781535], [20.31901772899867, 48.079494070422164], [17.8849020915899, 48.5097839665062]]]}, "links": [], "assets": {}, "bbox": [17.125631, 46.31682, 20.385664, 48.553178], "stac_extensions": ["https://stac-extensions.github.io/classification/v1.0.0/schema.json", "https://stac-extensions.github.io/storage/v1.0.0/schema.json", "https://stac-extensions.github.io/scientific/v1.0.0/schema.json", "https://stac-extensions.github.io/landsat/v2.0.0/schema.json", "https://stac-extensions.github.io/processing/v1.1.0/schema.json", "https://stac-extensions.github.io/eo/v1.1.0/schema.json", "https://stac-extensions.github.io/raster/v1.1.0/schema.json", "https://stac-extensions.github.io/grid/v1.1.0/schema.json", "https://stac-extensions.github.io/view/v1.0.0/schema.json", "https://stac-extensions.github.io/projection/v1.1.0/schema.json"], "collection": "landsat-c2-l2"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "Feature", "stac_version": "1.0.0", "id": "LC08_L2SP_188027_20141114_02_T1", "properties": {"platform": "landsat-8", "instruments": ["oli", "tirs"], "created": "2022-11-07T05:26:39.730Z", "gsd": 30, "description": "Landsat Collection 2 Level-2", "eo:cloud_cover": 79.92, "view:off_nadir": 0, "view:sun_elevation": 23.11597194, "view:sun_azimuth": 165.57270312, "proj:epsg": 32634, "proj:shape": [8081, 7981], "proj:transform": [30, 0, 212085, 0, -30, 5378115], "proj:centroid": {"lat": 47.43671, "lon": 18.73638}, "landsat:cloud_cover_land": 79.92, "landsat:wrs_type": "2", "landsat:wrs_path": "188", "landsat:wrs_row": "027", "landsat:collection_category": "T1", "landsat:collection_number": "02", "landsat:correction": "L2SP", "landsat:scene_id": "LC81880272014318LGN02", "landsat:product_generated": "2020-09-10T14:47:14Z", "grid:code": "WRS2-188027", "sci:doi": "10.5066/P9OGBGM6", "datetime": "2014-11-14T09:33:28.114385Z", "earthsearch:payload_id": "usgs-landsat-c2l2/workflow-landsat-to-stac/LC08_L2SP_188027_20141114_20200910_02_T1_SR", "processing:software": {"landsat-to-stac": "v2023.11.16"}, "updated": "2023-12-01T18:56:17.979Z"}, "geometry": {"type": "Polygon", "coordinates": [[[17.865400975787136, 48.50979396000352], [17.24329394815146, 46.80319899567921], [19.60160947561551, 46.378203518607876], [20.299685323963068, 48.07937787152067], [17.865400975787136, 48.50979396000352]]]}, "links": [], "assets": {}, "bbox": [17.10566, 46.316422, 20.366886, 48.553563], "stac_extensions": ["https://stac-extensions.github.io/classification/v1.0.0/schema.json", "https://stac-extensions.github.io/storage/v1.0.0/schema.json", "https://stac-extensions.github.io/raster/v1.1.0/schema.json", "https://stac-extensions.github.io/eo/v1.1.0/schema.json", "https://stac-extensions.github.io/grid/v1.1.0/schema.json", "https://stac-extensions.github.io/view/v1.0.0/schema.json", "https://stac-extensions.github.io/landsat/v2.0.0/schema.json", "https://stac-extensions.github.io/processing/v1.1.0/schema.json", "https://stac-extensions.github.io/scientific/v1.0.0/schema.json", "https://stac-extensions.github.io/projection/v1.1.0/schema.json"], "collection": "landsat-c2-l2"}
Loading

0 comments on commit 7c96ac4

Please sign in to comment.