Open jywarren opened 1 year ago
Interesting.. I will look into this or well, @7malikk do you want to do this? Thanks!
@segun-codes You can go ahead, I did some findings though, after resolving issue #1352 I tried the following:
As seen in these trials, there are consistent lon values, @jywarren @segun-codes Give it a try as well
(Oops moving this comment to this PR, i had meant to comment there - https://github.com/publiclab/Leaflet.DistortableImage/pull/1354)
Sorry for commenting in the wrong place!
OK, not sure if this is related at all - 2 observations:
I found that in this collection: https://archive.org/details/sanborn-1885
See the individual files here: https://archive.org/download/sanborn-1885
one of the longitudes was recorded as "lng" not "lon" -- different libraries use lng or lon, so maybe there's an issue there? But so strange that it was just one corner!!!
I also uploaded a new mapknitter.json file there (just generated), so I'm not sure when the "lng" was introduced. But I had moved one corner so maybe that one was converted to "lng"?
I think we should double check everywhere we're using "lng" vs "lon" and maybe that's somewhere the cause of the issue!
And you can try it out live at https://publiclab.github.io/Leaflet.DistortableImage/examples/archive - it's running the latest code!
Hi @7malikk, @jywarren, I just observed that layer.getCorners()
in generateExportJson()
does not return corners for some images e.g., IMG_0807 and IMG_0725 from https://archive.org/details/texas-barnraising/
. You may want to try them out too.
IMG_0807
IMG_0725
Oh! @7malikk, @jywarren, I tried the same images again and layer.getCorners()
returned corners. I can't seem to reproduce same error again. Very strange!!!
OK, not sure if this is related at all - 2 observations:
I found that in this collection: https://archive.org/details/sanborn-1885
See the individual files here: https://archive.org/download/sanborn-1885
one of the longitudes was recorded as "lng" not "lon" -- different libraries use lng or lon, so maybe there's an issue there? But so strange that it was just one corner!!!
I also uploaded a new mapknitter.json file there (just generated), so I'm not sure when the "lng" was introduced. But I had moved one corner so maybe that one was converted to "lng"?
I think we should double check everywhere we're using "lng" vs "lon" and maybe that's somewhere the cause of the issue!
Hi @jywarren, I fetched the two images from https://archive.org/details/sanborn-1885
and there was no inconsistency in the naming for longitude, see section highlighted yellow:
Well, I think it's a clue even if this specific issue isn't reproducible. Did you try moving one corner of the image, then checking again?
The layer.getCorners()
thing is also a clue! We should look in the core library code to see where it's assembled!
I did that, printed the corners shortly after assembly in distortableImageOverlay.js
. Corners were printed on each occasion, no miss. See the underlined:
I think I might have addressed this issue in PR #1359 already.
Ok, we can test after merging that. Thanks!
On Sat, Feb 18, 2023, 7:34 AM Segun @.***> wrote:
I think I might have addressed this issue in PR #1359 https://github.com/publiclab/Leaflet.DistortableImage/pull/1359 already.
— Reply to this email directly, view it on GitHub https://github.com/publiclab/Leaflet.DistortableImage/issues/1353#issuecomment-1435660080, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF6J26BYR2XWKNEDM65OTWYC6ULANCNFSM6AAAAAAU2YSGNY . You are receiving this because you were mentioned.Message ID: @.***>
Could this also be related somehow to the corner ordering in https://github.com/publiclab/Leaflet.DistortableImage/issues/1350 ? Hard to see how, but good to bear in mind as a possible complicating factor.
Could this also be related somehow to the corner ordering in #1350 ? Hard to see how, but good to bear in mind as a possible complicating factor.
Possibly...
Hi, all, not sure when this happened, but I created and downloaded a JSON file and it was this:
Notice none of the first two image's coordinates have longitudes. How do you think this happened? Let's dig in and investigate! Thanks!!