planetfederal / qgis-mgrs-tools-plugin

GNU General Public License v2.0
6 stars 9 forks source link

Add MGRS field does not seem to be giving the correct results #14

Open SrNetoChan opened 5 years ago

SrNetoChan commented 5 years ago

Ways to replicate:

Run the "Test add MGRS field algorithm" from the tester plugin. (it's in #13 )

Or:

image

Using the MGRS coordinates panel, and entering values from the problematic features, it seems that the MGRS_1 field values zoom to the correct place, while the new MGRS field vlaues doesn't.

volaya commented 5 years ago

The error is not in the processing algorithm, but looks like a precision issue in the library

I can do it manually and get the same result

c = toWgs("02HLB") toMgrs(*c) '02HKB0000000000'

This can be seen in other converters as well, so might be a problem with that conversion in general

See: http://www.earthpoint.us/Convert.aspx

entering 02HLB, the roundtrip returns a different one as well. And changing the precision makes it change. Probably there will always be that kind of problems with low resolution coordinates, such as the ones used in the test data

I guess this can be closed