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

Provide checkbox to show +/- for custom formatting #600

Closed dfoll closed 5 years ago

dfoll commented 5 years ago

Current behavior

When a user is providing a custom format for DD/DMS/DDM they have the option to remove the N/S/E/W hemisphere designator from the coordinates. If the user does this, in the list, there is no indicator of what what hemisphere the coordinate is in. image

Expected behavior

Provide checkbox in the custom formatting area for DD/DMS/DDM to "Show + for N/E hemisphere" and a checkbox to "Show - for S/W hemisphere" image image image image

Required for ArcMap 10.3.1 -10.7.1 and ArcGIS Pro 2.1 - 2.4

saip commented 5 years ago

@dfoll As per our discussion this morning, we are also implementing the case of hemisphere designators (N,S,E,W, n,s,e,w) also are not allowed to be added by user in the custom format textbox. Instead, user will be allowed to choose the display of hemisphere designators with a checkbox.

dfoll commented 5 years ago

@saip I have shown this work to the team and the team has this feedback:

dfoll commented 5 years ago

I have spoken to @saip he has implemented exclusivity for "Show N/S/E/W" and "Show +/-" by making each of them a radio button. When you select the "Show +/-" radio button, the user will then have the option via checkboxes to "Show + for N/E" and/or "Show - for S/W"

@saip and crew will also provide a preview of what the coordinate string based on whichever radio button and/or checkboxes you have selected. There are two important caveat to this functionality that I am accepting for this release.

image one change to this screenshot is that @saip with be adding a "/" between NSEW for the "Show NSEW" radio button.

saip commented 5 years ago

@dfoll If we implement as discussed in the comment above, preview string would stay static and would not be updated when user types in additional characters in the format textbox. The string would only be updated when user switches selection of radio buttons/checkboxes. So, as discussed yesterday we are implementing it without the caveat mentioned above. The implementation now would be

Preview string is placed as shown in the screenshot below image

dfoll commented 5 years ago

@saip This looks good with three bugs i noticed, one minor, two significant

dfoll commented 5 years ago

@saip this is the minor bug i noted in the previous comment.

When you are using custom formatting and using either "Show N/S/E/W" or "Show +/-" when you switch the coordinate order to longitude latitude, the hemisphere prefix [or] suffix get confused about where they should be place and place themselves together on one end of the other of the coordinate pair.

image Decimal degrees listed as lat/lon formatted to show +/- as hemisphere indicators - Correct!

image Decimal degrees listed as lat/lon formatted to show N/S/E/W as hemisphere indicators - Correct!

image Decimal degrees listed as lon/lat formatted to show +/- as hemisphere indicators - in the preview the prefix for both lon and lat are stuck together at the beginning of the coordinate pair

image

Decimal degrees listed as lon/lat formatted to show N/S/E/W as hemisphere indicators - in the preview the suffix for both lon and lat are stuck together at the end of the coordinate pair

dfoll commented 5 years ago

Two significant issues I found that i referenced in this comment

@saip the second issue is a bit more in-depth and i believe is directly related to this work. The short version of the problem is we are seeing the same problem that was happening in #527 but seeing in on a smaller scale only with importing a list.

If I have custom formatting set and use the "Show - for S/W hemisphere" checkbox and import a list that has the coordinates formatted with a "-" already, to indicate Southern or Western hemisphere, there is some sort of double-negative math going on, and whatever coordinate was listed as a negative is becoming positive. In the case of the test date that is used for the repro steps that follow, the longitude values are all in the Western hemisphere and are written in the style of -121.84267250000,36.58915453010. The import happens successfully, but the points are placed incorrectly

Repro steps:

Test data: TabletoPoint_small.zip

CC build 145 I used ArcMap 10.7.1 because #620 has not been merged into CTLocalGovTeam-dev to fix #619 which makes reproducing with ArcGIS Pro difficult, but I seen the same thing there.

  1. Open ArcMap with a basemap
  2. On the Coordinate Conversion pane, click Edit Properties
  3. Select DD > Custom
  4. Select the Show +/- radio button
  5. Select the Show - for S/W hemisphere checkbox
  6. Click OK
  7. Import the CSV listed as test data. Note, the longitude values in the test data are all listed as negative, meaning they should be in the Western hemisphere. This particular data should all be centered around Monterey, CA
  8. Notice that when the points import, they are all placed off the shore of China in the Yellow Sea.

Additional info/speculation:

lfunkhouser commented 5 years ago

@CTLocalGovTeam do you have an update on this issue?

dfoll commented 5 years ago

@saip @CTLocalGovTeam tested CC build 151 built from this branch looks good. thanks!