Class FeatureCollection

java.lang.Object
com.here.platform.location.io.javadsl.geojson.FeatureCollection
All Implemented Interfaces:
Serializable, scala.Serializable

public class FeatureCollection extends Object implements scala.Serializable
The FeatureCollection is the entry point to create GeoJSON representations.
See Also:
  • Constructor Details

    • FeatureCollection

      public FeatureCollection(com.here.platform.location.io.scaladsl.geojson.FeatureCollection scalaFeatureCollection)
    • FeatureCollection

      public FeatureCollection()
  • Method Details

    • addAll

      public FeatureCollection addAll(FeatureCollection that)
      Appends all the Features and markerSymbolImages of the other collection at the end of this feature collection.
    • arrow

      public <GC extends GeoCoordinateHolder> FeatureCollection arrow(LineStringHolder<GC> lineString, Properties properties, double arrowWidthMeters)
      Adds an arrow added at the end of this feature collection.. The arrow is added along the given line string, close to the middle point, in the direction of the provided linestring.

      Parameters:
      lineString - the line to use as a base (e.g the geometry of a vertex)
      properties - the properties to use for the arrow
      arrowWidthMeters - the width of the resulting arrow
    • arrow

      public <GC extends GeoCoordinateHolder> FeatureCollection arrow(LineStringHolder<GC> lineString, Properties properties)
      Adds an arrow added at the end of this feature collection. The arrow is added along the given line string, close to the middle point, in the direction of the provided linestring.

      Parameters:
      lineString - the line to use as a base (e.g the geometry of a vertex)
      properties - the properties to use for the arrow
    • arrow

      public <GC extends GeoCoordinateHolder> FeatureCollection arrow(LineStringHolder<GC> lineString)
      Adds an arrow added at the end of this feature collection. The arrow is added along the given line string, close to the middle point, in the direction of the provided linestring.

      Parameters:
      lineString - the line to use as a base (e.g the geometry of a vertex)
    • arrowRanges

      public <GC extends GeoCoordinateHolder, T> FeatureCollection arrowRanges(LineStringHolder<GC> lineString, List<RangeBasedProperty<T>> ranges, double arrowSizeMeters, Function<RangeBasedProperty<T>,Properties> properties)
      Adds an arrows along the given line string ranges at the end of this feature collection.

      Parameters:
      lineString - the line to use as a base (e.g the geometry of a vertex)
      ranges - the range based property for which to draw an arrow on the lineString (the arrow will be drawn in the middle of the range)
      properties - a function to convert each range based attribute into the properties to apply to the corresponding range on the line-string
    • arrowRanges

      public <GC extends GeoCoordinateHolder, T> FeatureCollection arrowRanges(LineStringHolder<GC> lineString, List<RangeBasedProperty<T>> ranges, Function<RangeBasedProperty<T>,Properties> properties)
      Adds am arrows along the given line string ranges at the end of this feature collection.

      Parameters:
      lineString - the line to use as a base (e.g the geometry of a vertex)
      ranges - the range based property for which to draw an arrow on the lineString (the arrow will be drawn in the middle of the range)
      properties - a function to convert each range based attribute into the properties to apply to the corresponding range on the line-string
    • boundingBox

      public <BB extends BoundingBoxHolder> FeatureCollection boundingBox(BB boundingBox, Properties properties)
      Returns a new feature collection with the given bounding box and properties added at the end.

      Parameters:
      boundingBox - A bounding box type for which BoundingBoxOperations are defined.
      properties - Display [Properties] to use for the line-string
    • boundingBox

      public <BB extends BoundingBoxHolder> FeatureCollection boundingBox(BB boundingBox)
      Returns a new feature collection with the given bounding box added at the end.

      Parameters:
      boundingBox - A bounding box type for which BoundingBoxOperations are defined.
    • boundingBoxes

      public <BB extends BoundingBoxHolder> FeatureCollection boundingBoxes(List<BB> boundingBoxes, Properties properties)
      Returns a new feature collection with a feature consisting all the given bounding boxes and properties added at the end.

      Parameters:
      boundingBoxes - sequence of bounding boxes of type for which BoundingBoxOperations are defined.
      properties - Display [Properties] to use for the line-string
    • boundingBoxes

      public <BB extends BoundingBoxHolder> FeatureCollection boundingBoxes(List<BB> boundingBoxes)
      Returns a new feature collection with a feature consisting all the given bounding boxes and properties added at the end.

      Parameters:
      boundingBoxes - sequence of bounding boxes of type for which BoundingBoxOperations are defined.
    • lineString

      public <GC extends GeoCoordinateHolder> FeatureCollection lineString(LineStringHolder<GC> lineString, Properties properties)
      Adds the given line string and properties at the end of this feature collection.

      Parameters:
      lineString - A line-string instance.
      properties - Display [Properties] to use for the line-string
    • lineString

      public <GC extends GeoCoordinateHolder> FeatureCollection lineString(LineStringHolder<GC> lineString)
      Adds the given line string at the end of this feature collection.

      Parameters:
      lineString - A line-string instance.
    • lineStringPoints

      public <GC extends GeoCoordinateHolder, T> FeatureCollection lineStringPoints(LineStringHolder<GC> lineString, List<PointBasedProperty<T>> points, Function<PointBasedProperty<T>,Properties> properties)
      Adds the given points a line string and properties at the end of this feature collection.

      Parameters:
      lineString - the line to use as a base (e.g the geometry of a vertex)
      points - the point based property to draw on the lineString
      properties - a function to convert each point based attribute into the properties to apply to the corresponding marker on the line-string
    • lineStringRanges

      public <GC extends GeoCoordinateHolder, T> FeatureCollection lineStringRanges(LineStringHolder<GC> lineString, List<RangeBasedProperty<T>> ranges, Function<RangeBasedProperty<T>,Properties> properties)
      Adds the given ranges on the line string at the end of this feature collection.

      Parameters:
      lineString - the line to use as a base (e.g the geometry of a vertex)
      ranges - the range based property to draw on the lineString
      properties - a function to convert each range based attribute into the properties to apply to the corresponding range on the line-string
    • markerSymbolImages

      public FeatureCollection markerSymbolImages(MarkerSymbolImages markerSymbolImages)
      Appends the markerSymbolImages to this collection.
    • point

      public FeatureCollection point(GeoCoordinateHolder geoCoordinate, Properties properties)
      Adds the given point and properties at the end of this feature collection.

      Parameters:
      geoCoordinate - A GeoCoordinateHolder instance.
      properties - Display [Properties] to use for the point marker
    • point

      public FeatureCollection point(GeoCoordinateHolder geoCoordinate)
      Adds the given point at the end of this feature collection.

      Parameters:
      geoCoordinate - A GeoCoordinateHolder instance.
    • toJson

      public String toJson()
      Returns the GeoJSON Feature Collection as a String
    • toPrettyJson

      public String toPrettyJson()
      Returns the GeoJSON Feature Collection as a pretty String
    • write

      public FeatureCollection write(OutputStream out)
      Writes GeoJSON to the given output stream in UTF-8.
    • writePretty

      public FeatureCollection writePretty(OutputStream out)
      Writes pretty printed GeoJSON to the given output stream in UTF-8.