flatgeobuf
Version:
A performant binary encoding for geographic data
2 lines • 436 B
JavaScript
import{GeometryType as e}from"../flat-geobuf/geometry-type.js";import{toGeometryType as o}from"../generic/geometry.js";export function inferGeometryType(t){let r;for(let f of t){if(r===e.Unknown)break;let t=f.getGeometry?o(f.getGeometry().getType()):o(f.geometry.type);void 0===r?r=t:r!==t&&(r=e.Unknown)}if(void 0===r)throw Error("Could not infer geometry type for collection of features.");return r}
//# sourceMappingURL=header.js.map