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

Record more panorama metadata #2814

Merged
merged 7 commits into from
Mar 15, 2022
Merged

Record more panorama metadata #2814

merged 7 commits into from
Mar 15, 2022

Conversation

misaugstad
Copy link
Member

Begins to fix #2485

We are now recording a lot more metadata about the panoramas that we're using. This also fixes incorrect recording of the metadata that we had been doing in the past. Here's a list of changes:

  • We are now correctly recording image_width, image_height, tile_width, and tile_height in the gsv_data table. We had previously been recording hard coded values of 13312, 6656, 512, and 512 respectively, but these are not actually constant across all panoramas. Going forward, we are recording the correct values from the StreetView API. I've marked all previous data as NULL, and I'm hoping that we can write a script to correct the metadata for the imagery that is still available.
  • We are now also recording the center_heading, origin_heading, and origin_pitch in the gsv_data table. I'm not sure whether or not these will be useful, but it's data that's available, so it's worth recording.
  • Removes the imagery_type column from the gsv_data table. This column was being given a hard-coded value of 1 everywhere. There was also no key for what that value means anywhere, so this column had no purpose.
  • Updates the /adminapi/labels/panoid API endpoint to include the image_width and image_height values. I also simplified the JSON output for this endpoint. Previously it was set up as a Feature Collection in GeoJSON, but there's actually no geographic info being included here. So we are now simply outputting an array of objects.
  • I've renamed the endpoint from /adminapi/labels/panoid to /adminapi/panos because that's a more accurate naming. Both endpoints point to the same thing for now. Once all our external tools switch to the new name, I can remove the old one.
Before/After screenshots (if applicable)

Before:

{
    "type": "FeatureCollection",
    "features": [
        {
            "properties": {
                "gsv_panorama_id": "example-id"
            }
        },
        ...
    ]
}

After:

[
    {
        "gsv_panorama_id": "example-id",
        "image_width": 16384,
        "image_height": 8192
    },
    ...
]
Things to check before submitting the PR
  • I've written a descriptive PR title.
  • I've included before/after screenshots above.

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

Successfully merging this pull request may close these issues.

image_width and image_height incorrect in database
1 participant