Skip to content

Support shapely geometries / __geo_interface__ for intersects #146

@TomAugspurger

Description

@TomAugspurger

As a convenience, it'd be nice to pass a shapely object for intersects in search.

item_a = ...
point = shapely.geometry.shape(item_a).centroid  # a shapely point

search(..., intersects=point)

Internally, pystac-client could convert to the geojson representation.

To generalize a bit more, there's the __geo_interface__: https://gist.github.com/sgillies/2217756. pystac-client might check for that method and call it if it exists, regardless of the type of the object.

Come to think of it, maybe pystac items should implement __geo_interface__ too... (stac-utils/pystac#786)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions