mapillary / mapillary-python-sdk

A Python 3 library built on the Mapillary API v4 to facilitate retrieving and working with Mapillary data.
MIT License
41 stars 16 forks source link

mapillary.interface.get_image_close_to cannot filter organization_id #151

Open koito19960406 opened 1 year ago

koito19960406 commented 1 year ago

Describe the bug When specifying "organization_id" in mapillary.interface.get_image_close_to function, the output includes ids of images captured by others than the specified "organization_id"

To Reproduce mapillary.interface.get_image_close_to(latitude=-122.1504711, longitude=37.485073, organization_id = YOUR_ORG_ID)

Expected behavior I expected that I only get ids by images captured by the specified organization id

Screenshots I just got all the images near the input points

Additional context The root cause is the discrepancy between image_check and get_image_close_to_controller functions. image_check only allows "organization_id" as a valid kwarg but get_image_close_to_controller only recognizes "org_id" when filtering kwarg.

                            {
                                "filter": "organization_id",
                                "organization_ids": kwargs["org_id"],
                            }
                            if "org_id" in kwargs