Compare commits

...

3 Commits

Author SHA1 Message Date
Jovan Krunić
5241a01b55 0.66.0 2022-05-11 13:54:52 +02:00
484be6a890 feat: add geo filter envelope support 2022-04-28 09:50:44 +02:00
Rainer Killinger
45e0f26391 docs: update changelog 2022-04-04 20:56:06 +02:00
4 changed files with 26 additions and 4 deletions

View File

@@ -1,3 +1,7 @@
## [0.65.1](https://gitlab.com/openstapps/core/compare/v0.65.0...v0.65.1) (2022-04-04)
# [0.65.0](https://gitlab.com/openstapps/core/compare/v0.64.0...v0.65.0) (2022-04-04)

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "@openstapps/core",
"version": "0.65.1",
"version": "0.66.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "@openstapps/core",
"version": "0.65.1",
"version": "0.66.0",
"description": "StAppsCore - Generalized model of data",
"keywords": [
"Model",

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
// tslint:disable-next-line:no-implicit-dependencies
import {Polygon} from 'geojson';
import {Polygon, Position} from 'geojson';
import {SCThingsField} from '../../../meta';
import {SCSearchAbstractFilter, SCSearchAbstractFilterArguments} from '../filter';
@@ -29,6 +29,24 @@ export interface SCGeoFilter extends SCSearchAbstractFilter<SCGeoFilterArguments
type: 'geo';
}
/**
* A rectangular geo shape, representing the top-left and bottom-right corners
*
* This is an extension of the Geojson type
* http://geojson.org/geojson-spec.html
*/
export interface Envelope {
/**
* The top-left and bottom-right corners of the bounding box
*/
coordinates: [Position, Position];
/**
* The type of the geometry
*/
type: 'envelope';
}
/**
* Arguments for filter instruction by geo data
*/
@@ -41,7 +59,7 @@ export interface SCGeoFilterArguments extends SCSearchAbstractFilterArguments {
/**
* Geo data to check up on
*/
shape: Polygon;
shape: Polygon | Envelope;
/**
* Spatial relation between the provided shape and the shape of the field.