sat-utils / sat-api

One API to search public satellites metadata on AWS
https://sat-api.developmentseed.org/search/stac
MIT License
177 stars 20 forks source link

Intersects parameter should accept geometry #204

Closed matthewhanson closed 4 years ago

matthewhanson commented 4 years ago

With 0.8.0 the intersects parameter accepts a GeoJSON geometry instead of a GeoJSON feature.

Right now sat-api accepts either, https://github.com/sat-utils/sat-api/blob/master/packages/api-lib/libs/api.js#L6

if it is a geometry it wraps it in a Feature, although later it just extracts the geometry back out again: https://github.com/sat-utils/sat-api/blob/master/packages/api-lib/libs/es.js#L309

The API should only accept a geometry, and throw a meaningful error with message if a Feature or FeatureCollection is provided instead.