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=li...@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 <a...@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@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user
decimal_to_sexagesimal.sh
Description: application/shellscript
_______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user