diff --git a/proposals/vector_buffer.json b/proposals/vector_buffer.json index 9c4f86ae..05be9a58 100644 --- a/proposals/vector_buffer.json +++ b/proposals/vector_buffer.json @@ -22,7 +22,7 @@ }, { "name": "distance", - "description": "The distance of the buffer in the unit of the spatial reference system. A positive distance expands the geometries and results in outward buffering (dilation) while a negative distance shrinks the geometries and results in inward buffering (erosion).", + "description": "The distance of the buffer in meters. If the unit of the spatial reference system is not meters, a `UnitMismatch` error is thrown. Use ``vector_reproject()`` to convert the geometries to a suitable spatial reference system.\n\nA positive distance expands the geometries and results in outward buffering (dilation) while a negative distance shrinks the geometries and results in inward buffering (erosion).", "schema": { "type": "number", "not": { @@ -42,5 +42,10 @@ } ] } + }, + "exceptions": { + "UnitMismatch": { + "message": "The unit of the spatial reference system is not meters, but the given distance is in meters." + } } } diff --git a/proposals/vector_to_regular_points.json b/proposals/vector_to_regular_points.json index 2f353bdb..c7f7089c 100644 --- a/proposals/vector_to_regular_points.json +++ b/proposals/vector_to_regular_points.json @@ -23,7 +23,7 @@ }, { "name": "distance", - "description": "Defines the minimum distance in the unit of the reference system that is required between two samples generated *inside* a single geometry.\n\n- For **polygons**, the distance defines the cell sizes of a regular grid that starts at the upper-left bound of each polygon. The centroid of each cell is then a sample point. If the centroid is not enclosed in the polygon, no point is sampled. If no point can be sampled for the geometry at all, the first coordinate of the geometry is returned as point.\n- For **lines** (line strings), the sampling starts with a point at the first coordinate of the line and then walks along the line and samples a new point each time the distance to the previous point has been reached again.\n- For **points**, the point is returned as given.", + "description": "Defines the minimum distance in meters that is required between two samples generated *inside* a single geometry. If the unit of the spatial reference system is not meters, a `UnitMismatch` error is thrown. Use ``vector_reproject()`` to convert the geometries to a suitable spatial reference system.\n\n- For **polygons**, the distance defines the cell sizes of a regular grid that starts at the upper-left bound of each polygon. The centroid of each cell is then a sample point. If the centroid is not enclosed in the polygon, no point is sampled. If no point can be sampled for the geometry at all, the first coordinate of the geometry is returned as point.\n- For **lines** (line strings), the sampling starts with a point at the first coordinate of the line and then walks along the line and samples a new point each time the distance to the previous point has been reached again.\n- For **points**, the point is returned as given.", "schema": { "type": "number", "minimumExclusive": 0 @@ -54,5 +54,10 @@ } ] } + }, + "exceptions": { + "UnitMismatch": { + "message": "The unit of the spatial reference system is not meters, but the given distance is in meters." + } } }