GeoKJSON (spelled: "Ge - OK - Json", aligned to Squares Kotlin OK libraries like Okio) is a Kotlin Multiplatform library. Based on Spatial K by Derek Ellis this library is designed to work with geospatial data in Kotlin including an implementation of GeoJSON and a port of Turfjs written in pure Kotlin. It supports plain Kotlin and Multiplatform (KMP) projects.
This project divided into two modules which are even released into separate artifacts.
geojson - Containing a collection of GeoJSON structured geographic data. These are designed to apply to WGS 84 and RFC 7946
turf - A port of turfjs functions for spatial analysis and operations
The goal of these libraries is to provide GeoJSON functionality for Kotlin Multiplatform projects. So encapsulation and logical operations for geographic needs can be achieved on a shared code base.
commonMain {
dependencies {
implementation("io.github.elcolto.geokjson:geojson:$geokVersion")
implementation("io.github.elcolto.geokjson:turf:$geokVersion")
}
}