@@ -179,11 +179,10 @@ class ItemSearch:
179
179
bbox: A list, tuple, or iterator representing a bounding box of 2D
180
180
or 3D coordinates. Results will be filtered
181
181
to only those intersecting the bounding box.
182
- intersects: A string or dictionary representing a GeoJSON geometry, or
183
- an object that implements a
184
- ``__geo_interface__`` property, as supported by several libraries
185
- including Shapely, ArcPy, PySAL, and
186
- geojson. Results filtered to only those intersecting the geometry.
182
+ intersects: A string or dictionary representing a GeoJSON geometry or feature,
183
+ or an object that implements a ``__geo_interface__`` property, as supported
184
+ by several libraries including Shapely, ArcPy, PySAL, and geojson. Results
185
+ filtered to only those intersecting the geometry.
187
186
datetime: Either a single datetime or datetime range used to filter results.
188
187
You may express a single datetime using a :class:`datetime.datetime`
189
188
instance, a `RFC 3339-compliant <https://tools.ietf.org/html/rfc3339>`__
@@ -646,7 +645,10 @@ def _format_intersects(value: Optional[IntersectsLike]) -> Optional[Intersects]:
646
645
if value is None :
647
646
return None
648
647
if isinstance (value , dict ):
649
- return deepcopy (value )
648
+ if value .get ("type" ) == "Feature" :
649
+ return deepcopy (value .get ("geometry" ))
650
+ else :
651
+ return deepcopy (value )
650
652
if isinstance (value , str ):
651
653
return dict (json .loads (value ))
652
654
if hasattr (value , "__geo_interface__" ):
0 commit comments