Skip to content

Instantly share code, notes, and snippets.

@daviessm
daviessm / aircraft.sh
Last active August 21, 2022 20:56
dump1090 aircraft.json to geojson using jq
jq '{ "type": "FeatureCollection", "features": [ .aircraft[] | select(.lat and .lon) | { "type": "Feature", "properties": { "flight": .flight | select (.) | gsub(" ";""), "hex": .hex, "altitude": .alt_baro | select (.) }, "geometry": { "type": "Point", "coordinates": [ .lon, .lat, (.alt_geom // 0) /3.281 // 0 ] } } ] }' aircraft.json