Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple image cloud export only returning one image #919

Closed
jywarren opened this issue Aug 9, 2019 · 17 comments · Fixed by publiclab/Leaflet.DistortableImage#381 or #959
Closed

Comments

@jywarren
Copy link
Member

jywarren commented Aug 9, 2019

Hi just noting this -- cc @sashadev-sky (and @divyabaid16 as your #693 relates eventually) -- I've tried selecting multiple images by long pressing or shift-dragging, and the exports i get back seem to have only one image each:

https://mapknitter.org/maps/nottingham-city-centre
https://mapknitter.org/maps/belle-isle-globe

Selection UI works:

image

But the images I get back are just single images. I don't have time right now but we should check if multiple images are indeed getting submitted?

@jywarren
Copy link
Member Author

jywarren commented Aug 11, 2019

Hm, now looking and the old in-app exporter is ALSO only returning one image:

https://mapknitter.org/warps/nottingham-city-centre/nottingham-city-centre.jpg

image

I wonder if there's an issue with the process that identifies which are placed?

This looks ok at first glance: https://mapknitter.org/maps/nottingham-city-centre/warpables.json

@jywarren
Copy link
Member Author

Hm. Looking at the Ruby cloud export, it looks complete:

https://mapknitter-exports-warps.storage.googleapis.com/1565270555/1565270555.jpg

Not sure why, here is the status.json:

{"status_url":"https://mapknitter-exports-warps.storage.googleapis.com/1565270555/status.json","status":"complete","tms":"public/tms/1565270555/","geotiff":"public/warps/1565270555/1565270555.tif","zip":"public/tms/1565270555.zip","jpg":"public/warps/1565270555/1565270555.jpg","export_id":1565270555,"user_id":null,"size":"143.925MB","width":"8138","height":"4419","start_time":"2019-08-08 13:22:35 +0000","run_time":null,"gem_version":"1.0.9","cm_per_pixel":20.0}

@sashadev-sky
Copy link
Member

@jywarren status.json appears normal right?

@sashadev-sky
Copy link
Member

@jywarren I haven't looked into this yet but it just came to me what the issue is. Going back to my last PR #892 where I fixed a lot of
bugs I highlighted the remaining priority task to do: get the library to work with the featureGroup.

It will require a lot of code re-writing. i will attempt it later today. Currently each new image we add goes into its own feature Group and then once the next one is added, the last feature Group is overrwritten. Because there is only 1 element ever in FG at time, it will always be exporting a single image. It also is why our UI is buggy and the event handling is confusing, plus other problems.

In the meantime checkout PR in LDI: publiclab/Leaflet.DistortableImage#380. All the distortions are gone!! V excited about this @jywarren

@sashadev-sky
Copy link
Member

but long story short there I think although the images appear multi selected if you were to grab their feature group you'll find that they each have their own and are the only ones in there

@jywarren
Copy link
Member Author

jywarren commented Aug 14, 2019 via email

@jywarren
Copy link
Member Author

I tried this again and see https://mapknitter-exports-warps.storage.googleapis.com/1565813711/1565813711.jpg, so only one image. I think Sasha's explanation of multiple image select is correct. Checking the submitted request now:

Indeed, we're only sending the request for a single image:

collection: [{"id":366,"src":"https://s3.amazonaws.com/grassrootsmapping/warpables/317910/G0143050_medium.jpeg","width":500,"height":375,"image_file_name":"G0143050_medium.jpeg","nodes":[{"lat":52.9538543848,"lon":-1.1485970022},{"lat":52.957150727,"lon":-1.1430609219},{"lat":52.953802684,"lon":-1.1417520102},{"lat":52.9523677123,"lon":-1.1452496059}],"cm_per_pixel":72.55260160738551}]
scale: 100

@jywarren
Copy link
Member Author

And confirming that the exporter itself can correctly generate multiple image outputs, as I did it manually at for example http://export.mapknitter.org/export?url=https://mapknitter.org/maps/ceres--2/warpables.json&scale=30 --

image

@sashadev-sky
Copy link
Member

Ok now that collection group can add images without corners, I am going to attempt to fix the problem by not initially adding the image to the map instead of the group.

@sashadev-sky
Copy link
Member

@jywarren also I have never been able to create an export of even 1 image using the LDI interface. I get stuck in a permanent 'compositing' loop, even in production right now trying to export 1 image. I don't understand why your results are different. What steps can I follow to try to reproduce ur results? The legacy exporter doesn't work for me either. just generates a single tif that cannot be opened

@jywarren
Copy link
Member Author

Ack, that sounds super frustrating... ok, let me create a video of the process, with the console open. One thing is that in any local testing, it won't work - because the images shown locally are not accessible from the Google Cloud server. You can either a) run it on gh-pages, or b) use remote images in the example, so that they are accessible over the open web. Video coming in a bit!

@jywarren
Copy link
Member Author

OK, it's uploading, but here is the link: https://youtu.be/9ZON5nqBbrM - I walk through the whole lifecycle and each request.

But if you're stuck on the compositing step, i wonder if you aren't seeing the "remote images" issue described above, but some other issue? What map are you testing on? In this demo I tested on https://mapknitter.org/maps/ceres--2/

@jywarren
Copy link
Member Author

Hi @sashadev-sky did this youtube video help at all in pinning down the issue? Maybe we can screenshare too?

@sashadev-sky
Copy link
Member

Hi Jeff - So sorry I missed these messages. Thank you so much for the video, I really appreciate you taking the time esp. with all of the things you are probably trying to catch up on this week! I will look over it and get back to you ASAP.

@jywarren
Copy link
Member Author

Thanks, Sasha, no problem! You've been working real hard on all different parts of LDI!

@sashadev-sky
Copy link
Member

sashadev-sky commented Aug 22, 2019

I think it is fixed!!! at least the featureGroup is. So the exporting should be fixed! #959 I will watch your video on exporter to learn about how to test if fixed @jywarren

@sashadev-sky sashadev-sky mentioned this issue Aug 22, 2019
7 tasks
@jywarren
Copy link
Member Author

jywarren commented Aug 22, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants