Esri / coordinate-conversion-addin-dotnet

Addin for ArcMap and Pro for convenient coordinate conversion in Desktop.
Apache License 2.0
45 stars 20 forks source link

DDM Formatter returning results in incorrect hemisphere #575

Closed csmoore closed 4 years ago

csmoore commented 5 years ago

The Coordinate Conversion Library is returning results in the incorrect hemisphere ( + / - appear reversed)

Tested on Pro 2.3/2.4, Releases: January, 2019, June, 2019, and October 2019 release candidate (4.4.1.169)

To reproduce:

In Coordinate Conversion Addin

  1. Add a DDM Output Coordinate Format
  2. Configure the Coordinate Format Properties to use the custom format: A+-0° B0.0###' X+-0° Y0.0###'
  3. Use the Map Point Tool to click on different map hemispheres, the +/- hemisphere indicator is not correctly shown (in latest version the "+-" is always shown)

In Distance and Direction or Visibility Addins

  1. In Distance and Direction or Visibility Addins (works correctly in CC Addin), where you can paste a point, enter a DDM value such as: 40°16.3829'N 78°50.8456'W
  2. The resulting point appears in southern hemisphere:

image

image

Opening in this repo because these incorrect results are also seen in the Coordinate Conversion unit tests

Test fails here:

coord = new CoordinateDDM(40, 16.38288, -78, 50.84562);
result = coord.ToString("", new CoordinateDDMFormatter());

Result: -40°16.3829' -78°50.8456' Expected: 40°16.3829' -78°50.8456'

dfoll commented 5 years ago

For manual verification I think we should wait to test this until #580 is merged because this relies on rebuilding DD and Vis to do manual testing (they pull in the CC dev branch and I believe we agreed as a team that we were not going to manually change the .groovy scripts for testing). In the process I would like to have @csmoore work with me to confirm if the unit tests are passing with the code in this branch.

dfoll commented 5 years ago

@lfunkhouser and I agree we should test this after this PR is merged (that means this will be the only issue that still has the UAT label on it when the PR is merged)

csmoore commented 4 years ago

Looks like the many changes to support #600, #527, #468 has reopened this issue as well as removed the ability to use "+/-" as an output formatting character as originally designed (and causing https://github.com/Esri/distance-direction-addin-dotnet/issues/681).

For example, these formatting characters were originall used to indicate the hemisphere: ex: a "A-+0°B0.0000' X-+0°Y0.0000'" meant show: "+40°30', -121°30'" but this no longer appears to work as expected (it now always inserts these characters into the output regardless of hemisphere).

Currently looking at a way to reintroduce the "+/-" formatting characters without also reintroducing issues #600, #527, #468

csmoore commented 4 years ago

PR #636 created to address this reopened issue

dfoll commented 4 years ago

Testing CC build 179

dfoll commented 4 years ago