Repository navigation
Implement Panoramax photo upload and metadata handling - #63
Merged
Merged
Conversation
…erences, add new API client, and update database schema for photo questions.
…update photo bearing handling to support nullable values and adjust related classes for Panoramax integration.
…mentations, adjust photo handling, and ensure compatibility with new upload logic.
…rePhoto class, and adjust upload logic to include quest_id for long-form questions.
… thumbnails, handle image loading failures, and ensure compatibility with existing photo handling.
…rt for DEV, STAGE, and PROD tokens in build configuration and update related classes for proper token handling.
…clude the time each photo was taken, ensuring accurate timestamps during uploads and database storage.
…ith CapturedPhoto objects to include bearing and capture time, enhancing photo metadata during uploads and storage.
… class and database schema to include feature preset names, enhancing photo metadata during uploads.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace KartaView with Panoramax for photo uploads
Photos from long form, notes, note comments and Add Feature now go to our own Panoramax instances instead of KartaView. Each photo records the direction the camera faced (bearing) and when it was taken, plus semantic tags so it can be traced back to its element, question and workspace.
What changed
Panoramax upload (
PanoramaxApiClient)…/api/pictures/<id>/hd.jpgURLs.workspace_idelement_idquestion,quest_idsource=new_feature,feature_type=<preset name>(e.g.Intersection)element_id=node/<id>added after the node is uploaded (best effort; failures are only logged).Photo bearing and capture time for every flow
CapturedPhoto(path, bearing, capturedAt)model.PhotoCapturehelper, used by the long form and byAttachPhotoFragment(notes, note comments, Add Feature). It:CameraBearingSensor(back-camera direction, corrected to true north) if the camera didn't write one.OSM tags
ext:street_images. An olderext:kartaview_urlon the element is still read, and is removed when its photo is replaced or deleted.ext:image_url1,ext:image_url2, … (unchanged).Long form UI
Database (migration 29 → 30)
osm_element_edit_photos:photo_questions,photo_quest_ids,photo_captured_at,photo_feature_typesTesting
PanoramaxApiClientTestandPhotoPreviewUrlTest;ElementEditsUploaderTest,NoteEditsUploaderTest,NoteEditsControllerTest,PhotoStateTestandLongFormSubmissionTestwere extended. The full unit suite passes.MockPanoramaxinstead ofMockKartaView, andRealNetworkGuardblocks real Panoramax hosts.PhotoCapture/CameraBearingSensor(camera and sensor framework code).How to verify
ext:street_imagesis set and the thumbnail shows when the form is reopened.Notes
KartaViewApiClientand its Koin binding are still in the codebase but no longer used for uploads; they can be removed in a follow-up.