All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.jawg.geojson.LineStringValidator.kt Maven / Gradle / Ivy

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