operator + method

FeatureCollection operator +(
  1. Feature other
)

Adds two Features together to form a FeatureCollection. Each Feature in the FeatureCollection will retain their properties and coordinates.

Example:

Point(Coordinate(1, 2)) + Point(Coordinate(3, 4)); // FeatureCollection([Point(Coordinate(1, 2)), Point(Coordinate(3, 4))])
Polygon([LinearRing([Coordinate(0, 0), Coordinate(1, 0), Coordinate(1, 1), Coordinate(0, 1), Coordinate(0, 0)])]) + MultiPoint([Coordinate(1, 1), Coordinate(2, 2)]); // FeatureCollection([Polygon([LinearRing([Coordinate(0, 0), Coordinate(1, 0), Coordinate(1, 1), Coordinate(0, 1), Coordinate(0, 0)])]), MultiPoint([Coordinate(1, 1), Coordinate(2, 2)])])

Implementation

FeatureCollection operator +(Feature other) {
  return FeatureCollection([this, other]);
}