export const point=t("Point","POINT",!1);export const pointZ=t("Point","POINTZ",!0);export const multipoint=t("MultiPoint","MULTIPOINT",!1);export const multipointZ=t("MultiPoint","MULTIPOINTZ",!0);export const line=t("LineString","POLYLINE",!1);export const lineZ=t("LineString","POLYLINEZ",!0);export const polygon=t("Polygon","POLYGON",!1);export const polygonZ=t("Polygon","POLYGONZ",!0);function t(t,n,r){return function(i){var c,u=i.features.filter((c=t,function(t){return t.geometry.type===c})).filter(function(t,o){return function(e){var n;return n="POINT"===t||"POINTZ"===t?[e.geometry.coordinates]:Array.isArray(e.geometry.coordinates[0][0])?e.geometry.coordinates.reduce((function(t,o){return t.concat(o)}),[]):e.geometry.coordinates,o?n.some((function(t){return t.length>=3})):n.every((function(t){return 2===t.length}))}}(n,r));return{geometries:"POLYGON"===n||"POLYLINE"===n||"POLYGONZ"===n||"POLYLINEZ"===n?[u.map(o)]:u.map(o),properties:u.map(e),type:n}}}function o(t){return void 0!==t.geometry.coordinates[0]&&void 0!==t.geometry.coordinates[0][0]&&void 0!==t.geometry.coordinates[0][0][0]?t.geometry.coordinates[0]:t.geometry.coordinates}function e(t){return t.properties}