Skip to content

Instantly share code, notes, and snippets.

@andrewharvey
Last active January 18, 2020 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewharvey/57da8ad7f9f425d4c811e6cd33b2fdcb to your computer and use it in GitHub Desktop.
Save andrewharvey/57da8ad7f9f425d4c811e6cd33b2fdcb to your computer and use it in GitHub Desktop.
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
Display the source blob
Display the rendered blob
Raw
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