UNPKG

node-red-contrib-tak-registration

Version:

A Node-RED node to register to TAK and to help wrap files as datapackages to send to TAK

24 lines (23 loc) 726 B
import AbstractPreparedPolygonContains from './AbstractPreparedPolygonContains' export default class PreparedPolygonCovers extends AbstractPreparedPolygonContains { constructor() { super() PreparedPolygonCovers.constructor_.apply(this, arguments) } static constructor_() { const prepPoly = arguments[0] AbstractPreparedPolygonContains.constructor_.call(this, prepPoly) this._requireSomePointInInterior = false } static covers(prep, geom) { const polyInt = new PreparedPolygonCovers(prep) return polyInt.covers(geom) } fullTopologicalPredicate(geom) { const result = this._prepPoly.getGeometry().covers(geom) return result } covers(geom) { return this.eval(geom) } }