jsts
Version:
A JavaScript library of spatial predicates and functions for processing geometry
16 lines (15 loc) • 456 B
JavaScript
import BasicPreparedGeometry from './BasicPreparedGeometry.js'
export default class PreparedPoint extends BasicPreparedGeometry {
constructor() {
super()
PreparedPoint.constructor_.apply(this, arguments)
}
static constructor_() {
const point = arguments[0]
BasicPreparedGeometry.constructor_.call(this, point)
}
intersects(g) {
if (!this.envelopesIntersect(g)) return false
return this.isAnyTargetComponentInTest(g)
}
}