UNPKG

@seasketch/geoprocessing

Version:

Geoprocessing and reporting framework for SeaSketch 2.0

39 lines (38 loc) 2.31 kB
import { Geometry, Feature, Polygon, MultiPolygon, LineString, Point, FeatureCollection } from "../types/geojson.js"; /** * Check if object is a Feature. Any code inside a block guarded by a conditional call to this function will have type narrowed to Feature */ export declare function isGeometry(geometry: any): geometry is Geometry; /** * Check if object is a Feature. Any code inside a block guarded by a conditional call to this function will have type narrowed */ export declare function isFeature(feature: any): feature is Feature; /** * Check if object is a Polygon feature. Any code inside a block guarded by a conditional call to this function will have type narrowed */ export declare function isPolygonFeature(feature: any): feature is Feature<Polygon>; /** * Check if object is an array of Polygon features. Any code inside a block guarded by a conditional call to this function will have type narrowed */ export declare function isPolygonFeatureArray(featureArray: any): featureArray is Feature<Polygon>[]; /** * Check if object is a MultiPolygon. Any code inside a block guarded by a conditional call to this function will have type narrowed */ export declare function isMultiPolygonFeature(feature: any): feature is Feature<MultiPolygon>; /** * Check if object is a Polygon or MultiPolygon. Any code inside a block guarded by a conditional call to this function will have type narrowed */ export declare function isPolygonAnyFeature(feature: any): feature is Feature<MultiPolygon>; /** * Check if object is a Linestring. Any code inside a block guarded by a conditional call to this function will have type narrowed */ export declare function isLineStringFeature(feature: any): feature is Feature<LineString>; /** * Check if object is a Point. Any code inside a block guarded by a conditional call to this function will have type narrowed */ export declare function isPointFeature(feature: any): feature is Feature<Point>; /** * Check if object is a Feature Collection. Any code inside a block guarded by a conditional call to this function will have type narrowed */ export declare function isFeatureCollection(feature: any): feature is FeatureCollection; export declare const collectionHasGeometry: (collection: FeatureCollection, g: string | string[]) => boolean;