Fix initialization problem for Mercator on native

This commit is contained in:
Alexander Nozik 2022-06-26 11:39:54 +03:00
parent 3910b22504
commit 2a3817084d
No known key found for this signature in database
GPG Key ID: F7FCF2DD25C71357
2 changed files with 4 additions and 4 deletions

View File

@ -73,4 +73,4 @@ ksciencePublish {
sonatype()
}
apiValidation.nonPublicMarkers.add("space.kscience.kmath.misc.UnstableKMathAPI")
apiValidation.nonPublicMarkers.add("space.kscience.kmath.misc.UnstableKMathAPI")

View File

@ -58,7 +58,7 @@ public data class MercatorCoordinates(val x: Double, val y: Double)
*/
public open class MercatorAlgebra(
public val baseLongitude: Double = 0.0,
private val radius: Double = DEFAULT_EARTH_RADIUS,
protected val radius: Double = DEFAULT_EARTH_RADIUS,
private val correctedRadius: ((GeodeticCoordinates) -> Double)? = null,
) : Algebra<TileWebMercatorCoordinates> {
@ -90,8 +90,8 @@ public open class MercatorAlgebra(
)
}
public companion object : MercatorAlgebra() {
public companion object : MercatorAlgebra(0.0, 6378137.0) {
public const val MAXIMUM_LATITUDE: Double = 85.05113
public const val DEFAULT_EARTH_RADIUS: Double = 6378137.0
public val DEFAULT_EARTH_RADIUS: Double = radius
}
}