mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
This commit is contained in:
parent
0f634b7a5b
commit
a3fb47d63b
1 changed files with 4 additions and 1 deletions
|
@ -9,8 +9,11 @@ import rewind from 'geojson-rewind';
|
|||
|
||||
export function geoJsonCleanAndValidate(parsedFile) {
|
||||
|
||||
// Remove bbox property pending fix of bbox parsing issue in jsts lib
|
||||
const { bbox, ...handledGeoJsonProperties } = parsedFile; // eslint-disable-line no-unused-vars
|
||||
|
||||
const reader = new jsts.io.GeoJSONReader();
|
||||
const geoJson = reader.read(parsedFile);
|
||||
const geoJson = reader.read(handledGeoJsonProperties);
|
||||
const isSingleFeature = parsedFile.type === 'Feature';
|
||||
const features = isSingleFeature
|
||||
? [{ ...geoJson }]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue