Identifies geometry position format as flat array, array of arrays, typed array, or 1D ndarray.
npm install geo-identify-position-formatIdentifies a few common geometry position formats.
``sh`
npm install geo-identify-position-format
js
var geoid = require('geo-identify-position-format');
`####
geoid.identify(positions)returns one of:
*
geoid.FLAT_ARRAY
* geoid.ARRAY_OF_ARRAYS
* geoid.TYPED_ARRAY
* geoid.ARRAY_OF_TYPED_ARRAYS
* geoid.NDARRAYwhen
positions has one of the following formats:* Flat arrays
[1,2,3,4,5,6]
* Array of arrays [[1,2,3], [4,5,6]]
* Array of TypedArrays [new Float32Array([1,2,3]), new Float32Array([4,5,6])]
* TypedArray new Float32Array([1,2,3,4,5,6])
* ndarray ndarray(new Float32Array([1,2,3,4,5,6]))If
positions does not have one of the previously listed formats, geoid.identify`Extracted from @hughsk's gl-geometry.