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

io.data2viz.geo.projection.IdentityProjection.kt Maven / Gradle / Ivy

There is a newer version: 0.8.0-RC5
Show newest version
package io.data2viz.geo.projection

import io.data2viz.math.PI

fun identityProjection() = projection(IdentityProjection()) {
    preClip = { it }
    postClip = { it }
    scale = 180 / PI
}

class IdentityProjection : ProjectableInvertable {
    override fun project(lambda: Double, phi: Double) = doubleArrayOf(lambda, phi)
    override fun invert(x: Double, y: Double) = doubleArrayOf(x, y)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy