...
Volet |
---|
infile=... # RPN input file with one record and tictac's (if needed for the grid type - if xrec can display the field you have everything you need)
outfile=... # RPN output file (including path or at least './')
# Create field with constant value 180 / PI = 57.29578
r.diag xlin $infile tmp -a0-b57.29578
r.diag ggtrig tmp tmp2 -kind IDF -lon # ==> outfile=longitude*infile
r.diag newnam tmp2 lon -name LO
r.diag ggtrig tmp tmp2 -kind IDF # ==> outfile=latitude*infile
r.diag newnam tmp2 lat -name LA
# Combine LO and LA in output file
r.diag joinup $outfile lon lat
|
Python 3
Obtain longitudes and latitudes in Python
...