getPointsWithList static method

List<Point> getPointsWithList(
  1. Geometry geom,
  2. List<Point> list
)

Extracts the {@link Point} elements from a single {@link Geometry} and adds them to the provided {@link List}.

@param geom the geometry from which to extract @param list the list to add the extracted elements to

Implementation

static List<Point> getPointsWithList(Geometry geom, List<Point> list) {
  if (geom is Point) {
    list.add(geom);
  } else if (geom is GeometryCollection) {
    geom.applyGF(PointExtracter(list));
  }
  // skip non-Polygonal elemental geometries

  return list;
}