Open obsidianz opened 9 years ago
Decimal degree would not be hard to implement, it can be handled as it is a float number similar to Grad. DMS is more tricky in the given situation, as it is not a float value. Some total stations use pseudo decimal system (12.3456 is 12d34'56"), but it is confusing. I have an other problem with this enhancement, some field-books may use Grad, other DMS, etc. There is no place in database table to store used units. Anyway thanks for the suggestion, as an easy solution (for me) I check weather virtual fields and some custom python expression function can help (without changing the basic logic of the plugin). Sorry to answer so late...
I have created a function to display angles in DMS in a virtual field. Virtual fields are available in never version (I'm sure from 2.8). In the attribute table window using field calculator I created a custom function on the function editor tab
from qgis.core import *
from qgis.gui import *
@qgsfunction(args="auto", group='Custom')
def gon2dms(value1, feature, parent):
secs = round(value1 / 400 * 360 * 3600)
min, sec = divmod(secs, 60)
deg, min = divmod(min, 60)
deg = int(deg)
return "%d-%02d-%02d" % (deg, min, sec)
Then a virtual fields were added to the table hz_dms ans v_dms (string 10), and the expression using the gon2dms function. Unfortunately you can't edit these fields :(
In fieldbook data, angle are displayed in Gradian, would it be possible to have an option to use Degree Decimal or DMS as an option. degree is widely used in Asia and Australia. Selection could be put in the setiings page via radiobox for Gradian, Degree decimal and DMS. Cheers. and thank for the great Plugin .