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

Convert Coordinates Pro 1.2 does not accept <longitude> <latitude> #165

Closed lfunkhouser closed 7 years ago

lfunkhouser commented 7 years ago

From @lfunkhouser on December 15, 2016 17:54

From @mfunk on November 4, 2016 17:43

Testing Convert Coordinates in ArcGIS Pro 1.2 with Decimal Degree (DD) inputs.

Expected Behavior

When explicitly specifying hemisphere (N/S and E/W) in lon/lat the order should not matter. I should be able to type: 45.47E 20.82S or 20.82S 45.47E

Current Behavior

Currently the tool only accepts latitude followed by longitude, and not longitude followed by latitude. For example I can type the following:

And I get bad output of:

But If I switch the two:

I get the correct conversion:

Possible Solution

Too dependent on a single regex to handle all of the formatting? Perhaps a stepped approach and include a separate DD method to handle lon/lat as well as lat/lon?

Steps to Reproduce (for bugs)

  1. Open Convert Coordinates
  2. Add default format types: DD, DDM, DMS, GARS, MGRS, USNG, UTM
  3. Type: 45.47E 20.82S

Context

Basically if someone doesn't know the difference and is pasting/typing from outside source then they really don't get any noticeable feedback that the conversion didn't happen correctly. Especially if they are typing DD and don't have DD as an output type. If only MGRS/UTM/etc. they will get something, but it will be wrong. Not cool.

Your Environment

Copied from original issue: Esri/military-tools-for-arcgis#42

Copied from original issue: Esri/military-tools-geoprocessing-toolbox#195

lfunkhouser commented 7 years ago

From @BobBooth on November 15, 2016 19:23

I just ran into the same thing with Coordinate Conversion in ArcMap - it is exacerbated by the fact that the default order for coordinates in the ArcMap Identify dialog and the coordinate display (lower right corner of the ArcMap window) is switched from what the tool expects (West, then North). If I click on the map with the Identify tool in the MOLE sample data, I can get the coordinates in Decimal Degrees, and they show up as "-116.299264 36.103069 Decimal Degrees". If I copy/paste this into the Coordinate Conversion input box it initially fails (chokes on the text "Decimal Degrees" - guess this is another issue to note) and if I trim that text off it converts it to an MGRS location. Unfortunately, it is the wrong MGRS location. image. -116.299264 36.103069 --> 31M AV 66058 99884 (near 0,0) but it should be converted as: 36.103069 -116.299264 --> 11S NV 63074 95608 The fact that it has an absolute value greater than 90 should be a tip off that the first coordinate is a longitude.

lfunkhouser commented 7 years ago

From @elinz on December 9, 2016 1:20

I tested the Pro and ArcMap add-ins that were built against 1.2 and 10.3.1 in ArcGIS Pro 1.2 and ArcMap 10.3.1 (build 12-07-2016_10). The ArcGIS Pro add-in works correctly. The ArcMap add-in does not work correctly.

In ArcMap 10.3.1, when I enter...

(lat long) 20.82S 45.47E --> it incorrectly converts it to UTM 38S 548905 7697701. It should be 38K 548905 7697701

(long lat) 45.47E 20.82S -->It does not convert at all. It leaves the last values that were converted in the output boxes.

(lat long) 36.103061 -116.299264 --> it incorrectly converts UTM to 11N 563073 3995606. It should be 11S 563073 3995606.

(long lat) -116.299264 36.103061--it incorrectly converts to 0, 0 i.e.... 0.0S 0.0E 0° 0.06'S 0° 0.02'W 0° 0' 3.8"S 0° 0' 1.2"W 361HM11 31MAV6605899884 31MAV6605899884 31S 166057 9999884

lfunkhouser commented 7 years ago

From @dhagens on December 9, 2016 13:57

@elinz, the issues that you are seeing in 10.3.1 are because the changes to the code for the arcmap addin were not made in the Pro 1.2 build. The only changes in that build were made for Pro 1.2. You will need to get the latest build from Jenkins for Pro 1.4 and ArcMap Addin 10.3.1 and test against that. This was not communicated so understandable. @topowright, @lfunkhouser, We never actually discussed this so maybe you want the changes in both areas. Let me know. For ease of maintenance, I only made the changes to the Pro 1.4 build for the ArcMap addin. Does it need to be in both builds? This will require us to test both builds for Pro 1.2, Pro 1.4 and also the ArcMap Addin for both builds. Let me know your thoughts.

@elinz, I did test the issue that you stated above in the Pro 1.2 build with the ArcMap addin- (lat long) 20.82S 45.47E --> it incorrectly converts it to UTM 38S 548905 7697701. It should be 38K 548905 7697701 If the UTM is incorrect here, it is not because of something that I did because I did not change any code for the ArcMap addin in the 1.2 build. If the UTM is incorrect, that will need to be logged as a separate bug because this is unrelated to this bug.

@elinz, Also related to the findings above, if you enter 20.82S 45.47E or 45.47E 20.82S, you should see the exact same values in the output. Just wanted to make note of that because of your comment 'It does not convert at all. It leaves the last values that were converted in the output boxes.' If you chance one of the values slightly, you will see the difference.

lfunkhouser commented 7 years ago

From @topowright on December 9, 2016 14:18

@elinz @dhagens This is an issue with us not being clear with what Jenkins is building. @dhagens is going to push his changes to the Dev branch, which is building 1.4 and 10.3.1. We will then have all of his updates in the ArcMap add-in that we build.

