geowatch.demo.demo_region module¶
Demodata for a simple region and site model
See also
../cli/stac_search.py ../stac/stac_search_builder.py
CommandLine
###
# Create the demo dataset
###
# Create a demo region file
xdoctest -m geowatch.demo.demo_region demo_khq_region_fpath
DATASET_SUFFIX=DemoKHQ-2022-09-19-V7
DEMO_DPATH=$HOME/.cache/geowatch/demo/datasets
REGION_FPATH="$HOME/.cache/geowatch/demo/annotations/KHQ_R001.geojson"
SITE_GLOBSTR="$HOME/.cache/geowatch/demo/annotations/KHQ_R001_sites/*.geojson"
REGION_ID=$(jq -r '.features[] | select(.properties.type=="region") | .properties.region_id' "$REGION_FPATH")
RESULT_FPATH=$DEMO_DPATH/all_sensors_kit/${REGION_ID}.input
mkdir -p "$DEMO_DPATH"
# Define SMART_STAC_API_KEY
source "$HOME"/code/watch/secrets/secrets
# Delete this to prevent duplicates
rm -f "$RESULT_FPATH"
# Construct the TA2-ready dataset
python -m geowatch.cli.queue_cli.prepare_ta2_dataset \
--dataset_suffix=$DATASET_SUFFIX \
--cloud_cover=100 \
--stac_query_mode=auto \
--sensors "L2-L8" \
--api_key=env:SMART_STAC_API_KEY \
--collated False \
--requester_pays=True \
--dvc_dpath="$DEMO_DPATH" \
--aws_profile=iarpa \
--region_globstr="$REGION_FPATH" \
--site_globstr="$SITE_GLOBSTR" \
--fields_workers=8 \
--convert_workers=8 \
--align_workers=26 \
--cache=0 \
--ignore_duplicates=1 \
--separate_region_queues=1 \
--separate_align_jobs=1 \
--target_gsd=30 \
--visualize=True \
--serial=True --run=1
# Package up for release on IPFS
DATASET_DPATH=$DEMO_DPATH/Aligned-$DATASET_SUFFIX
rm $DATASET_DPATH/img*kwcoco.json
rm -rf $DATASET_DPATH/_viz512
rm -rf $DATASET_DPATH/_cache
7z a $DATASET_DPATH.zip $DATASET_DPATH
# Pin the data to IPFS
DATASET_CID=$(ipfs add -Q -w $DATASET_DPATH.zip --cid-version=1 -s size-1048576)
echo "On Remote machines run: "
echo "ipfs pin add $DATASET_CID"
# Look at the contents of the underlying folder to build scripts.
echo "DATASET_CID = $DATASET_CID"
echo "DATASET_SUFFIX=$DATASET_SUFFIX"
ipfs ls "$DATASET_CID"
# Pin on a remote service
ipfs pin remote add --service=web3.storage.erotemic --name="$DATASET_SUFFIX" $DATASET_CID --background
ipfs pin remote ls --service=web3.storage.erotemic --cid=$DATASET_CID --status=queued,pinning,pinned,failed
DATASET_CID=bafybeigdkhphpa3n3rdv33w7g6tukmprdnch7g4bp4hc6ebmcr76y6yhwu
ipfs pin remote ls --service=web3.storage.erotemic --cid=$DATASET_CID --status=queued,pinning,pinned,failed
- geowatch.demo.demo_region.demo_khq_annots()[source]¶
A small demo region around KHQ while it is being built
Notes
The dates for this demo are rough. THis is the information we have.
Some cleanup of the site was happening early in 2017 (and perhaps even as early as 2016
Land clearing photo 2017-10-06
Constructions began in 2017.
In late 2017 the first structures went up (the stairwells)
Stairwell photo dated 2017-11-19
Photo of final building construction stages on 2018-11-29
Landscaping continued beyond building construction
We moved in in late 2018