Skip to content

Instantly share code, notes, and snippets.

@johnwbryant
Last active September 17, 2023 03:35
Show Gist options
  • Save johnwbryant/06b504e2cfb4044c5216a1627ccc6180 to your computer and use it in GitHub Desktop.
Save johnwbryant/06b504e2cfb4044c5216a1627ccc6180 to your computer and use it in GitHub Desktop.
Extract Australia data in a usable format from Microsoft road detections data
#!/bin/bash
# see https://github.com/microsoft/RoadDetections
# 1) get the data
wget https://usaminedroads.blob.core.windows.net/road-detections/Oceania-Full.zip
# 2) extract the records for Australia, second column of tsv only
zgrep AUS Oceania-Full.zip | cut -f2 > AUS.geojson
# 3) convert to GPKG, works better in QGIS
ogr2ogr -f GPKG Oceania_AUS.gpkg AUS.geojson
@mykol404
Copy link

How would I run this to convert a full dataset (such as South America) without extracting a country? I played around with the command and cannot figure it out. Any help would be tremendously appreciated!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment