Packages

class JsonFeatureCollectionMap extends AnyRef

Accumulates GeoJson from Feature class instances and implements a Map keyed on geojson feature IDs.

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. JsonFeatureCollectionMap
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

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

Value Members

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

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

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

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

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

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

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

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

  5. def asJson: Json
  6. def getAll[F](implicit arg0: Decoder[F]): Map[String, 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 or Feature objects that were successfully parsed

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