Skip to content

Buffered result loses a polygon from a MultiPolygon #28

Description

@liebrand

The following code shows a bug, where the original feature collection contains a multipolygon with two shapes, but the resulting buffered output only has one of those polygons

var pt = {
  "type": "FeatureCollection",
  "features": [{
    "type": "Feature",
    "properties": {},
    "geometry": {
      "type": "MultiPolygon",
      "coordinates": [
        [
          [
            [-122.28068729011625, 37.533846],
            [-122.321643, 37.533846],
            [-122.34964211167777, 37.533846],
            [-122.3221531, 37.5477641],
            [-122.3004556, 37.55875],
            [-122.28068729011625, 37.533846]
          ]
        ],
        [
          [
            [-122.39372234835123, 37.533846],
            [-122.519032, 37.533846],
            [-122.519464, 37.534918],
            [-122.519755, 37.545632],
            [-122.39372234835123, 37.533846]
          ]
        ]
      ]
    }
  }]
};

var unit = 'meters';
var buffered = turf.buffer(pt, 20, unit);

//=result

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions