max-mapper / simplify-geojson

apply the ramer-douglas-peucker line simplification to geojson features or feature collections in JS or on the CLI
178 stars 17 forks source link

MultiPolygon not supported #12

Closed goors closed 5 years ago

goors commented 5 years ago

As far as I can see from this:

module.exports = function (geojson, tolerance, dontClone) {
  if (!dontClone) geojson = JSON.parse(JSON.stringify(geojson)) // clone obj
  if (geojson.features) return simplifyFeatureCollection(geojson, tolerance)
  else if (geojson.type && geojson.type === 'Feature') return simplifyFeature(geojson, tolerance)
  else return new Error('FeatureCollection or individual Feature required')
}

MultiPolygon is not supported. Can you tell me why maybe? I did npm install.

ungoldman commented 5 years ago

I think it was never implemented, and no one has asked for this feature or offered to contribute since.

If you're interested in adding this feature, you're welcome to try.

There may be a reason we didn't implement multipolygons, but it's been a few years since I've worked on this so I honestly can't say if a reason existed or not.