Skip to content

Commit 71c52c3

Browse files
authored
Merge pull request #155 from CarbonCrushing/image-fields-update
Updated image entity fields
2 parents cddee9f + bcba06f commit 71c52c3

File tree

5 files changed

+94
-63
lines changed

5 files changed

+94
-63
lines changed

docs/docs/mapillary.config.api/mapillary.config.api.entities.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,19 +143,23 @@ Fields:
143143
8. computed_compass_angle - float, compass angle after running image processing
144144
9. computed_geometry - GeoJSON Point, location after running image processing
145145
10. computed_rotation - enum, corrected orientation of the image
146-
11. exif_orientation - enum, orientation of the camera as given by the exif tag
146+
11. creator - the username and user ID who owns and uploaded the image
147+
12. exif_orientation - enum, orientation of the camera as given by the exif tag
147148
(see: https://sylvana.net/jpegcrop/exif_orientation.html)
148-
12. geometry - GeoJSON Point geometry
149-
13. height - int, height of the original image uploaded
150-
14. thumb_256_url - string, URL to the 256px wide thumbnail
151-
15. thumb_1024_url - string, URL to the 1024px wide thumbnail
152-
16. thumb_2048_url - string, URL to the 2048px wide thumbnail
153-
17. merge_cc - int, id of the connected component of images that were aligned together
154-
18. mesh - { id: string, url: string } - URL to the mesh
155-
19. quality_score - float, how good the image is (experimental)
156-
20. sequence - string, ID of the sequence
157-
21. sfm_cluster - { id: string, url: string } - URL to the point cloud
158-
22. width - int, width of the original image uploaded
149+
13. geometry - GeoJSON Point geometry
150+
14. height - int, height of the original image uploaded
151+
15. make - string, the manufacturer name of the camera device
152+
16. model - string, the model or product series name of the camera device
153+
17. thumb_256_url - string, URL to the 256px wide thumbnail
154+
18. thumb_1024_url - string, URL to the 1024px wide thumbnail
155+
19. thumb_2048_url - string, URL to the 2048px wide thumbnail
156+
20. thumb_original_url - string, URL to the original wide thumbnail
157+
21. merge_cc - int, id of the connected component of images that were aligned together
158+
22. mesh - { id: string, url: string } - URL to the mesh
159+
23. quality_score - float, how good the image is (experimental)
160+
24. sequence - string, ID of the sequence
161+
25. sfm_cluster - { id: string, url: string } - URL to the point cloud
162+
26. width - int, width of the original image uploaded
159163
```
160164

161165

docs/docs/mapillary/mapillary.interface.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,42 +338,54 @@ Gets an image for the given key argument
338338
10. computed_rotation - enum, corrected orientation of the image
339339
340340
341-
11. exif_orientation - enum, orientation of the camera as given by the exif tag
341+
11. creator - the username and user ID who owns and uploaded the image
342+
343+
344+
12. exif_orientation - enum, orientation of the camera as given by the exif tag
342345
(see: [https://sylvana.net/jpegcrop/exif_orientation.html](https://sylvana.net/jpegcrop/exif_orientation.html))
343346
344347
345-
12. geometry - GeoJSON Point geometry
348+
13. geometry - GeoJSON Point geometry
349+
350+
351+
14. height - int, height of the original image uploaded
352+
353+
354+
15. make - string, the manufacturer name of the camera device
355+
356+
357+
16. model - string, the model or product series name of the camera device
346358
347359
348-
13. height - int, height of the original image uploaded
360+
17. thumb_256_url - string, URL to the 256px wide thumbnail
349361
350362
351-
14. thumb_256_url - string, URL to the 256px wide thumbnail
363+
18. thumb_1024_url - string, URL to the 1024px wide thumbnail
352364
353365
354-
15. thumb_1024_url - string, URL to the 1024px wide thumbnail
366+
19. thumb_2048_url - string, URL to the 2048px wide thumbnail
355367
356368
357-
16. thumb_2048_url - string, URL to the 2048px wide thumbnail
369+
20. thumb_original_url - string, URL to the original wide thumbnail
358370
359371
360-
17. merge_cc - int, id of the connected component of images that were aligned
372+
21. merge_cc - int, id of the connected component of images that were aligned
361373
together
362374
363375
364-
18. mesh - { id: string, url: string } - URL to the mesh
376+
22. mesh - { id: string, url: string } - URL to the mesh
365377
366378
367-
19. quality_score - float, how good the image is (experimental)
379+
23. quality_score - float, how good the image is (experimental)
368380
369381
370-
20. sequence - string, ID of the sequence
382+
24. sequence - string, ID of the sequence
371383
372384
373-
21. sfm_cluster - { id: string, url: string } - URL to the point cloud
385+
25. sfm_cluster - { id: string, url: string } - URL to the point cloud
374386
375387
376-
22. width - int, width of the original image uploaded
388+
26. width - int, width of the original image uploaded
377389
378390
Refer to [https://www.mapillary.com/developer/api-documentation/#image](https://www.mapillary.com/developer/api-documentation/#image) for more details
379391

src/mapillary/config/api/entities.py

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,23 @@ def get_image(image_id: str, fields: list) -> str:
7575
8. computed_compass_angle - float, compass angle after running image processing
7676
9. computed_geometry - GeoJSON Point, location after running image processing
7777
10. computed_rotation - enum, corrected orientation of the image
78-
11. exif_orientation - enum, orientation of the camera as given by the exif tag
78+
11. creator - the username and user ID who owns and uploaded the image
79+
12. exif_orientation - enum, orientation of the camera as given by the exif tag
7980
(see: https://sylvana.net/jpegcrop/exif_orientation.html)
80-
12. geometry - GeoJSON Point geometry
81-
13. height - int, height of the original image uploaded
82-
14. thumb_256_url - string, URL to the 256px wide thumbnail
83-
15. thumb_1024_url - string, URL to the 1024px wide thumbnail
84-
16. thumb_2048_url - string, URL to the 2048px wide thumbnail
85-
17. merge_cc - int, id of the connected component of images that were aligned together
86-
18. mesh - { id: string, url: string } - URL to the mesh
87-
19. quality_score - float, how good the image is (experimental)
88-
20. sequence - string, ID of the sequence
89-
21. sfm_cluster - { id: string, url: string } - URL to the point cloud
90-
22. width - int, width of the original image uploaded
81+
13. geometry - GeoJSON Point geometry
82+
14. height - int, height of the original image uploaded
83+
15. make - string, the manufacturer name of the camera device
84+
16. model - string, the model or product series name of the camera device
85+
17. thumb_256_url - string, URL to the 256px wide thumbnail
86+
18. thumb_1024_url - string, URL to the 1024px wide thumbnail
87+
19. thumb_2048_url - string, URL to the 2048px wide thumbnail
88+
20. thumb_original_url - string, URL to the original wide thumbnail
89+
21. merge_cc - int, id of the connected component of images that were aligned together
90+
22. mesh - { id: string, url: string } - URL to the mesh
91+
23. quality_score - float, how good the image is (experimental)
92+
24. sequence - string, ID of the sequence
93+
25. sfm_cluster - { id: string, url: string } - URL to the point cloud
94+
26. width - int, width of the original image uploaded
9195
"""
9296

9397
fields = Entities.__field_validity(
@@ -127,19 +131,23 @@ def get_images(
127131
8. computed_compass_angle - float, compass angle after running image processing
128132
9. computed_geometry - GeoJSON Point, location after running image processing
129133
10. computed_rotation - enum, corrected orientation of the image
130-
11. exif_orientation - enum, orientation of the camera as given by the exif tag
134+
11. creator - the username and user ID who owns and uploaded the image
135+
12. exif_orientation - enum, orientation of the camera as given by the exif tag
131136
(see: https://sylvana.net/jpegcrop/exif_orientation.html)
132-
12. geometry - GeoJSON Point geometry
133-
13. height - int, height of the original image uploaded
134-
14. thumb_256_url - string, URL to the 256px wide thumbnail
135-
15. thumb_1024_url - string, URL to the 1024px wide thumbnail
136-
16. thumb_2048_url - string, URL to the 2048px wide thumbnail
137-
17. merge_cc - int, id of the connected component of images that were aligned together
138-
18. mesh - { id: string, url: string } - URL to the mesh
139-
19. quality_score - float, how good the image is (experimental)
140-
20. sequence - string, ID of the sequence
141-
21. sfm_cluster - { id: string, url: string } - URL to the point cloud
142-
22. width - int, width of the original image uploaded
137+
13. geometry - GeoJSON Point geometry
138+
14. height - int, height of the original image uploaded
139+
15. make - string, the manufacturer name of the camera device
140+
16. model - string, the model or product series name of the camera device
141+
17. thumb_256_url - string, URL to the 256px wide thumbnail
142+
18. thumb_1024_url - string, URL to the 1024px wide thumbnail
143+
19. thumb_2048_url - string, URL to the 2048px wide thumbnail
144+
20. thumb_original_url - string, URL to the original wide thumbnail
145+
21. merge_cc - int, id of the connected component of images that were aligned together
146+
22. mesh - { id: string, url: string } - URL to the mesh
147+
23. quality_score - float, how good the image is (experimental)
148+
24. sequence - string, ID of the sequence
149+
25. sfm_cluster - { id: string, url: string } - URL to the point cloud
150+
26. width - int, width of the original image uploaded
143151
144152
Raises::
145153
@@ -373,12 +381,16 @@ def get_image_fields() -> list:
373381
"computed_compass_angle",
374382
"computed_geometry",
375383
"computed_rotation",
384+
"creator",
376385
"exif_orientation",
377386
"geometry",
378387
"height",
388+
"make",
389+
"model",
379390
"thumb_256_url",
380391
"thumb_1024_url",
381392
"thumb_2048_url",
393+
"thumb_original_url",
382394
"merge_cc",
383395
"mesh",
384396
"quality_score",

src/mapillary/interface.py

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -927,20 +927,23 @@ def image_from_key(key: str, fields: list = []) -> str:
927927
8. computed_compass_angle - float, compass angle after running image processing
928928
9. computed_geometry - GeoJSON Point, location after running image processing
929929
10. computed_rotation - enum, corrected orientation of the image
930-
11. exif_orientation - enum, orientation of the camera as given by the exif tag
930+
11. creator - the username and user ID who owns and uploaded the image
931+
12. exif_orientation - enum, orientation of the camera as given by the exif tag
931932
(see: https://sylvana.net/jpegcrop/exif_orientation.html)
932-
12. geometry - GeoJSON Point geometry
933-
13. height - int, height of the original image uploaded
934-
14. thumb_256_url - string, URL to the 256px wide thumbnail
935-
15. thumb_1024_url - string, URL to the 1024px wide thumbnail
936-
16. thumb_2048_url - string, URL to the 2048px wide thumbnail
937-
17. merge_cc - int, id of the connected component of images that were aligned
938-
together
939-
18. mesh - { id: string, url: string } - URL to the mesh
940-
19. quality_score - float, how good the image is (experimental)
941-
20. sequence - string, ID of the sequence
942-
21. sfm_cluster - { id: string, url: string } - URL to the point cloud
943-
22. width - int, width of the original image uploaded
933+
13. geometry - GeoJSON Point geometry
934+
14. height - int, height of the original image uploaded
935+
15. make - string, the manufacturer name of the camera device
936+
16. model - string, the model or product series name of the camera device
937+
17. thumb_256_url - string, URL to the 256px wide thumbnail
938+
18. thumb_1024_url - string, URL to the 1024px wide thumbnail
939+
19. thumb_2048_url - string, URL to the 2048px wide thumbnail
940+
20. thumb_original_url - string, URL to the original wide thumbnail
941+
21. merge_cc - int, id of the connected component of images that were aligned together
942+
22. mesh - { id: string, url: string } - URL to the mesh
943+
23. quality_score - float, how good the image is (experimental)
944+
24. sequence - string, ID of the sequence
945+
25. sfm_cluster - { id: string, url: string } - URL to the point cloud
946+
26. width - int, width of the original image uploaded
944947
945948
Refer to https://www.mapillary.com/developer/api-documentation/#image for more details
946949

tests/config/api/test_entities.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,8 @@ def test_search_for_images__fields_param__selected(operation, expected):
436436
"https://graph.mapillary.com/images?bbox=62.22656249999999,48.1640625,"
437437
"38.41055825094609,45.336701909968134&fields=altitude,atomic_scale,"
438438
"camera_parameters,camera_type,captured_at,compass_angle,computed_altitude,"
439-
"computed_compass_angle,computed_geometry,computed_rotation,exif_orientation,"
440-
"geometry,height,thumb_256_url,thumb_1024_url,thumb_2048_url,merge_cc,mesh,"
439+
"computed_compass_angle,computed_geometry,computed_rotation,creator,exif_orientation,"
440+
"geometry,height,make,model,thumb_256_url,thumb_1024_url,thumb_2048_url,thumb_original_url,merge_cc,mesh,"
441441
"quality_score,sequence,sfm,width"
442442
),
443443
)

0 commit comments

Comments
 (0)