[GRASS-user] degree - time conversion
achim
ak7 at jupiter.uni-freiburg.de
Wed Sep 30 09:11:48 EDT 2009
Dear grass-users,
because I could not find something else, I write a little script to
convert lat/long decimal degrees to lat/long sexagesimal degrees
(deg:min:sec).
It works with a sqlite-database and sqlite3, t2sql.sh (to convert
text-file to a table) and awk (on all linux-systems).
Maybe someone will need this some day:
$1 table name (need a unique column "cat")
$2 column with decial-degrees
$3 column, where sexagesimal degrees will be written (can be same as $2)
$4 sqlite database-file
eg:
sh decimal_to_sexagesimal.sh table col_decimal col_sexag
/home/userneme/grass/databasefile
warning: its very modest and dont deal with execptions. (eg. overwrites
the files temp_decimal_input.txt and temp_sexagesimal_output.txt)
Achim
achim schrieb:
> ...I just need the pure conversion from decimal to sexagesimal(;-)) to
> convert the output of eg.:
> v.to.db -p map=lines at achim option=start
> , which is decimal to D:M:S in the table.
>
> Is there something like cs2cs?
>
> A
>
>
> Markus Neteler schrieb:
>> On Wed, Sep 30, 2009 at 11:01 AM, achim <ak7 at jupiter.uni-freiburg.de> wrote:
>>> ...by the way: is there a build in possibility to convert lat-long
>>> degree coordinates in time coordinates? (to change this in a table)
>> From decimal to sexagesimal, try this:
>>
>> cat file.csv | cs2cs -f "%.8f" +proj=latlong +datum=WGS84 \
>> +to +proj=latlong +datum=WGS84
>>
>> cheers
>> Markus
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
-------------- nächster Teil --------------
Ein Dateianhang mit Bin?rdaten wurde abgetrennt...
Dateiname : decimal_to_sexagesimal.sh
Dateityp : application/x-shellscript
Dateigr??e : 720 bytes
Beschreibung: nicht verf?gbar
URL : http://lists.osgeo.org/pipermail/grass-user/attachments/20090930/bc298e7f/decimal_to_sexagesimal.bin
More information about the grass-user
mailing list