sat-utils/sat-api

Intersects parameter should accept geometry

matthewhanson opened this issue · 0 comments

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.