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

commonMain.org.jetbrains.letsPlot.gis.geoprotocol.GeoResponse.kt Maven / Gradle / Ivy

There is a newer version: 4.4.1
Show newest version
/*
 * 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)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy