code: public void addGeometry(Geometry geometry) {
      if (geometry instanceof LineString) {
        addLineString(originalSegments, (LineString) geometry);
      } else if (geometry instanceof Polygon) {
        addPolygon(originalSegments, (Polygon) geometry);
      } else if (geometry instanceof GeometryCollection) {
        addGeometry(originalSegments, (GeometryCollection) geometry);
      }
    }
docs: Explode geometry and add occlusion segments in isovist
  
  @param geometry Geometry collection, LineString or Polygon instance