@lfunkhouser @nfeuerstein after working with @ACueva yesterday on the file structure for Jenkins this should be a bit clearer when he finishes his updates.

lfunkhouser commented 7 years ago

From @dhagens on December 9, 2016 14:29

@topowright, I just wanted to make clear that the Lat/Lon changes for the ArcMap Addin are already in the dev branch. The ArcMap Addin changes for the Lat/Lon are not in the Pro 1.2 branch, for the ArcMap Addin, which is what @elinz was testing the ArcMap Addin with. The confusing part here is that both builds contain the ArcMap 10.3.1 Addin. Only the dev branch has the Lat/Lon changes for the 10.3.1 ArcMap Addin, not the Pro 1.2 branch.

lfunkhouser commented 7 years ago

From @dhagens on December 9, 2016 15:44

@elinz, I looked into the issue of the UTM output being incorrect and checked in a fix for it in the dev branch. I don't think you'll need to add an issue for this since it should be fixed with the next build after @kgonzago merges. Thanks.

lfunkhouser commented 7 years ago

From @elinz on December 9, 2016 16:26

@dhagens @kgonzago @topowright I was testing the fix against both ArcGIS Pro 1.2 and ArcMap 10.3.1 because my understanding is that we were fixing this issue for the released components which are both ArcGIS Pro 1.2 and ArcMap 10.3.1. and I learned yesterday, we also have a released WAB widget of Convert Coordinates...so seems like we need to fix the widget as well.

lfunkhouser commented 7 years ago

From @dhagens on December 9, 2016 16:30

@elinz, it is my understanding that we are only releasing the Pro 1.2 component from the build that you tested. To test the ArcMap 10.3.1 addin, you'll need to test that against the dev build, which is the Pro 1.4 build and the 10.3.1 ArcMap addin build.

lfunkhouser commented 7 years ago

From @dhagens on December 9, 2016 16:31

@elinz, the fix for WAB widget has not been addressed yet. It seems that the Addins are higher priority at this time as @kgonzago stated yesterday and the bugs will need to be fixed in those first.

lfunkhouser commented 7 years ago

From @elinz on December 12, 2016 18:37

@dhagens Thanks. I'll install the 10.3.1 addin, built from the dev branch and test.

lfunkhouser commented 7 years ago

From @elinz on December 12, 2016 19:45

@dhagens I tested the ArcMap 10.3.1 addin that was built from the dev branch and the coordinates are not matching the output from the Pro 1.4 that was built from the same dev branch.

Enter the following coordinates: -116.299264 36.103061

In Pro 1.4 addin the output is: image

In ArcMap 10.3.1 addin the output is: image

Using the "Go To XY" tool in ArcMap, I entered the same long lat coordinate... image

lfunkhouser commented 7 years ago

From @dhagens on December 12, 2016 19:49

@elinz, I would consider this as a separate bug and is not related to this bug. This bug was related to the ability to input lat or long coordinates in either order in the input field. To thoroughly test this, we'd have to go back to pro 1.3 and pro 1.2 and determine if there was a change in output from 1.2 until now. @lfunkhouser , @topowright can make the determination on that. Thanks.

lfunkhouser commented 7 years ago

From @elinz on December 12, 2016 19:52

@dhagens I'll create a separate GitHub issue. NOTE: Pro 1.2 addin built on 1.2 and Pro 1.4 addin built on 1.4 are creating the same output.

lfunkhouser commented 7 years ago

From @dhagens on December 12, 2016 20:26

@elinz, as a follow up to this, I had Joe McCausland test this out on his machine with an earlier version of Pro w/o any changes that we've made lately and is seeing similar results in Pro. 36.103061 -116.299264 36.1N 116.3W 36° 6.18'N 116° 17.96'W 36° 6' 11.0"N 116° 17' 57.4"W 11N 563073 3995606 11S 563073 3995606 11SNV6307495607 128LN36 11SNV6307495607

lfunkhouser commented 7 years ago

From @elinz on December 12, 2016 20:28

@dhagens Thanks. I created a new issue for this: https://github.com/Esri/military-tools-for-arcgis/issues/83

lfunkhouser commented 7 years ago

From @elinz on December 14, 2016 0:13

I tested the Pro addin built against 1.2 SDK (build date: 13 Dec 2016 10:42, folder name "12-12-2016_13") on Pro 1.2 and Pro 1.3 and you can enter coordinates in as Lat Long and Long Lat.

I tested the ArcMap addin built against 10.3.1 ArcObjects (build date: 13 Dec 2016, 13:12) on ArcMap 10.3.1 and you can enter coordinates in as Lat Long and Long Lat.

lfunkhouser commented 7 years ago

From @elinz on December 15, 2016 17:56

@lfunkhouser This issue was copied to the incorrect repo. It should have been copied to: https://github.com/Esri/coordinate-conversion-addin-dotnet

lfunkhouser commented 7 years ago

Thanks @elinz I was just about to move it to the correct one.

nfeuerstein commented 7 years ago

@elinz @dhagens has this issue been fixed and verified?

dhagens commented 7 years ago

This is has been fixed and I believe @elinz has verified it. As far as I know the issue can be closed.

elinz commented 7 years ago

@nfeuerstein @dhagens I'm re-verifying right now.

elinz commented 7 years ago

@nfeuerstein @dhagens Tested latest 1.4 SDK and 10.3.1 ArcObjects build on Pro 1.4 and ArcMap 10.3.1 and verified this issue has been fixed.

Also tested a build made on 1.2 SDK on a Pro 1.3 machine and verified this issue has been fixed.

Closing issue.