UNPKG

@mkerkstra/jsts-cjs

Version:

A CommonJS fork of JSTS: A JavaScript library of spatial predicates and functions for processing geometry

19 lines (18 loc) 682 B
import hasInterface from '../../../../hasInterface.js' import CoordinateSequence from './CoordinateSequence.js' export default class CoordinateSequenceFactory { create() { if (arguments.length === 1) { if (arguments[0] instanceof Array) { const coordinates = arguments[0] } else if (hasInterface(arguments[0], CoordinateSequence)) { const coordSeq = arguments[0] } } else if (arguments.length === 2) { const size = arguments[0], dimension = arguments[1] } else if (arguments.length === 3) { const size = arguments[0], dimension = arguments[1], measures = arguments[2] return this.create(size, dimension) } } }