diff --git a/.ipynb_checkpoints/Submits-checkpoint.ipynb b/.ipynb_checkpoints/Submits-checkpoint.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..4cdf31f5d07d6718ae863b698d877506a33905f1 --- /dev/null +++ b/.ipynb_checkpoints/Submits-checkpoint.ipynb @@ -0,0 +1,99 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "eba827ac-df76-4a9f-a0d9-b5c9508ea451", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/plain": [ + "'hopebear_ecu'" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from maap.maap import MAAP\n", + "maap = MAAP(maap_host=\"api.maap-project.org\")\n", + "username = maap.profile.account_info()[\"username\"]\n", + "username" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "056b2983-f5bb-4475-af36-ec75284b2b6d", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "GEDI02_A_2019112105540_O02028_02_T04330_02_003_01_V002.h5\n", + "GEDI02_A_2019114183224_O02064_03_T05177_02_003_01_V002.h5\n" + ] + } + ], + "source": [ + "# get files \n", + "import os\n", + "directory_path = \"/projects/shared-buckets/hopebear_ecu/data/l2a\"\n", + "file_list = os.listdir(directory_path)\n", + "# Print the list of files\n", + "for file in file_list:\n", + " print(file) \n", + " maap.submitJob(identifier=file, \n", + " algo_id=\"spacebornelidar2gis\",\n", + " version=\"main\",username=\"hopebear_ecu\",\n", + " queue=\"maap-dps-worker-16gb\",\n", + " input_h5=\"https://maap-ops-workspace.s3.amazonaws.com/shared/hopebear_ecu/data/l2a/\" + file,\n", + " output_gpkg= file[:-3] + \".gpkg\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "91b50374-3a6e-40a5-81fe-9cd6c389aca7", + "metadata": {}, + "outputs": [], + "source": [ + "maap.submitJob(identifier=\"get gpkg\", \n", + " algo_id=\"spacebornelidar2gis\",\n", + " version=\"main\",username=\"hopebear_ecu\",\n", + " queue=\"maap-dps-worker-16gb\",\n", + " input_h5=\"https://maap-ops-workspace.s3.amazonaws.com/shared/hopebear_ecu/data/l2a/GEDI02_A_2023047184921_O23680_03_T02331_02_003_02_V002.h5\",\n", + " output_gpkg=\"output_gedi.gpkg\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/.ipynb_checkpoints/run_sl2gis-checkpoint.sh b/.ipynb_checkpoints/run_sl2gis-checkpoint.sh index b05e9cf08e349257f1befcbea4c9491ba99a35b2..5d695d2d62150b2f72acc74a4d813729136ca7c5 100644 --- a/.ipynb_checkpoints/run_sl2gis-checkpoint.sh +++ b/.ipynb_checkpoints/run_sl2gis-checkpoint.sh @@ -8,4 +8,4 @@ INPUT_FILENAME=$(ls input/*.h5) # # | head -1 get first input tif file. # ea OUTPUT_FILENAME=$1 basedir=$(cd "$(dirname "$0")" ; pwd -P) # $0 represents the script name itself mkdir -p output -pysl4landgeditools.py --input_file ${INPUT_FILENAME} --output_file output/${OUTPUT_FILENAME} \ No newline at end of file +pysl4landicesat2tools.py --input ${INPUT_FILENAME} --output output/${OUTPUT_FILENAME} \ No newline at end of file diff --git a/Submits.ipynb b/Submits.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..421d003d6b48eb216ed5618bba183d8204e52466 --- /dev/null +++ b/Submits.ipynb @@ -0,0 +1,255 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "eba827ac-df76-4a9f-a0d9-b5c9508ea451", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/plain": [ + "'hopebear_ecu'" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from maap.maap import MAAP\n", + "maap = MAAP(maap_host=\"api.maap-project.org\")\n", + "username = maap.profile.account_info()[\"username\"]\n", + "username" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "056b2983-f5bb-4475-af36-ec75284b2b6d", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "GEDI02_A_2019112105540_O02028_02_T04330_02_003_01_V002.h5\n", + "GEDI02_A_2019114183224_O02064_03_T05177_02_003_01_V002.h5\n", + "GEDI02_A_2019119081309_O02135_02_T04024_02_003_01_V002.h5\n", + "GEDI02_A_2019143221824_O02517_02_T05401_02_003_01_V002.h5\n", + "GEDI02_A_2019157014400_O02721_03_T02484_02_003_01_V002.h5\n", + "GEDI02_A_2019165134944_O02853_02_T02907_02_003_01_V002.h5\n", + "GEDI02_A_2019180075351_O03082_02_T00826_02_003_01_V002.h5\n", + "GEDI02_A_2019182153324_O03118_03_T02790_02_003_01_V002.h5\n", + "GEDI02_A_2019191034034_O03250_02_T00214_02_003_01_V002.h5\n", + "GEDI02_A_2019205214751_O03479_02_T01943_02_003_02_V002.h5\n", + "GEDI02_A_2019216173504_O03647_02_T01178_02_003_02_V002.h5\n", + "GEDI02_A_2019220155440_O03708_02_T05095_02_003_01_V002.h5\n", + "GEDI02_A_2019222233442_O03744_03_T05483_02_003_01_V002.h5\n", + "GEDI02_A_2019231114408_O03876_02_T05447_02_003_01_V002.h5\n", + "GEDI02_A_2019241160930_O04034_03_T04060_02_003_02_V002.h5\n", + "GEDI02_A_2019254024304_O04227_02_T03060_02_003_01_V002.h5\n", + "GEDI02_A_2019260084659_O04324_03_T05330_02_003_01_V002.h5\n", + "GEDI02_A_2019276174708_O04578_02_T01484_02_003_01_V002.h5\n", + "GEDI02_A_2019280160958_O04639_02_T00520_02_003_01_V002.h5\n", + "GEDI02_A_2019282235147_O04675_03_T02178_02_003_01_V002.h5\n", + "GEDI02_A_2019284143233_O04700_02_T03978_02_003_01_V002.h5\n", + "GEDI02_A_2019286221426_O04736_03_T01214_02_003_01_V002.h5\n", + "GEDI02_A_2019299085032_O04929_02_T02754_02_003_01_V002.h5\n", + "GEDI02_A_2019303071304_O04990_02_T00367_02_003_01_V002.h5\n", + "GEDI02_A_2019307053534_O05051_02_T03825_02_003_01_V002.h5\n", + "GEDI02_A_2019309131720_O05087_03_T03907_02_003_01_V002.h5\n", + "GEDI02_A_2019325221832_O05341_02_T04177_02_003_01_V002.h5\n", + "GEDI02_A_2019329204147_O05402_02_T04789_02_003_01_V002.h5\n", + "GEDI02_A_2019333190458_O05463_02_T02402_02_003_01_V002.h5\n", + "GEDI02_A_2019336024706_O05499_03_T03754_02_003_01_V002.h5\n", + "GEDI02_A_2020073015708_O07080_02_T02601_02_003_01_V002.h5\n", + "GEDI02_A_2020077002315_O07141_02_T05600_02_003_01_V002.h5\n", + "GEDI02_A_2020080224945_O07202_02_T01178_02_003_01_V002.h5\n", + "GEDI02_A_2020147202232_O08239_02_T04024_02_003_01_V002.h5\n", + "GEDI02_A_2020155171336_O08361_02_T00061_02_003_01_V002.h5\n", + "GEDI02_A_2020159153904_O08422_02_T04483_02_003_01_V002.h5\n", + "GEDI02_A_2020163140430_O08483_02_T04636_02_003_01_V002.h5\n", + "GEDI02_A_2020167122954_O08544_02_T04942_02_003_01_V002.h5\n", + "GEDI02_A_2020171105517_O08605_02_T02249_02_003_01_V002.h5\n", + "GEDI02_A_2020173183847_O08641_03_T05024_02_003_01_V002.h5\n", + "GEDI02_A_2020175092039_O08666_02_T03672_02_003_01_V002.h5\n", + "GEDI02_A_2020177170407_O08702_03_T00755_02_003_01_V002.h5\n", + "GEDI02_A_2020179074559_O08727_02_T02555_02_003_01_V002.h5\n", + "GEDI02_A_2020181152926_O08763_03_T00908_02_003_01_V002.h5\n", + "GEDI02_A_2020185135443_O08824_03_T01061_02_003_01_V002.h5\n", + "GEDI02_A_2020189122103_O08885_03_T05636_02_003_01_V002.h5\n", + "GEDI02_A_2020343145700_O11274_02_T11139_02_003_02_V002.h5\n", + "GEDI02_A_2020347132321_O11335_02_T08293_02_003_02_V002.h5\n", + "GEDI02_A_2020351114942_O11396_02_T06870_02_003_02_V002.h5\n", + "GEDI02_A_2020355101600_O11457_02_T09716_02_003_02_V002.h5\n", + "GEDI02_A_2020359084214_O11518_02_T11292_02_003_02_V002.h5\n", + "GEDI02_A_2020363070823_O11579_02_T08446_02_003_02_V002.h5\n", + "GEDI02_A_2021001053434_O11640_02_T07023_02_003_02_V002.h5\n", + "GEDI02_A_2021005040039_O11701_02_T09869_02_003_02_V002.h5\n", + "GEDI02_A_2021009022644_O11762_02_T01637_02_003_02_V002.h5\n", + "GEDI02_A_2021013005243_O11823_02_T05753_02_003_02_V002.h5\n", + "GEDI02_A_2021016231839_O11884_02_T07329_02_003_02_V002.h5\n", + "GEDI02_A_2021020214435_O11945_02_T08752_02_003_02_V002.h5\n", + "GEDI02_A_2021024201143_O12006_02_T05906_02_003_02_V002.h5\n", + "GEDI02_A_2021028183909_O12067_02_T08599_02_003_02_V002.h5\n", + "GEDI02_A_2021036153339_O12189_02_T10022_02_003_02_V002.h5\n", + "GEDI02_A_2021044122804_O12311_02_T08293_02_003_02_V002.h5\n", + "GEDI02_A_2021122140302_O13521_03_T11328_02_003_02_V002.h5\n", + "GEDI02_A_2021126123009_O13582_03_T06906_02_003_02_V002.h5\n", + "GEDI02_A_2021130105715_O13643_03_T11175_02_003_02_V002.h5\n", + "GEDI02_A_2021134092416_O13704_03_T06753_02_003_02_V002.h5\n", + "GEDI02_A_2021138075114_O13765_03_T08176_02_003_02_V002.h5\n", + "GEDI02_A_2021142061819_O13826_03_T09446_02_003_02_V002.h5\n", + "GEDI02_A_2021143210100_O13851_02_T09670_02_003_02_V002.h5\n", + "GEDI02_A_2021146044538_O13887_03_T02331_02_003_02_V002.h5\n", + "GEDI02_A_2021147192817_O13912_02_T00979_02_003_02_V002.h5\n", + "GEDI02_A_2021151175532_O13973_02_T06671_02_003_02_V002.h5\n", + "GEDI02_A_2021154014008_O14009_03_T09140_02_003_02_V002.h5\n", + "GEDI02_A_2021155162246_O14034_02_T09364_02_003_02_V002.h5\n", + "GEDI02_A_2021159144955_O14095_02_T03519_02_003_02_V002.h5\n", + "GEDI02_A_2021163131702_O14156_02_T09211_02_003_02_V002.h5\n", + "GEDI02_A_2021167114407_O14217_02_T00673_02_003_02_V002.h5\n", + "GEDI02_A_2021171101109_O14278_02_T10634_02_003_02_V002.h5\n", + "GEDI02_A_2021179070613_O14400_02_T10328_02_003_02_V002.h5\n", + "GEDI02_A_2021187040159_O14522_02_T04177_02_003_02_V002.h5\n", + "GEDI02_A_2021191022951_O14583_02_T06870_02_003_02_V002.h5\n", + "GEDI02_A_2021237163236_O15305_03_T09752_02_003_02_V002.h5\n", + "GEDI02_A_2021241150122_O15366_03_T06600_02_003_02_V002.h5\n", + "GEDI02_A_2021243054435_O15391_02_T05248_02_003_02_V002.h5\n", + "GEDI02_A_2021247041306_O15452_02_T03672_02_003_02_V002.h5\n", + "GEDI02_A_2021251024134_O15513_02_T04789_02_003_02_V002.h5\n", + "GEDI02_A_2021258233918_O15635_02_T02754_02_003_02_V002.h5\n", + "GEDI02_A_2021293182155_O16174_03_T08482_02_003_02_V002.h5\n", + "GEDI02_A_2021297164948_O16235_03_T09599_02_003_02_V002.h5\n", + "GEDI02_A_2021305134508_O16357_03_T09293_02_003_02_V002.h5\n", + "GEDI02_A_2021307042748_O16382_02_T05248_02_003_02_V002.h5\n", + "GEDI02_A_2021309121226_O16418_03_T07870_02_003_02_V002.h5\n", + "GEDI02_A_2021318235051_O16565_02_T09058_02_003_02_V002.h5\n", + "GEDI02_A_2021322221922_O16626_02_T06059_02_003_02_V002.h5\n", + "GEDI02_A_2021326204749_O16687_02_T10022_02_003_02_V002.h5\n", + "GEDI02_A_2021330191611_O16748_02_T11139_02_003_02_V002.h5\n", + "GEDI02_A_2022001051541_O17297_02_T11292_02_003_02_V002.h5\n", + "GEDI02_A_2022005033937_O17358_02_T10175_02_003_02_V002.h5\n", + "GEDI02_A_2022013002718_O17480_02_T08094_02_003_02_V002.h5\n", + "GEDI02_A_2022015081043_O17516_03_T10869_02_003_02_V002.h5\n", + "GEDI02_A_2022019063549_O17577_03_T08329_02_003_02_V002.h5\n", + "GEDI02_A_2022043123129_O17953_02_T02601_02_003_02_V002.h5\n", + "GEDI02_A_2022051091938_O18075_02_T08905_02_003_04_V002.h5\n", + "GEDI02_A_2022055074324_O18136_02_T06518_02_003_02_V002.h5\n", + "GEDI02_A_2022057152605_O18172_03_T08023_02_003_03_V002.h5\n", + "GEDI02_A_2022059060755_O18197_02_T08247_02_003_02_V002.h5\n", + "GEDI02_A_2022061135115_O18233_03_T08176_02_003_02_V002.h5\n", + "GEDI02_A_2022065121613_O18294_03_T02790_02_003_03_V002.h5\n", + "GEDI02_A_2022093163943_O18731_02_T08446_02_003_02_V002.h5\n", + "GEDI02_A_2022097150330_O18792_02_T01637_02_003_02_V002.h5\n", + "GEDI02_A_2022101132701_O18853_02_T07788_02_003_02_V002.h5\n", + "GEDI02_A_2022103210914_O18889_03_T09140_02_003_02_V002.h5\n", + "GEDI02_A_2022105115012_O18914_02_T11093_02_003_02_V002.h5\n", + "GEDI02_A_2022107193219_O18950_03_T05483_02_003_02_V002.h5\n", + "GEDI02_A_2022124043524_O19204_02_T11139_02_003_02_V002.h5\n", + "GEDI02_A_2022128025857_O19265_02_T04483_02_003_02_V002.h5\n", + "GEDI02_A_2022134090427_O19362_03_T10716_02_003_03_V002.h5\n", + "GEDI02_A_2022142055433_O19484_03_T11175_02_003_02_V002.h5\n", + "GEDI02_A_2022162132334_O19799_02_T01331_02_003_03_V002.h5\n", + "GEDI02_A_2022166114659_O19860_02_T03060_02_003_03_V002.h5\n", + "GEDI02_A_2022170101058_O19921_02_T10787_02_003_03_V002.h5\n", + "GEDI02_A_2022174083458_O19982_02_T10940_02_003_03_V002.h5\n", + "GEDI02_A_2022200220915_O20394_02_T05906_02_003_03_V002.h5\n", + "GEDI02_A_2022204203222_O20455_02_T07941_02_003_03_V002.h5\n", + "GEDI02_A_2022207041426_O20491_03_T09293_02_003_03_V002.h5\n", + "GEDI02_A_2022223131310_O20745_02_T01484_02_003_02_V002.h5\n", + "GEDI02_A_2022227113556_O20806_02_T10481_02_003_02_V002.h5\n", + "GEDI02_A_2022231095831_O20867_02_T06824_02_003_02_V002.h5\n", + "GEDI02_A_2022233174015_O20903_03_T09752_02_003_02_V002.h5\n", + "GEDI02_A_2022250024122_O21157_02_T05753_02_003_02_V002.h5\n", + "GEDI02_A_2022254010420_O21218_02_T10634_02_003_02_V002.h5\n", + "GEDI02_A_2022260070902_O21315_03_T11328_02_003_02_V002.h5\n", + "GEDI02_A_2022272174441_O21508_02_T07023_02_003_02_V002.h5\n", + "GEDI02_A_2022276160803_O21569_02_T03213_02_003_02_V002.h5\n", + "GEDI02_A_2022280143220_O21630_02_T02249_02_003_02_V002.h5\n", + "GEDI02_A_2022282221458_O21666_03_T07870_02_003_02_V002.h5\n", + "GEDI02_A_2022284125609_O21691_02_T03978_02_003_02_V002.h5\n", + "GEDI02_A_2022286203830_O21727_03_T08329_02_003_02_V002.h5\n", + "GEDI02_A_2022311023408_O22103_02_T09869_02_003_02_V002.h5\n", + "GEDI02_A_2022315005757_O22164_02_T00214_02_003_02_V002.h5\n", + "GEDI02_A_2022318232126_O22225_02_T06365_02_003_02_V002.h5\n", + "GEDI02_A_2022321070341_O22261_03_T00755_02_003_02_V002.h5\n", + "GEDI02_A_2022322214437_O22286_02_T09670_02_003_02_V002.h5\n", + "GEDI02_A_2022325052645_O22322_03_T04060_02_003_02_V002.h5\n", + "GEDI02_A_2022341142826_O22576_02_T04330_02_003_02_V002.h5\n", + "GEDI02_A_2022345125222_O22637_02_T06059_02_003_02_V002.h5\n", + "GEDI02_A_2022349111602_O22698_02_T00826_02_003_02_V002.h5\n", + "GEDI02_A_2022351185822_O22734_03_T10869_02_003_02_V002.h5\n", + "GEDI02_A_2023011005036_O23110_02_T00061_02_003_02_V002.h5\n", + "GEDI02_A_2023014231323_O23171_02_T06212_02_003_02_V002.h5\n", + "GEDI02_A_2023017065509_O23207_03_T02178_02_003_02_V002.h5\n", + "GEDI02_A_2023018213546_O23232_02_T01132_02_003_02_V002.h5\n", + "GEDI02_A_2023021051822_O23268_03_T02637_02_003_02_V002.h5\n", + "GEDI02_A_2023037141906_O23522_02_T02907_02_003_02_V002.h5\n", + "GEDI02_A_2023045110710_O23644_02_T07941_02_003_02_V002.h5\n", + "GEDI02_A_2023047184921_O23680_03_T02331_02_003_02_V002.h5\n" + ] + } + ], + "source": [ + "# get files \n", + "import os\n", + "directory_path = \"/projects/shared-buckets/hopebear_ecu/data/l2a\"\n", + "file_list = os.listdir(directory_path)\n", + "# Print the list of files\n", + "submitted_jobs = []\n", + "for file in file_list[:10]:\n", + " print(file) \n", + " job = maap.submitJob(identifier=file, \n", + " algo_id=\"spacebornelidar2gis\",\n", + " version=\"main\",username=\"hopebear_ecu\",\n", + " queue=\"maap-dps-worker-16gb\",\n", + " input_h5=\"https://maap-ops-workspace.s3.amazonaws.com/shared/hopebear_ecu/data/l2a/\" + file,\n", + " output_gpkg= file[:-3] + \".gpkg\")\n", + " submitted_jobs.append(job)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "91b50374-3a6e-40a5-81fe-9cd6c389aca7", + "metadata": {}, + "outputs": [], + "source": [ + "maap.submitJob(identifier=\"get gpkg\", \n", + " algo_id=\"spacebornelidar2gis\",\n", + " version=\"main\",username=\"hopebear_ecu\",\n", + " queue=\"maap-dps-worker-16gb\",\n", + " input_h5=\"https://maap-ops-workspace.s3.amazonaws.com/shared/hopebear_ecu/data/l2a/GEDI02_A_2023047184921_O23680_03_T02331_02_003_02_V002.h5\",\n", + " output_gpkg=\"output_gedi.gpkg\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/input/ATL08_20211113031823_07891307_006_01.h5 b/input/ATL08_20211113031823_07891307_006_01.h5 new file mode 100644 index 0000000000000000000000000000000000000000..432d22efaccadd1ceabe38e7424027d69e715651 Binary files /dev/null and b/input/ATL08_20211113031823_07891307_006_01.h5 differ diff --git a/output/test.gpkg b/output/test.gpkg new file mode 100644 index 0000000000000000000000000000000000000000..11c6644d5e2bebd1c65aa281f81796b18356f105 Binary files /dev/null and b/output/test.gpkg differ diff --git a/run_sl2gis.sh b/run_sl2gis.sh index b05e9cf08e349257f1befcbea4c9491ba99a35b2..5d695d2d62150b2f72acc74a4d813729136ca7c5 100644 --- a/run_sl2gis.sh +++ b/run_sl2gis.sh @@ -8,4 +8,4 @@ INPUT_FILENAME=$(ls input/*.h5) # # | head -1 get first input tif file. # ea OUTPUT_FILENAME=$1 basedir=$(cd "$(dirname "$0")" ; pwd -P) # $0 represents the script name itself mkdir -p output -pysl4landgeditools.py --input_file ${INPUT_FILENAME} --output_file output/${OUTPUT_FILENAME} \ No newline at end of file +pysl4landicesat2tools.py --input ${INPUT_FILENAME} --output output/${OUTPUT_FILENAME} \ No newline at end of file