Closed segun-codes closed 1 year ago
Ah apologies is this ready for review/merge?
Ah apologies is this ready for review/merge?
No, not at the time you sent this message, the subsequent messages too.
Hi @jywarren, this is ready for your review and advice. The code supports proper reconstruction of maps from legacy json files using DnD or URL features.
Illustration 1: Reconstruct legacy map using DnD Feature
Illustration 2: Reconstruct legacy map using URL
Exciting!! This is working really well for old maps. I noticed this map doesn't work anymore, but that's because it's saved in the wrong order (which we did for a while before we found this issue) -- does that sound right to you?
https://archive.org/details/empire-st-chinatown-providence
I can then re-save that JSON and re-upload it.
I tried re-ordering the corner points from https://archive.org/details/empire-st-chinatown-providence, so it's 0,1,3,2, as we had figured out. So:
{"avg_cm_per_pixel":22.023384694097306,"collection":[{"id":515,"src":"https://archive.org/download/empire-st-chinatown-providence/service-gmd-gmd377m-g3774m-g3774pm-g3774pm_g08099189901-08099_01_1899-0010.jpg","tooltipText":"service-gmd-gmd377m-g3774m-g3774pm-g3774pm_g08099189901-08099_01_1899-0010","image_file_name":"service-gmd-gmd377m-g3774m-g3774pm-g3774pm_g08099189901-08099_01_1899-0010.jpg","nodes":[{"lat":41.823035603473315,"lon":-71.41519904136659},{"lat":41.82091283895551,"lon":-71.41239881515504},{"lat":41.818462177715475,"lon":-71.41576230525972},{"lat":41.820585023472844,"lon":-71.41857326030733}],"cm_per_pixel":22.023384694097306}]}
But now I get Image object has no nodes and can't be loaded
as an error.
So before merging, what do you think happened? I think we're there, i just want to be sure we still have the edit-download-upload-recover cycle still working!
Thanks @segun-codes !!
Interesting! Okay, I'd take a look. Many thanks!
Exciting!! This is working really well for old maps. I noticed this map doesn't work anymore, but that's because it's saved in the wrong order (which we did for a while before we found this issue) -- does that sound right to you?
https://archive.org/details/empire-st-chinatown-providence
I can then re-save that JSON and re-upload it.
Hi @jywarren, everything seems to work now (see illustrations below). I think you want to re-fetch from https://archive.org/details/empire-st-chinatown-providence
, download its json file from mk-lite and then attempt to reconstruct the same map (either by DnD or URL).
Illustration 3A
Illustration 3B
Indeed it works! Merging now! Great work, @segun-codes.
Fixes #1358
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
grunt test
If tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Thanks!