Skip to content

Instantly share code, notes, and snippets.

@aborruso
Created July 29, 2020 08:39
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 aborruso/d164b9568b725b3ae99faeccff204bce to your computer and use it in GitHub Desktop.
Save aborruso/d164b9568b725b3ae99faeccff204bce to your computer and use it in GitHub Desktop.

Come convertire coordinate da gradi minuti e secondi in gradi decimali

Qui come farlo con cs2cs.

A partire da un file di input fatto così, longitudine, latitudine e quota (che si può impostare a zero, se è una info assente)

13d25'18" 38d5'25" 0
6d5'8" 35d58'47" 0

si può lanciare il comando

cs2cs -f '%.6f' +proj=latlong +datum=WGS84 +to +proj=latlong +datum=WGS84 input.txt

che restituirà

13.421667       38.090278 0.000000
6.085556        35.979722 0.000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment