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
19 lines (17 loc) • 596 B
JavaScript
import InteriorPointArea from './InteriorPointArea'
import InteriorPointLine from './InteriorPointLine'
import InteriorPointPoint from './InteriorPointPoint'
export default class InteriorPoint {
static getInteriorPoint(geom) {
if (geom.isEmpty()) return null
let interiorPt = null
const dim = geom.getDimension()
if (dim === 0)
interiorPt = InteriorPointPoint.getInteriorPoint(geom)
else if (dim === 1)
interiorPt = InteriorPointLine.getInteriorPoint(geom)
else
interiorPt = InteriorPointArea.getInteriorPoint(geom)
return interiorPt
}
}