io.jawg.geojson.LineStringValidator.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geojson-jackson Show documentation
Show all versions of geojson-jackson Show documentation
(De)Serialization of GeoJSON with Jackson for Kotlin
package io.jawg.geojson
internal object LineStringValidator {
/**
* Validate the LineString coordinates according to the RFC https://tools.ietf.org/html/rfc7946#section-3.1.4.
* @param coordinates the [LineStringCoordinates]
* @throws [IllegalArgumentException] if coordinates are invalid
*/
fun validate(coordinates: LineStringCoordinates) {
require(coordinates.size >= 2) { "LineString coordinates must have at least 2 positions" }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy