From 6c38a0960bee184a07a110d9894a84c5da4c35c6 Mon Sep 17 00:00:00 2001 From: Sam <87801374+MSameerAbbas@users.noreply.github.com> Date: Sat, 5 Jul 2025 20:25:06 +0500 Subject: [PATCH 1/2] Update interface.py (org_id to organization_id) Fixed inconsistent use of organization_id filter in interface.py. Since the image_bbox_check only allows organization_id to pass and throws an error on org_id, I've switched all the instances of org_id to organization_id. Next commit should do the same to controller/images.py which handles the filtering --- src/mapillary/interface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mapillary/interface.py b/src/mapillary/interface.py index ac513a1..b2f5223 100644 --- a/src/mapillary/interface.py +++ b/src/mapillary/interface.py @@ -121,9 +121,9 @@ def get_image_close_to(latitude=-122.1504711, longitude=37.485073, **kwargs): :param kwargs.max_captured_at: The max date. Format from 'YYYY', to 'YYYY-MM-DDTHH:MM:SS' :type kwargs.max_captured_at: str - :param kwargs.org_id: The organization id, ID of the organization this image (or sets of + :param kwargs.organization_id: The organization id, ID of the organization this image (or sets of images) belong to. It can be absent. Thus, default is -1 (None) - :type kwargs.org_id: int + :type kwargs.organization_id: int :return: GeoJSON :rtype: dict @@ -444,7 +444,7 @@ def sequences_in_bbox(bbox: dict, **filters) -> str: - max_captured_at - min_captured_at - image_type: pano, flat, or all - - org_id + - organization_id :type filters: dict @@ -467,7 +467,7 @@ def sequences_in_bbox(bbox: dict, **filters) -> str: ... max_captured_at='YYYY-MM-DD HH:MM:SS', ... min_captured_at='YYYY-MM-DD HH:MM:SS', ... image_type='pano', - ... org_id='ORG_ID' + ... organization_id='ORG_ID' ... ) """ From 5ddb458183a39820253f18a62b7c0422ad20c8db Mon Sep 17 00:00:00 2001 From: Sam <87801374+MSameerAbbas@users.noreply.github.com> Date: Sat, 5 Jul 2025 20:26:02 +0500 Subject: [PATCH 2/2] Update image.py (org_id to organization_id) Fixed inconsistent use of organization_id filter in image.py. Since the image_bbox_check only allows organization_id to pass and throws an error on org_id, I've switched all the instances of org_id to organization_id. Previously this was done to interface.py. --- src/mapillary/controller/image.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mapillary/controller/image.py b/src/mapillary/controller/image.py index 2559e07..c420da0 100644 --- a/src/mapillary/controller/image.py +++ b/src/mapillary/controller/image.py @@ -145,9 +145,9 @@ def get_image_close_to_controller( # Filter using kwargs.organization_id { "filter": "organization_id", - "organization_ids": kwargs["org_id"], + "organization_ids": kwargs["organization_id"], } - if "org_id" in kwargs + if "organization_id" in kwargs else {}, # Filter using kwargs.radius { @@ -654,7 +654,7 @@ def geojson_features_controller( # Filter using filters.organization_id { "filter": "organization_id", - "organization_ids": filters["org_id"], + "organization_ids": filters["organization_id"], } if "organization_id" in filters else {}, @@ -826,7 +826,7 @@ def shape_features_controller( # Filter using filters.organization_id { "filter": "organization_id", - "organization_ids": filters["org_id"], + "organization_ids": filters["organization_ids"], } if "organization_id" in filters else {},