ohmg-dev / OldInsuranceMaps

A public space for georeferencing historical fire insurance maps.
https://oldinsurancemaps.net
GNU General Public License v3.0
22 stars 2 forks source link

[Bug] Deleting GCP mixes up remaining GCPs #107

Open mradamcox opened 1 year ago

mradamcox commented 1 year ago

Describe the problem If you are georeferencing an item that already has GCPs stored (i.e. editing existing georeferencing) and you delete one of the existing GCPs, the remaining ones get all mixed up. For example, the linkages between the pixel locations and lat/long coords get switched for one or more control points.

Expected behavior Deleting any GCPs should not affect the other GCPs (obviously)

To Reproduce Steps to reproduce the behavior:

  1. Find a layer and go to "edit georeferencing"
  2. Delete a GCP somewhere in the middle of the list
  3. Note, the warped preview should get weird
  4. Select remaining GCPs in turn and some should clearly now be linked to incorrect locations.

Additional context This component could use a bit of a refactor, so fixing this bug should hopefully come along with some other code simplification.

mradamcox commented 5 months ago

Finally did some testing on this, seems to be that after the 10th GCP is added, the list gets scrambled, and it is apparent in the interface: image Up to 10 GCPs, deleting any point works just fine. I have a feeling the mismatches are due to sorting operations that expect integers but get strings (10 vs "10").