Package-level declarations

Types

Link copied to clipboard
@Serializable(with = GeoJsonSerializer::class)
sealed interface GeoJson

A utility class to work with GeoJson (https://geojson.org/)

Link copied to clipboard
value class GeoJsonFeature(val json: JsonObject) : GeoJson
Link copied to clipboard
value class GeoJsonFeatureCollection(val json: JsonObject) : GeoJson, Iterable<GeoJsonFeature>
Link copied to clipboard
sealed interface GeoJsonGeometry : GeoJson
Link copied to clipboard
value class GeoJsonGeometryCollection(val json: JsonObject) : GeoJsonGeometry
Link copied to clipboard
value class GeoJsonLineString(val json: JsonObject) : GeoJsonGeometry
Link copied to clipboard
value class GeoJsonMultiLineString(val json: JsonObject) : GeoJsonGeometry
Link copied to clipboard
value class GeoJsonMultiPoint(val json: JsonObject) : GeoJsonGeometry
Link copied to clipboard
value class GeoJsonMultiPolygon(val json: JsonObject) : GeoJsonGeometry
Link copied to clipboard
value class GeoJsonPoint(val json: JsonObject) : GeoJsonGeometry
Link copied to clipboard
value class GeoJsonPolygon(val json: JsonObject) : GeoJsonGeometry
Link copied to clipboard
Link copied to clipboard
object GeoJsonSerializer : KSerializer<GeoJson>

Functions

Link copied to clipboard
fun GeoJson(json: JsonObject): GeoJson

Generic Json to GeoJson converter

Link copied to clipboard
fun FeatureGroup<Gmc>.geoJson(geoJson: GeoJson, id: String? = null): FeatureRef<Gmc, Feature<Gmc>>
fun FeatureGroup<Gmc>.geoJson(geoJsonUrl: URL, id: String? = null): FeatureRef<Gmc, Feature<Gmc>>

Add geojson features from url

Link copied to clipboard
fun GeoJsonFeature(geometry: GeoJsonGeometry?, properties: JsonObject? = null, builder: JsonObjectBuilder.() -> Unit = {}): GeoJsonFeature

A builder function for GeoJsonFeature

Link copied to clipboard
Link copied to clipboard
fun GeoJsonFeatureCollection(features: List<GeoJsonFeature>, properties: JsonObject? = null, builder: JsonObjectBuilder.() -> Unit = {}): GeoJsonFeatureCollection
Link copied to clipboard
fun GeoJsonGeometry(json: JsonObject): GeoJsonGeometry
Link copied to clipboard

Add a single Json geometry to a feature builder

Link copied to clipboard
fun GeoJsonGeometryCollection(geometries: List<GeoJsonGeometry>, modification: JsonObjectBuilder.() -> Unit): GeoJsonGeometryCollection
Link copied to clipboard
fun GeoJsonLineString(coordinates: List<Gmc>, modification: JsonObjectBuilder.() -> Unit = {}): GeoJsonLineString
Link copied to clipboard
fun GeoJsonMultiLineString(coordinates: List<List<Gmc>>, modification: JsonObjectBuilder.() -> Unit = {}): GeoJsonMultiLineString
Link copied to clipboard
fun GeoJsonMultiPoint(coordinates: List<Gmc>, modification: JsonObjectBuilder.() -> Unit = {}): GeoJsonMultiPoint
Link copied to clipboard
fun GeoJsonMultiPolygon(coordinates: List<List<List<Gmc>>>, modification: JsonObjectBuilder.() -> Unit): GeoJsonMultiPolygon
Link copied to clipboard
fun GeoJsonPoint(coordinates: Gmc, modification: JsonObjectBuilder.() -> Unit = {}): GeoJsonPoint
Link copied to clipboard
fun GeoJsonPolygon(coordinates: List<List<Gmc>>, modification: JsonObjectBuilder.() -> Unit): GeoJsonPolygon
Link copied to clipboard
fun GeoJsonFeature.getProperty(key: String): JsonElement?