ProjectSidewalk / SidewalkWebpage

Project Sidewalk web page
http://projectsidewalk.org
MIT License
84 stars 24 forks source link

Sidewalk Gallery panoramas ids invalid #2286

Closed kumararoosh closed 3 years ago

kumararoosh commented 3 years ago
Brief description of issue/feature

Some of the panorama ids are invalid when pulled from the google maps API

Potential solution(s)

We could design an interface that puts any labels that have an invalid panorama back into the validation pipeline with the updated panorama, to see if the label is still valid.

jonfroehlich commented 3 years ago

Thanks @kumararoosh. While your proposed solution is an interesting idea, it won't work. New panos will not have the exact same location and viewpoint as the prior pano at that spot, which would make the specific location of the label no longer relevant (it would look like it's applied randomly on the new pano).

misaugstad commented 3 years ago

The initial fix is to just not try to show panos that are missing imagery from Google. Note that there is an expired column in the gsv_data table. If expired = TRUE, that means that we have wanted to use that pano on the validation interface in the past, but found that the pano had been removed. This means that when you send labels to Gallery, you may as well filter out the entries where expired = TRUE. This should occasionally speed up Gallery, since it will prevent you from querying for imagery that we already know doesn't exist.

The next step, which I don't think is required for an MVP, would be to update the database whenever you come across invalid pano IDs that weren't already listed as expired = TRUE and mark them as such. This will also help to speed up both Gallery and the validation interface going forward.

The longer term solution is to use saved, cropped images instead of getting it from Google every time. Definitely not for the MVP.

kumararoosh commented 3 years ago

The backend call can be modified to not send a label if the panorama is expired, and there should also be a frontend method that somehow recognizes that the panorama is invalid. There is no error printed out when an invalid panorama is displayed, so i'll have to dig around the GSV API and see if there is some response for invalid panoramas.

misaugstad commented 3 years ago

I'm assuming you can use whatever method we use to do that for the validation interface.

Just checked, and it looks like we check the response code, and the response code should be between 200 and 399. You can see the code in the panoExists(gsvPanoId: String) function in LabelTable.scala.

michaelduan8 commented 3 years ago

Yes, google maps street view has support for identifying if imagery exists. You can read it on the google maps static imagery documentation.

kumararoosh commented 3 years ago

After using the expired tag in the database to filter, we still get a large amount of expired panos showing up, so we will have to have some pipeline that marks the panos as expired if it is loaded on gallery with no existing pano

jonfroehlich commented 3 years ago

@misaugstad (or others): this brings to mind how important our scraper is. Is this still up and running? Can we check on this? Maybe we'll need to make using the scraped data a higher priority?

misaugstad commented 3 years ago

Scraper is still running strong. I've been checking in on it every week or two and modifying it as we add new cities.

jonfroehlich commented 3 years ago

Wo0t!

Sent from my iPhone

On Oct 7, 2020, at 12:41 PM, Mikey Saugstad notifications@github.com wrote:

 Scraper is still running strong. I've been checking in on it every week or two and modifying it as we add new cities.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.