Class FeatureCollection
java.lang.Object
com.here.platform.location.io.javadsl.geojson.FeatureCollection
- All Implemented Interfaces:
Serializable
,scala.Serializable
The FeatureCollection is the entry point to create GeoJSON representations.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFeatureCollection
(com.here.platform.location.io.scaladsl.geojson.FeatureCollection scalaFeatureCollection) -
Method Summary
Modifier and TypeMethodDescriptionaddAll
(FeatureCollection that) Appends all theFeatures
andmarkerSymbolImages
of the other collection at the end of this feature collection.<GC extends GeoCoordinateHolder>
FeatureCollectionarrow
(LineStringHolder<GC> lineString) Adds an arrow added at the end of this feature collection.<GC extends GeoCoordinateHolder>
FeatureCollectionarrow
(LineStringHolder<GC> lineString, Properties properties) Adds an arrow added at the end of this feature collection.<GC extends GeoCoordinateHolder>
FeatureCollectionarrow
(LineStringHolder<GC> lineString, Properties properties, double arrowWidthMeters) Adds an arrow added at the end of this feature collection..<GC extends GeoCoordinateHolder,
T>
FeatureCollectionarrowRanges
(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.<GC extends GeoCoordinateHolder,
T>
FeatureCollectionarrowRanges
(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.<BB extends BoundingBoxHolder>
FeatureCollectionboundingBox
(BB boundingBox) Returns a new feature collection with the given bounding box added at the end.<BB extends BoundingBoxHolder>
FeatureCollectionboundingBox
(BB boundingBox, Properties properties) Returns a new feature collection with the given bounding box and properties added at the end.<BB extends BoundingBoxHolder>
FeatureCollectionboundingBoxes
(List<BB> boundingBoxes) Returns a new feature collection with a feature consisting all the given bounding boxes and properties added at the end.<BB extends BoundingBoxHolder>
FeatureCollectionboundingBoxes
(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.<GC extends GeoCoordinateHolder>
FeatureCollectionlineString
(LineStringHolder<GC> lineString) Adds the given line string at the end of this feature collection.<GC extends GeoCoordinateHolder>
FeatureCollectionlineString
(LineStringHolder<GC> lineString, Properties properties) Adds the given line string and properties at the end of this feature collection.<GC extends GeoCoordinateHolder,
T>
FeatureCollectionlineStringPoints
(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.<GC extends GeoCoordinateHolder,
T>
FeatureCollectionlineStringRanges
(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.markerSymbolImages
(MarkerSymbolImages markerSymbolImages) Appends the markerSymbolImages to this collection.point
(GeoCoordinateHolder geoCoordinate) Adds the given point at the end of this feature collection.point
(GeoCoordinateHolder geoCoordinate, Properties properties) Adds the given point and properties at the end of this feature collection.toJson()
Returns the GeoJSON Feature Collection as a StringReturns the GeoJSON Feature Collection as a pretty Stringwrite
(OutputStream out) Writes GeoJSON to the given output stream in UTF-8.writePretty
(OutputStream out) Writes pretty printed GeoJSON to the given output stream in UTF-8.
-
Constructor Details
-
FeatureCollection
public FeatureCollection(com.here.platform.location.io.scaladsl.geojson.FeatureCollection scalaFeatureCollection) -
FeatureCollection
public FeatureCollection()
-
-
Method Details
-
addAll
Appends all theFeatures
andmarkerSymbolImages
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 arrowarrowWidthMeters
- 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
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 whichBoundingBoxOperations
are defined.properties
- Display [Properties] to use for the line-string
-
boundingBox
Returns a new feature collection with the given bounding box added at the end.- Parameters:
boundingBox
- A bounding box type for whichBoundingBoxOperations
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 whichBoundingBoxOperations
are defined.properties
- Display [Properties] to use for the line-string
-
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 whichBoundingBoxOperations
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 lineStringproperties
- 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 lineStringproperties
- a function to convert each range based attribute into the properties to apply to the corresponding range on the line-string
-
markerSymbolImages
Appends the markerSymbolImages to this collection. -
point
Adds the given point and properties at the end of this feature collection.- Parameters:
geoCoordinate
- AGeoCoordinateHolder
instance.properties
- Display [Properties] to use for the point marker
-
point
Adds the given point at the end of this feature collection.- Parameters:
geoCoordinate
- AGeoCoordinateHolder
instance.
-
toJson
Returns the GeoJSON Feature Collection as a String -
toPrettyJson
Returns the GeoJSON Feature Collection as a pretty String -
write
Writes GeoJSON to the given output stream in UTF-8. -
writePretty
Writes pretty printed GeoJSON to the given output stream in UTF-8.
-