Packages

class JsonFeatureCollection extends AnyRef

Accumulates GeoJson from Feature class instances.

During serialization: Each individual feature is parametrized on a class we need to accumulate geoJson per instance of an object in order to use implicit scope resolution in finding the correct format.

Features may be added using the .add, addAll methods, they are buffered as JsValues until .toJson is called

During deserialization: This object is instantiated with list of JsValues representing features. It may be queried using .getAll[F <: Feature[_] ] method.

It aggregates feature objects with data member still encoded in json

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsonFeatureCollection
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JsonFeatureCollection(features: List[Json] = Nil)

Value Members

  1. def ++=[G <: Geometry, D](features: Seq[Feature[G, D]])(implicit arg0: Encoder[D]): Unit

    Add a Seq of JsValue to the buffer, pending an ultimate call of toJson.

  2. def +=[G <: Geometry, D](feature: Feature[G, D])(implicit arg0: Encoder[D]): ListBuffer[Json]

    Add a JsValue to the buffer, pending an ultimate call of toJson.

  3. def add[G <: Geometry, D](feature: Feature[G, D])(implicit arg0: Encoder[D]): ListBuffer[Json]

    Add a JsValue to the buffer, pending an ultimate call of toJson.

  4. def addAll[G <: Geometry, D](features: Seq[Feature[G, D]])(implicit arg0: Encoder[D]): Unit

    Add a Seq of JsValue to the buffer, pending an ultimate call of toJson.

  5. def asJson: Json

    Carry out serialization on all buffered JsValue objects.

  6. def getAll[F](implicit arg0: Decoder[F]): Vector[F]

    This method locates the correct JsonFormat for F through implicit scope and attempts to use it to parse each contained JsValue.

    This method locates the correct JsonFormat for F through implicit scope and attempts to use it to parse each contained JsValue.

    F

    type of Feature to return

    returns

    Vector of Feature objects (type F) that were successfully parsed

  7. def getAllFeatures[F <: Feature[_, _]](implicit arg0: Decoder[F]): Vector[F]
  8. def getAllGeometries(): Vector[Geometry]
  9. def getAllLineStringFeatures[D]()(implicit arg0: Decoder[D]): Vector[LineStringFeature[D]]
  10. def getAllLineStrings(): Vector[LineString]
  11. def getAllMultiLineStringFeatures[D]()(implicit arg0: Decoder[D]): Vector[MultiLineStringFeature[D]]
  12. def getAllMultiLineStrings(): Vector[MultiLineString]
  13. def getAllMultiPointFeatures[D]()(implicit arg0: Decoder[D]): Vector[MultiPointFeature[D]]
  14. def getAllMultiPoints(): Vector[MultiPoint]
  15. def getAllMultiPolygonFeatures[D]()(implicit arg0: Decoder[D]): Vector[MultiPolygonFeature[D]]
  16. def getAllMultiPolygons(): Vector[MultiPolygon]
  17. def getAllPointFeatures[D]()(implicit arg0: Decoder[D]): Vector[PointFeature[D]]
  18. def getAllPoints(): Vector[Point]
  19. def getAllPolygonFeatures[D]()(implicit arg0: Decoder[D]): Vector[PolygonFeature[D]]
  20. def getAllPolygons(): Vector[Polygon]