diff --git a/tests/test_collections.py b/tests/test_collections.py index a487ffe..bd2fc74 100644 --- a/tests/test_collections.py +++ b/tests/test_collections.py @@ -473,7 +473,7 @@ def test_bbox_collection(rio, app): def test_query_point_collections(app): """Get values for a Point.""" response = app.get( - f"/collections/{collection_id}/-85.5,36.1624/values", params={"assets": "cog"} + f"/collections/{collection_id}/point/-85.5,36.1624", params={"assets": "cog"} ) assert response.status_code == 200 @@ -486,7 +486,7 @@ def test_query_point_collections(app): # with coord-crs response = app.get( - f"/collections/{collection_id}/-9517816.46282489,4322990.432036275/values", + f"/collections/{collection_id}/point/-9517816.46282489,4322990.432036275", params={"assets": "cog", "coord_crs": "epsg:3857"}, ) assert response.status_code == 200 @@ -495,7 +495,7 @@ def test_query_point_collections(app): # CollectionId not found response = app.get( - "/collections/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/-85.5,36.1624/values", + "/collections/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/point/-85.5,36.1624", params={"assets": "cog"}, ) assert response.status_code == 404 @@ -504,7 +504,7 @@ def test_query_point_collections(app): # at a point with no assets response = app.get( - f"/collections/{collection_id}/-86.0,-35.0/values", params={"assets": "cog"} + f"/collections/{collection_id}/point/-86.0,-35.0", params={"assets": "cog"} ) assert response.status_code == 204 # (no content) diff --git a/tests/test_searches.py b/tests/test_searches.py index aef4bed..9aaf1aa 100644 --- a/tests/test_searches.py +++ b/tests/test_searches.py @@ -974,7 +974,7 @@ def test_bbox(rio, app, search_no_bbox): def test_query_point_searches(app, search_no_bbox, search_bbox): """Test getting values for a Point.""" response = app.get( - f"/searches/{search_no_bbox}/-85.5,36.1624/values", params={"assets": "cog"} + f"/searches/{search_no_bbox}/point/-85.5,36.1624", params={"assets": "cog"} ) assert response.status_code == 200 @@ -987,7 +987,7 @@ def test_query_point_searches(app, search_no_bbox, search_bbox): # with coord-crs response = app.get( - f"/searches/{search_no_bbox}/-9517816.46282489,4322990.432036275/values", + f"/searches/{search_no_bbox}/point/-9517816.46282489,4322990.432036275", params={"assets": "cog", "coord_crs": "epsg:3857"}, ) assert response.status_code == 200 @@ -996,7 +996,7 @@ def test_query_point_searches(app, search_no_bbox, search_bbox): # SearchId not found response = app.get( - "/searches/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/-85.5,36.1624/values", + "/searches/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/point/-85.5,36.1624", params={"assets": "cog"}, ) assert response.status_code == 404 @@ -1005,7 +1005,7 @@ def test_query_point_searches(app, search_no_bbox, search_bbox): # outside of searchid bbox response = app.get( - f"/searches/{search_bbox}/-86.0,35.0/values", params={"assets": "cog"} + f"/searches/{search_bbox}/point/-86.0,35.0", params={"assets": "cog"} ) assert response.status_code == 204 # (no content) diff --git a/titiler/pgstac/factory.py b/titiler/pgstac/factory.py index 8e41a0b..c1f9e9f 100644 --- a/titiler/pgstac/factory.py +++ b/titiler/pgstac/factory.py @@ -906,7 +906,7 @@ def _point_routes(self): """Register point values endpoint.""" @self.router.get( - "/{lon},{lat}/values", + "/point/{lon},{lat}", response_model=Point, response_class=JSONResponse, responses={200: {"description": "Return a value for a point"}},