Skip to content

vector_buffer not in line with official spec #247

Open
@soxofaan

Description

@soxofaan

@non_standard_process(
ProcessSpec(id='vector_buffer', description="Add a buffer around a geometry.")
.param(name='geometry', description="Input geometry (GeoJSON object) to add buffer to.",
schema={"type": "object", "subtype": "geojson"}, required=True)
.param(name='distance', description="The size of the buffer. Can be negative to subtract the buffer",
schema={"type": "number"}, required=True)
.param(name='unit', description="The unit in which the distance is measured.",
schema={"type": "string", "enum": ["meter", "kilometer"]})
.returns(description="Output geometry (GeoJSON object) with the added or subtracted buffer",
schema={"type": "object", "subtype": "geojson"})
)
def vector_buffer(args: Dict, env: EvalEnv) -> dict:

uses arguments:

  • singular geometry (inline geojson)
  • distance (number)
  • unit (number, and required)

Current official spec: https://github.com/Open-EO/openeo-processes/blob/965bbaebd4d5984203a0437076c85a66a72a23e0/proposals/vector_buffer.json
specifies arguments:

  • plural geometries ("vector cube")
  • distance (number)

Note that this standard API is copied over to autogenerated helper in python client: https://github.com/Open-EO/openeo-python-client/blob/7ce92925dd9544ff116b14c0339de203f854ec27/openeo/processes.py#L5497

The difference in singular/plural and the unit argument (which is required but non-standard) make future proof usage problematic

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions