geojson-common

common lib of geojson-common

Лицензия

Лицензия

Категории

Категории

Данные Geo Прикладные библиотеки Geospatial JSON
Группа

Группа

io.data2viz.geojson
Идентификатор

Идентификатор

geojson-common
Последняя версия

Последняя версия

0.6.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

geojson-common
common lib of geojson-common
Ссылка на сайт

Ссылка на сайт

https://github.com/data2viz/geojson-kotlin
Система контроля версий

Система контроля версий

https://github.com/data2viz/geojson-kotlin

Скачать geojson-common

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.data2viz.geojson/geojson-common/ -->
<dependency>
    <groupId>io.data2viz.geojson</groupId>
    <artifactId>geojson-common</artifactId>
    <version>0.6.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.data2viz.geojson/geojson-common/
implementation 'io.data2viz.geojson:geojson-common:0.6.0'
// https://jarcasting.com/artifacts/io.data2viz.geojson/geojson-common/
implementation ("io.data2viz.geojson:geojson-common:0.6.0")
'io.data2viz.geojson:geojson-common:jar:0.6.0'
<dependency org="io.data2viz.geojson" name="geojson-common" rev="0.6.0">
  <artifact name="geojson-common" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.data2viz.geojson', module='geojson-common', version='0.6.0')
)
libraryDependencies += "io.data2viz.geojson" % "geojson-common" % "0.6.0"
[io.data2viz.geojson/geojson-common "0.6.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.jetbrains.kotlin : kotlin-stdlib-common jar 1.2.71
org.jetbrains.kotlinx : kotlinx-coroutines-core-common jar 0.26.1

Модули Проекта

Данный проект не имеет модулей.

GeoJson Kotlin

Download Build Status GitHub License

This project goal is to provide GeoJson deserialization for kotlin multiplatform (JVM, JS).

The specific format of GeoJson files does not allow the use of kotlinx.serialization. JS and JVM implementations are completely distinct but they share the same base objects and interfaces.

JVM implementation is based on the project GeoJson-Jackson.

The project is deployed on jcenter so you have to define it in your repositories.

repositories {
    jcenter()
}

The project is deployed using Gradle metadata. You can use the dependency on Gradle Metadata. Depending on your platform (JS or JVM) the correct artifact will be imported.

    compile 'io.data2viz.geojson:core:0.6.2'

The JS version is available in both modes, Legacy and IR.

You can then use the String extension toGeoJsonObject to transform any String into a GeoJsonObject:

val featureCollection = json.toGeoJsonObject() as FeatureCollection

If you deserialize a FeatureCollection that have properties (main use case) you need to pass a function that transform the properties in a specific domain object.

class CountryProperties(val name: String, val id: Int)

val countries = countriesGeoJson.toFeatures {
        CountryProperties(stringProperty("name"), intProperty("id"))
}

You then retrieve a list of Pair<Feature, CountryPropertiess>

io.data2viz.geojson

Версии библиотеки

Версия
0.6.0
0.6.0-RC2