Skip to content

Instantly share code, notes, and snippets.

@andrewharvey

andrewharvey/README.md

Last active Jan 18, 2020
Embed
What would you like to do?
Maxar 2020 Australian Bushfire Imagery

Maxar 2020 Australian Bushfire Imagery

https://blog.maxar.com/open-data-program/2020/open-data-response-to-the-australian-wildfires

List all imagery:

wget -O - 'https://www.digitalglobe.com/ecosystem/open-data/australia-wildfires' 2>/dev/null | grep -o 'https://opendata[^"]*\.tif' | sort | uniq 2>/dev/null

Download all imagery:

wget -O - 'https://www.digitalglobe.com/ecosystem/open-data/australia-wildfires' | grep -o 'https://opendata[^"]*\.tif' | sort | uniq | wget -i - --no-clobber

Upload to Mapbox:

for f in *.tif; do
    b=`basename $f .tif`
    mapbox upload --name "Maxar $b" openstreetmapau.$b $f
done

Get JOSM/iD URLs:

# this is the same token as used in ELI for use in JOSM and iD for these imagery layers
export token="pk.eyJ1Ijoib3BlbnN0cmVldG1hcGF1IiwiYSI6ImNqbWl3bXZ6aDA0MTkzd21xdnV1d2k0azEifQ.HYkMOqH_E2fYd1b0oXRe6w"
for i in `wget -O - 'https://www.digitalglobe.com/ecosystem/open-data/australia-wildfires' 2>/dev/null | grep -o 'https://opendata[^"]*\.tif' | sort | uniq | cut -d'/' -f7,8 2>/dev/null`; do
    date=`echo $i | cut -d'/' -f1`
    id=`echo $i | cut -d'/' -f2`

    echo "$date tms:https://{switch:a,b,c,d}.tiles.mapbox.com/v4/openstreetmapau.$id/{zoom}/{x}/{y}.jpg?access_token=$token"
done

gdaltindex

wget -O - 'https://www.digitalglobe.com/ecosystem/open-data/australia-wildfires' 2>/dev/null | grep -o 'https://opendata[^"]*\.tif' | sort | uniq | sed 's/^/\/vsicurl\//' | xargs gdaltindex -f GeoJSON /tmp/index.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.