From bcba06fce09e94c4cddd1bd687dabc9f371e189d Mon Sep 17 00:00:00 2001 From: Runar Buvik Date: Mon, 10 Jun 2024 17:30:21 +0200 Subject: [PATCH] Updated image entity fields --- .../mapillary.config.api.entities.md | 28 +++++---- docs/docs/mapillary/mapillary.interface.md | 36 +++++++---- src/mapillary/config/api/entities.py | 60 +++++++++++-------- src/mapillary/interface.py | 29 +++++---- tests/config/api/test_entities.py | 4 +- 5 files changed, 94 insertions(+), 63 deletions(-) diff --git a/docs/docs/mapillary.config.api/mapillary.config.api.entities.md b/docs/docs/mapillary.config.api/mapillary.config.api.entities.md index d993317..afdd98b 100644 --- a/docs/docs/mapillary.config.api/mapillary.config.api.entities.md +++ b/docs/docs/mapillary.config.api/mapillary.config.api.entities.md @@ -143,19 +143,23 @@ Fields: 8. computed_compass_angle - float, compass angle after running image processing 9. computed_geometry - GeoJSON Point, location after running image processing 10. computed_rotation - enum, corrected orientation of the image -11. exif_orientation - enum, orientation of the camera as given by the exif tag +11. creator - the username and user ID who owns and uploaded the image +12. exif_orientation - enum, orientation of the camera as given by the exif tag (see: https://sylvana.net/jpegcrop/exif_orientation.html) -12. geometry - GeoJSON Point geometry -13. height - int, height of the original image uploaded -14. thumb_256_url - string, URL to the 256px wide thumbnail -15. thumb_1024_url - string, URL to the 1024px wide thumbnail -16. thumb_2048_url - string, URL to the 2048px wide thumbnail -17. merge_cc - int, id of the connected component of images that were aligned together -18. mesh - { id: string, url: string } - URL to the mesh -19. quality_score - float, how good the image is (experimental) -20. sequence - string, ID of the sequence -21. sfm_cluster - { id: string, url: string } - URL to the point cloud -22. width - int, width of the original image uploaded +13. geometry - GeoJSON Point geometry +14. height - int, height of the original image uploaded +15. make - string, the manufacturer name of the camera device +16. model - string, the model or product series name of the camera device +17. thumb_256_url - string, URL to the 256px wide thumbnail +18. thumb_1024_url - string, URL to the 1024px wide thumbnail +19. thumb_2048_url - string, URL to the 2048px wide thumbnail +20. thumb_original_url - string, URL to the original wide thumbnail +21. merge_cc - int, id of the connected component of images that were aligned together +22. mesh - { id: string, url: string } - URL to the mesh +23. quality_score - float, how good the image is (experimental) +24. sequence - string, ID of the sequence +25. sfm_cluster - { id: string, url: string } - URL to the point cloud +26. width - int, width of the original image uploaded ``` diff --git a/docs/docs/mapillary/mapillary.interface.md b/docs/docs/mapillary/mapillary.interface.md index 9c592d4..a713d31 100644 --- a/docs/docs/mapillary/mapillary.interface.md +++ b/docs/docs/mapillary/mapillary.interface.md @@ -338,42 +338,54 @@ Gets an image for the given key argument 10. computed_rotation - enum, corrected orientation of the image - 11. exif_orientation - enum, orientation of the camera as given by the exif tag + 11. creator - the username and user ID who owns and uploaded the image + + + 12. exif_orientation - enum, orientation of the camera as given by the exif tag (see: [https://sylvana.net/jpegcrop/exif_orientation.html](https://sylvana.net/jpegcrop/exif_orientation.html)) - 12. geometry - GeoJSON Point geometry + 13. geometry - GeoJSON Point geometry + + + 14. height - int, height of the original image uploaded + + + 15. make - string, the manufacturer name of the camera device + + + 16. model - string, the model or product series name of the camera device - 13. height - int, height of the original image uploaded + 17. thumb_256_url - string, URL to the 256px wide thumbnail - 14. thumb_256_url - string, URL to the 256px wide thumbnail + 18. thumb_1024_url - string, URL to the 1024px wide thumbnail - 15. thumb_1024_url - string, URL to the 1024px wide thumbnail + 19. thumb_2048_url - string, URL to the 2048px wide thumbnail - 16. thumb_2048_url - string, URL to the 2048px wide thumbnail + 20. thumb_original_url - string, URL to the original wide thumbnail - 17. merge_cc - int, id of the connected component of images that were aligned + 21. merge_cc - int, id of the connected component of images that were aligned together - 18. mesh - { id: string, url: string } - URL to the mesh + 22. mesh - { id: string, url: string } - URL to the mesh - 19. quality_score - float, how good the image is (experimental) + 23. quality_score - float, how good the image is (experimental) - 20. sequence - string, ID of the sequence + 24. sequence - string, ID of the sequence - 21. sfm_cluster - { id: string, url: string } - URL to the point cloud + 25. sfm_cluster - { id: string, url: string } - URL to the point cloud - 22. width - int, width of the original image uploaded + 26. width - int, width of the original image uploaded Refer to [https://www.mapillary.com/developer/api-documentation/#image](https://www.mapillary.com/developer/api-documentation/#image) for more details diff --git a/src/mapillary/config/api/entities.py b/src/mapillary/config/api/entities.py index 6d6ebbb..4108797 100644 --- a/src/mapillary/config/api/entities.py +++ b/src/mapillary/config/api/entities.py @@ -75,19 +75,23 @@ def get_image(image_id: str, fields: list) -> str: 8. computed_compass_angle - float, compass angle after running image processing 9. computed_geometry - GeoJSON Point, location after running image processing 10. computed_rotation - enum, corrected orientation of the image - 11. exif_orientation - enum, orientation of the camera as given by the exif tag + 11. creator - the username and user ID who owns and uploaded the image + 12. exif_orientation - enum, orientation of the camera as given by the exif tag (see: https://sylvana.net/jpegcrop/exif_orientation.html) - 12. geometry - GeoJSON Point geometry - 13. height - int, height of the original image uploaded - 14. thumb_256_url - string, URL to the 256px wide thumbnail - 15. thumb_1024_url - string, URL to the 1024px wide thumbnail - 16. thumb_2048_url - string, URL to the 2048px wide thumbnail - 17. merge_cc - int, id of the connected component of images that were aligned together - 18. mesh - { id: string, url: string } - URL to the mesh - 19. quality_score - float, how good the image is (experimental) - 20. sequence - string, ID of the sequence - 21. sfm_cluster - { id: string, url: string } - URL to the point cloud - 22. width - int, width of the original image uploaded + 13. geometry - GeoJSON Point geometry + 14. height - int, height of the original image uploaded + 15. make - string, the manufacturer name of the camera device + 16. model - string, the model or product series name of the camera device + 17. thumb_256_url - string, URL to the 256px wide thumbnail + 18. thumb_1024_url - string, URL to the 1024px wide thumbnail + 19. thumb_2048_url - string, URL to the 2048px wide thumbnail + 20. thumb_original_url - string, URL to the original wide thumbnail + 21. merge_cc - int, id of the connected component of images that were aligned together + 22. mesh - { id: string, url: string } - URL to the mesh + 23. quality_score - float, how good the image is (experimental) + 24. sequence - string, ID of the sequence + 25. sfm_cluster - { id: string, url: string } - URL to the point cloud + 26. width - int, width of the original image uploaded """ fields = Entities.__field_validity( @@ -127,19 +131,23 @@ def get_images( 8. computed_compass_angle - float, compass angle after running image processing 9. computed_geometry - GeoJSON Point, location after running image processing 10. computed_rotation - enum, corrected orientation of the image - 11. exif_orientation - enum, orientation of the camera as given by the exif tag + 11. creator - the username and user ID who owns and uploaded the image + 12. exif_orientation - enum, orientation of the camera as given by the exif tag (see: https://sylvana.net/jpegcrop/exif_orientation.html) - 12. geometry - GeoJSON Point geometry - 13. height - int, height of the original image uploaded - 14. thumb_256_url - string, URL to the 256px wide thumbnail - 15. thumb_1024_url - string, URL to the 1024px wide thumbnail - 16. thumb_2048_url - string, URL to the 2048px wide thumbnail - 17. merge_cc - int, id of the connected component of images that were aligned together - 18. mesh - { id: string, url: string } - URL to the mesh - 19. quality_score - float, how good the image is (experimental) - 20. sequence - string, ID of the sequence - 21. sfm_cluster - { id: string, url: string } - URL to the point cloud - 22. width - int, width of the original image uploaded + 13. geometry - GeoJSON Point geometry + 14. height - int, height of the original image uploaded + 15. make - string, the manufacturer name of the camera device + 16. model - string, the model or product series name of the camera device + 17. thumb_256_url - string, URL to the 256px wide thumbnail + 18. thumb_1024_url - string, URL to the 1024px wide thumbnail + 19. thumb_2048_url - string, URL to the 2048px wide thumbnail + 20. thumb_original_url - string, URL to the original wide thumbnail + 21. merge_cc - int, id of the connected component of images that were aligned together + 22. mesh - { id: string, url: string } - URL to the mesh + 23. quality_score - float, how good the image is (experimental) + 24. sequence - string, ID of the sequence + 25. sfm_cluster - { id: string, url: string } - URL to the point cloud + 26. width - int, width of the original image uploaded Raises:: @@ -373,12 +381,16 @@ def get_image_fields() -> list: "computed_compass_angle", "computed_geometry", "computed_rotation", + "creator", "exif_orientation", "geometry", "height", + "make", + "model", "thumb_256_url", "thumb_1024_url", "thumb_2048_url", + "thumb_original_url", "merge_cc", "mesh", "quality_score", diff --git a/src/mapillary/interface.py b/src/mapillary/interface.py index 9c88e5d..ac513a1 100644 --- a/src/mapillary/interface.py +++ b/src/mapillary/interface.py @@ -927,20 +927,23 @@ def image_from_key(key: str, fields: list = []) -> str: 8. computed_compass_angle - float, compass angle after running image processing 9. computed_geometry - GeoJSON Point, location after running image processing 10. computed_rotation - enum, corrected orientation of the image - 11. exif_orientation - enum, orientation of the camera as given by the exif tag + 11. creator - the username and user ID who owns and uploaded the image + 12. exif_orientation - enum, orientation of the camera as given by the exif tag (see: https://sylvana.net/jpegcrop/exif_orientation.html) - 12. geometry - GeoJSON Point geometry - 13. height - int, height of the original image uploaded - 14. thumb_256_url - string, URL to the 256px wide thumbnail - 15. thumb_1024_url - string, URL to the 1024px wide thumbnail - 16. thumb_2048_url - string, URL to the 2048px wide thumbnail - 17. merge_cc - int, id of the connected component of images that were aligned - together - 18. mesh - { id: string, url: string } - URL to the mesh - 19. quality_score - float, how good the image is (experimental) - 20. sequence - string, ID of the sequence - 21. sfm_cluster - { id: string, url: string } - URL to the point cloud - 22. width - int, width of the original image uploaded + 13. geometry - GeoJSON Point geometry + 14. height - int, height of the original image uploaded + 15. make - string, the manufacturer name of the camera device + 16. model - string, the model or product series name of the camera device + 17. thumb_256_url - string, URL to the 256px wide thumbnail + 18. thumb_1024_url - string, URL to the 1024px wide thumbnail + 19. thumb_2048_url - string, URL to the 2048px wide thumbnail + 20. thumb_original_url - string, URL to the original wide thumbnail + 21. merge_cc - int, id of the connected component of images that were aligned together + 22. mesh - { id: string, url: string } - URL to the mesh + 23. quality_score - float, how good the image is (experimental) + 24. sequence - string, ID of the sequence + 25. sfm_cluster - { id: string, url: string } - URL to the point cloud + 26. width - int, width of the original image uploaded Refer to https://www.mapillary.com/developer/api-documentation/#image for more details diff --git a/tests/config/api/test_entities.py b/tests/config/api/test_entities.py index 16f23e9..0245848 100644 --- a/tests/config/api/test_entities.py +++ b/tests/config/api/test_entities.py @@ -436,8 +436,8 @@ def test_search_for_images__fields_param__selected(operation, expected): "https://graph.mapillary.com/images?bbox=62.22656249999999,48.1640625," "38.41055825094609,45.336701909968134&fields=altitude,atomic_scale," "camera_parameters,camera_type,captured_at,compass_angle,computed_altitude," - "computed_compass_angle,computed_geometry,computed_rotation,exif_orientation," - "geometry,height,thumb_256_url,thumb_1024_url,thumb_2048_url,merge_cc,mesh," + "computed_compass_angle,computed_geometry,computed_rotation,creator,exif_orientation," + "geometry,height,make,model,thumb_256_url,thumb_1024_url,thumb_2048_url,thumb_original_url,merge_cc,mesh," "quality_score,sequence,sfm,width" ), )