Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

When UTM or MGRS coordinates are collected directly from a grid corner they are rounded down when used again #546

@dfoll

Description

@dfoll

Background

This was found while doing research on #545.

Current behavior

If an MGRS or UTM coordinate is located directly on the corner of a grid square. When you copy that coordinate and paste it again, it is placed in the next 1-meter grid cell over. It seems that we are doing something internally with rounding that is confusing the add-in and causing the point to repeatedly move one 1-meter grid square over.

Repro steps

  1. Collect a location from the map in either MGRS or UTM (most likely this will not be exactly on the corner of a grid square).
  2. Create a feature from the collected value (right-click > absolute x,y while editing)
    _this coordinate will be placed exactly on the corner of a 1-meter grid square. see Coordinate Conversion mismatch between location output value and location input value #545 _
  3. Use Coordinate Conversion to collect the coordinates of the newly created feature from step 2
  4. Paste those coordinates back into Coordinate Conversion
    even though they were taken directly from a corner which is the precision CC returns, they are placed on the corner of the next 1-meter grid square over
  5. Repeat steps 2-5 and observe that the coordinate keeps being moved one grid square over, and sometimes (but not yet entirely reproducible) one grid square south as well.

Additional Repro

  1. Enter 17T 627939 4479071 input
  2. Result
    image
  3. Copy/Paste MGRS from Output into Input > Enter
  4. Result
    image
  5. Copy/Paste MGRS from Output into Input > Enter
    Result: Rounding stops and Output = Input
    image

Expected behavior

The moving of the first point collected that is not on the exact corner of a grid square is understandable because of #545 however once a point is collected that is precise enough to place on a 1-meter grid square corner, it should not continue to be moved over one grid square every time you try to collect it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions