commonMain.org.jetbrains.letsPlot.gis.geoprotocol.GeoResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gis Show documentation
Show all versions of gis Show documentation
A part of the Lets-Plot library.
/*
* Copyright (c) 2019. JetBrains s.r.o.
* Use of this source code is governed by the MIT license that can be found in the LICENSE file.
*/
package org.jetbrains.letsPlot.gis.geoprotocol
import org.jetbrains.letsPlot.commons.intern.spatial.GeoRectangle
import org.jetbrains.letsPlot.commons.intern.typedGeometry.Untyped
import org.jetbrains.letsPlot.commons.intern.typedGeometry.Vec
interface GeoResponse {
data class SuccessGeoResponse internal constructor(
val answers: List,
val featureLevel: FeatureLevel?
) : GeoResponse {
data class GeoParent(val id: String, val name: String, val level: FeatureLevel)
data class GeocodingAnswer(val geocodedFeatures: List)
data class GeocodedFeature internal constructor(
val id: String,
val name: String,
val centroid: Vec?,
val position: GeoRectangle?,
val limit: GeoRectangle?,
val boundary: Boundary?,
val highlights: List?,
val fragments: List?,
val parents: List?
)
}
data class ErrorGeoResponse(val message: String) : GeoResponse
data class AmbiguousGeoResponse internal constructor(
val features: List,
val featureLevel: FeatureLevel?
) : GeoResponse {
data class AmbiguousFeature internal constructor(
val request: String,
val namesakeCount: Int,
val namesakes: List
)
data class Namesake internal constructor(val name: String, val parents: List)
data class NamesakeParent(val name: String, val level: FeatureLevel)
}
}