From 7c7a788d2e2067c4d878c3016dd69eaa235dd195 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Tue, 4 Jun 2024 11:06:50 +0300 Subject: [PATCH] change package to space.kscience --- CHANGELOG.md | 1 + build.gradle.kts | 4 ++-- demo/maps/src/jvmMain/kotlin/Main.kt | 6 +++--- .../kscience}/maps/compose/GmcRectangle.kt | 6 +++--- .../kscience}/maps/compose/LruCache.kt | 2 +- .../kscience}/maps/compose/MapCanvasState.kt | 10 +++++----- .../kscience}/maps/compose/MapTileProvider.kt | 2 +- .../kscience}/maps/compose/MapView.kt | 4 ++-- .../kscience}/maps/compose/MapViewPoint.kt | 8 ++++---- .../kscience}/maps/compose/WebMercatorSpace.kt | 18 +++++++++++++----- .../kscience}/maps/compose/mapFeatures.kt | 3 ++- .../maps/compose/OpenStreetMapTileProvider.kt | 2 +- .../maps/compose/OsmTileProviderTest.kt | 3 +-- .../kscience}/maps/coordinates/Distance.kt | 2 +- .../kscience}/maps/coordinates/GeoEllipsoid.kt | 2 +- .../maps/coordinates/GeodeticMapCoordinates.kt | 2 +- .../kscience}/maps/coordinates/GmcCurve.kt | 12 ++++++------ .../kscience}/maps/coordinates/GmcPose.kt | 2 +- .../maps/coordinates/MercatorProjection.kt | 2 +- .../maps/coordinates/WebMercatorProjection.kt | 2 +- .../kscience}/maps/coordinates/DistanceTest.kt | 6 +++--- .../kscience}/maps/coordinates/MercatorTest.kt | 6 +++--- .../kscience}/maps/compose/canvasControls.kt | 5 ++--- .../kscience}/maps/compose/clickGestures.kt | 2 +- .../kscience}/maps/features/CanvasState.kt | 2 +- .../kscience}/maps/features/CoordinateSpace.kt | 2 +- .../kscience}/maps/features/DragHandle.kt | 2 +- .../kscience}/maps/features/Feature.kt | 2 +- .../maps/features/FeatureDrawScope.kt | 2 +- .../kscience}/maps/features/FeatureGroup.kt | 2 +- .../kscience}/maps/features/MouseListener.kt | 2 +- .../kscience}/maps/features/ViewConfig.kt | 2 +- .../kscience}/maps/features/ViewPoint.kt | 2 +- .../maps/features/compositeFeatures.kt | 2 +- .../kscience}/maps/features/drawFeature.kt | 2 +- .../maps/features/mapFeatureAttributes.kt | 2 +- .../kscience}/maps/geojson/GeoJson.kt | 2 +- .../kscience}/maps/geojson/GeoJsonGeometry.kt | 6 +++--- .../maps/geojson/GeoJsonPropertiesAttribute.kt | 2 +- .../maps/geojson/GeoJsonSerializer.kt | 2 +- .../kscience}/maps/geojson/geoJsonToMap.kt | 4 ++-- .../maps/geojson/geoJsonFeatureJvm.kt | 4 ++-- .../kscience}/maps/scheme/SchemeView.kt | 2 +- .../kscience}/maps/scheme/XY.kt | 2 +- .../kscience}/maps/scheme/XYCanvasState.kt | 3 +-- .../kscience}/maps/scheme/XYCoordinateSpace.kt | 2 +- .../kscience}/maps/scheme/schemeFeatures.kt | 2 +- .../kscience}/maps/svg/SvgCanvas.kt | 2 +- .../kscience}/maps/svg/SvgDrawScope.kt | 2 +- .../kscience}/maps/svg/exportToSvg.kt | 3 +-- .../space/kscience/AttributesSerializer.kt | 6 ++---- 51 files changed, 92 insertions(+), 88 deletions(-) rename maps-kt-compose/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/compose/GmcRectangle.kt (93%) rename maps-kt-compose/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/compose/LruCache.kt (96%) rename maps-kt-compose/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/compose/MapCanvasState.kt (93%) rename maps-kt-compose/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/compose/MapTileProvider.kt (95%) rename maps-kt-compose/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/compose/MapView.kt (98%) rename maps-kt-compose/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/compose/MapViewPoint.kt (69%) rename maps-kt-compose/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/compose/WebMercatorSpace.kt (90%) rename maps-kt-compose/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/compose/mapFeatures.kt (98%) rename maps-kt-compose/src/jvmMain/kotlin/{center/sciprog => space/kscience}/maps/compose/OpenStreetMapTileProvider.kt (98%) rename maps-kt-compose/src/jvmTest/kotlin/{center/sciprog => space/kscience}/maps/compose/OsmTileProviderTest.kt (92%) rename maps-kt-core/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/coordinates/Distance.kt (90%) rename maps-kt-core/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/coordinates/GeoEllipsoid.kt (98%) rename maps-kt-core/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/coordinates/GeodeticMapCoordinates.kt (98%) rename maps-kt-core/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/coordinates/GmcCurve.kt (94%) rename maps-kt-core/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/coordinates/GmcPose.kt (92%) rename maps-kt-core/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/coordinates/MercatorProjection.kt (98%) rename maps-kt-core/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/coordinates/WebMercatorProjection.kt (98%) rename maps-kt-core/src/commonTest/kotlin/{center/sciprog => space/kscience}/maps/coordinates/DistanceTest.kt (81%) rename maps-kt-core/src/commonTest/kotlin/{center/sciprog => space/kscience}/maps/coordinates/MercatorTest.kt (83%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/compose/canvasControls.kt (98%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/compose/clickGestures.kt (99%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/features/CanvasState.kt (97%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/features/CoordinateSpace.kt (96%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/features/DragHandle.kt (98%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/features/Feature.kt (99%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/features/FeatureDrawScope.kt (99%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/features/FeatureGroup.kt (99%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/features/MouseListener.kt (95%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/features/ViewConfig.kt (91%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/features/ViewPoint.kt (80%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/features/compositeFeatures.kt (98%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/features/drawFeature.kt (99%) rename maps-kt-features/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/features/mapFeatureAttributes.kt (98%) rename maps-kt-geojson/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/geojson/GeoJson.kt (98%) rename maps-kt-geojson/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/geojson/GeoJsonGeometry.kt (98%) rename maps-kt-geojson/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/geojson/GeoJsonPropertiesAttribute.kt (71%) rename maps-kt-geojson/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/geojson/GeoJsonSerializer.kt (94%) rename maps-kt-geojson/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/geojson/geoJsonToMap.kt (96%) rename maps-kt-geojson/src/jvmMain/kotlin/{center/sciprog => space/kscience}/maps/geojson/geoJsonFeatureJvm.kt (87%) rename maps-kt-scheme/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/scheme/SchemeView.kt (98%) rename maps-kt-scheme/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/scheme/XY.kt (98%) rename maps-kt-scheme/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/scheme/XYCanvasState.kt (96%) rename maps-kt-scheme/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/scheme/XYCoordinateSpace.kt (98%) rename maps-kt-scheme/src/commonMain/kotlin/{center/sciprog => space/kscience}/maps/scheme/schemeFeatures.kt (99%) rename maps-kt-scheme/src/jvmMain/kotlin/{center/sciprog => space/kscience}/maps/svg/SvgCanvas.kt (99%) rename maps-kt-scheme/src/jvmMain/kotlin/{center/sciprog => space/kscience}/maps/svg/SvgDrawScope.kt (99%) rename maps-kt-scheme/src/jvmMain/kotlin/{center/sciprog => space/kscience}/maps/svg/exportToSvg.kt (98%) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2ba1bb..09eb308 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added ### Changed +- Package changed to `space.kscience` ### Deprecated diff --git a/build.gradle.kts b/build.gradle.kts index a624464..83c2a25 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,10 +5,10 @@ plugins { id("space.kscience.gradle.project") } -val kmathVersion: String by extra("0.4.0-RC2") +val kmathVersion: String by extra("0.4.0") allprojects { - group = "center.sciprog" + group = "space.kscience" version = "0.3.0-dev-2" repositories { diff --git a/demo/maps/src/jvmMain/kotlin/Main.kt b/demo/maps/src/jvmMain/kotlin/Main.kt index c9afb2a..df114e7 100644 --- a/demo/maps/src/jvmMain/kotlin/Main.kt +++ b/demo/maps/src/jvmMain/kotlin/Main.kt @@ -14,9 +14,6 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Window import androidx.compose.ui.window.application import center.sciprog.maps.compose.* -import center.sciprog.maps.coordinates.GeodeticMapCoordinates -import center.sciprog.maps.coordinates.Gmc -import center.sciprog.maps.coordinates.kilometers import center.sciprog.maps.features.* import center.sciprog.maps.geojson.geoJson import io.ktor.client.HttpClient @@ -32,6 +29,9 @@ import space.kscience.attributes.Attributes import space.kscience.kmath.geometry.Angle import space.kscience.kmath.geometry.degrees import space.kscience.kmath.geometry.radians +import space.kscience.maps.coordinates.GeodeticMapCoordinates +import space.kscience.maps.coordinates.Gmc +import space.kscience.maps.coordinates.kilometers import java.nio.file.Path import kotlin.math.PI import kotlin.random.Random diff --git a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/GmcRectangle.kt b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/GmcRectangle.kt similarity index 93% rename from maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/GmcRectangle.kt rename to maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/GmcRectangle.kt index a151db9..4204133 100644 --- a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/GmcRectangle.kt +++ b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/GmcRectangle.kt @@ -1,10 +1,10 @@ -package center.sciprog.maps.compose +package space.kscience.maps.compose -import center.sciprog.maps.coordinates.GeodeticMapCoordinates -import center.sciprog.maps.coordinates.Gmc import center.sciprog.maps.features.Rectangle import space.kscience.kmath.geometry.Angle import space.kscience.kmath.geometry.abs +import space.kscience.maps.coordinates.GeodeticMapCoordinates +import space.kscience.maps.coordinates.Gmc internal fun Angle.isBetween(a: Angle, b: Angle) = this in a..b || this in b..a diff --git a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/LruCache.kt b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/LruCache.kt similarity index 96% rename from maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/LruCache.kt rename to maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/LruCache.kt index d599ba5..d27fada 100644 --- a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/LruCache.kt +++ b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/LruCache.kt @@ -1,6 +1,6 @@ @file:Suppress("DEPRECATION") -package center.sciprog.maps.compose +package space.kscience.maps.compose import kotlin.jvm.Synchronized diff --git a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapCanvasState.kt b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/MapCanvasState.kt similarity index 93% rename from maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapCanvasState.kt rename to maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/MapCanvasState.kt index e5ad739..b1623b2 100644 --- a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapCanvasState.kt +++ b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/MapCanvasState.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.compose +package space.kscience.maps.compose import androidx.compose.runtime.Composable import androidx.compose.runtime.remember @@ -6,12 +6,12 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpOffset import androidx.compose.ui.unit.DpRect import androidx.compose.ui.unit.dp -import center.sciprog.maps.coordinates.Gmc -import center.sciprog.maps.coordinates.MercatorProjection -import center.sciprog.maps.coordinates.WebMercatorCoordinates -import center.sciprog.maps.coordinates.WebMercatorProjection import center.sciprog.maps.features.* import space.kscience.kmath.geometry.radians +import space.kscience.maps.coordinates.Gmc +import space.kscience.maps.coordinates.MercatorProjection +import space.kscience.maps.coordinates.WebMercatorCoordinates +import space.kscience.maps.coordinates.WebMercatorProjection import kotlin.math.* diff --git a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapTileProvider.kt b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/MapTileProvider.kt similarity index 95% rename from maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapTileProvider.kt rename to maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/MapTileProvider.kt index 3aeb0c8..1d206ba 100644 --- a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapTileProvider.kt +++ b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/MapTileProvider.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.compose +package space.kscience.maps.compose import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Deferred diff --git a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapView.kt b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/MapView.kt similarity index 98% rename from maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapView.kt rename to maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/MapView.kt index e6148b3..37697ab 100644 --- a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapView.kt +++ b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/MapView.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.compose +package space.kscience.maps.compose import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.runtime.Composable @@ -11,13 +11,13 @@ import androidx.compose.ui.graphics.toComposeImageBitmap import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.IntSize import androidx.compose.ui.unit.dp -import center.sciprog.maps.coordinates.Gmc import center.sciprog.maps.features.* import io.github.oshai.kotlinlogging.KotlinLogging import kotlinx.coroutines.CancellationException import kotlinx.coroutines.launch import kotlinx.coroutines.supervisorScope import org.jetbrains.skia.Image +import space.kscience.maps.coordinates.Gmc import kotlin.math.ceil import kotlin.math.pow diff --git a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapViewPoint.kt b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/MapViewPoint.kt similarity index 69% rename from maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapViewPoint.kt rename to maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/MapViewPoint.kt index 6a83b3b..cf250da 100644 --- a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapViewPoint.kt +++ b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/MapViewPoint.kt @@ -1,9 +1,9 @@ -package center.sciprog.maps.compose +package space.kscience.maps.compose -import center.sciprog.maps.coordinates.GeodeticMapCoordinates -import center.sciprog.maps.coordinates.Gmc -import center.sciprog.maps.coordinates.WebMercatorProjection import center.sciprog.maps.features.ViewPoint +import space.kscience.maps.coordinates.GeodeticMapCoordinates +import space.kscience.maps.coordinates.Gmc +import space.kscience.maps.coordinates.WebMercatorProjection /** * Observable position on the map. Includes observation coordinate and [zoom] factor diff --git a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/WebMercatorSpace.kt b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/WebMercatorSpace.kt similarity index 90% rename from maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/WebMercatorSpace.kt rename to maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/WebMercatorSpace.kt index 90ab1ba..5accacc 100644 --- a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/WebMercatorSpace.kt +++ b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/WebMercatorSpace.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.compose +package space.kscience.maps.compose import androidx.compose.ui.unit.DpOffset import androidx.compose.ui.unit.DpSize @@ -9,6 +9,7 @@ import center.sciprog.maps.features.Rectangle import center.sciprog.maps.features.ViewPoint import space.kscience.kmath.geometry.Angle import space.kscience.kmath.geometry.radians +import space.kscience.maps.coordinates.* import kotlin.math.abs import kotlin.math.floor import kotlin.math.pow @@ -19,7 +20,8 @@ public object WebMercatorSpace : CoordinateSpace { private fun tileScale(zoom: Float): Float = 2f.pow(zoom - floor(zoom)) - override fun Rectangle(first: Gmc, second: Gmc): Rectangle = GmcRectangle(first, second) + override fun Rectangle(first: Gmc, second: Gmc): Rectangle = + space.kscience.maps.compose.GmcRectangle(first, second) override fun Rectangle(center: Gmc, zoom: Float, size: DpSize): Rectangle { val scale = WebMercatorProjection.scaleFactor(zoom) @@ -62,7 +64,10 @@ public object WebMercatorSpace : CoordinateSpace { val maxLat = maxOf { it.top } val minLong = minOf { it.left } val maxLong = maxOf { it.right } - return GmcRectangle(Gmc.normalized(minLat, minLong), Gmc.normalized(maxLat, maxLong)) + return space.kscience.maps.compose.GmcRectangle( + Gmc.normalized(minLat, minLong), + Gmc.normalized(maxLat, maxLong) + ) } override fun Collection.wrapPoints(): Rectangle? { @@ -72,7 +77,10 @@ public object WebMercatorSpace : CoordinateSpace { val maxLat = maxOf { it.latitude } val minLong = minOf { it.longitude } val maxLong = maxOf { it.longitude } - return GmcRectangle(Gmc.normalized(minLat, minLong), Gmc.normalized(maxLat, maxLong)) + return space.kscience.maps.compose.GmcRectangle( + Gmc.normalized(minLat, minLong), + Gmc.normalized(maxLat, maxLong) + ) } override fun Gmc.offsetTo(b: Gmc, zoom: Float): DpOffset { @@ -132,5 +140,5 @@ public fun CoordinateSpace.Rectangle( center.latitude + (height / 2), center.longitude + (width / 2) ) - return GmcRectangle(a, b) + return space.kscience.maps.compose.GmcRectangle(a, b) } \ No newline at end of file diff --git a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/mapFeatures.kt b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/mapFeatures.kt similarity index 98% rename from maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/mapFeatures.kt rename to maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/mapFeatures.kt index d2141aa..88d4d8b 100644 --- a/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/mapFeatures.kt +++ b/maps-kt-compose/src/commonMain/kotlin/space/kscience/maps/compose/mapFeatures.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.compose +package space.kscience.maps.compose import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.drawscope.DrawScope @@ -10,6 +10,7 @@ import center.sciprog.maps.coordinates.* import center.sciprog.maps.features.* import org.jetbrains.skia.Font import space.kscience.kmath.geometry.Angle +import space.kscience.maps.coordinates.* import kotlin.math.ceil diff --git a/maps-kt-compose/src/jvmMain/kotlin/center/sciprog/maps/compose/OpenStreetMapTileProvider.kt b/maps-kt-compose/src/jvmMain/kotlin/space/kscience/maps/compose/OpenStreetMapTileProvider.kt similarity index 98% rename from maps-kt-compose/src/jvmMain/kotlin/center/sciprog/maps/compose/OpenStreetMapTileProvider.kt rename to maps-kt-compose/src/jvmMain/kotlin/space/kscience/maps/compose/OpenStreetMapTileProvider.kt index 322b07b..b6b2fbb 100644 --- a/maps-kt-compose/src/jvmMain/kotlin/center/sciprog/maps/compose/OpenStreetMapTileProvider.kt +++ b/maps-kt-compose/src/jvmMain/kotlin/space/kscience/maps/compose/OpenStreetMapTileProvider.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.compose +package space.kscience.maps.compose import io.github.oshai.kotlinlogging.KotlinLogging import io.ktor.client.HttpClient diff --git a/maps-kt-compose/src/jvmTest/kotlin/center/sciprog/maps/compose/OsmTileProviderTest.kt b/maps-kt-compose/src/jvmTest/kotlin/space/kscience/maps/compose/OsmTileProviderTest.kt similarity index 92% rename from maps-kt-compose/src/jvmTest/kotlin/center/sciprog/maps/compose/OsmTileProviderTest.kt rename to maps-kt-compose/src/jvmTest/kotlin/space/kscience/maps/compose/OsmTileProviderTest.kt index 1e5a367..aa1da5a 100644 --- a/maps-kt-compose/src/jvmTest/kotlin/center/sciprog/maps/compose/OsmTileProviderTest.kt +++ b/maps-kt-compose/src/jvmTest/kotlin/space/kscience/maps/compose/OsmTileProviderTest.kt @@ -1,8 +1,7 @@ -package center.sciprog.maps.compose +package space.kscience.maps.compose import io.ktor.client.HttpClient import io.ktor.client.engine.cio.CIO -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.supervisorScope import kotlinx.coroutines.test.runTest import org.junit.jupiter.api.Test diff --git a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/Distance.kt b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/Distance.kt similarity index 90% rename from maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/Distance.kt rename to maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/Distance.kt index 08d5f1b..27a274c 100644 --- a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/Distance.kt +++ b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/Distance.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.coordinates +package space.kscience.maps.coordinates import kotlinx.serialization.Serializable import kotlin.jvm.JvmInline diff --git a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GeoEllipsoid.kt b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/GeoEllipsoid.kt similarity index 98% rename from maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GeoEllipsoid.kt rename to maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/GeoEllipsoid.kt index b3706f0..375c278 100644 --- a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GeoEllipsoid.kt +++ b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/GeoEllipsoid.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.coordinates +package space.kscience.maps.coordinates import kotlinx.serialization.Serializable import space.kscience.kmath.geometry.* diff --git a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GeodeticMapCoordinates.kt b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/GeodeticMapCoordinates.kt similarity index 98% rename from maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GeodeticMapCoordinates.kt rename to maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/GeodeticMapCoordinates.kt index 0308f65..8130192 100644 --- a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GeodeticMapCoordinates.kt +++ b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/GeodeticMapCoordinates.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.coordinates +package space.kscience.maps.coordinates import kotlinx.serialization.Serializable import space.kscience.kmath.geometry.* diff --git a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GmcCurve.kt b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/GmcCurve.kt similarity index 94% rename from maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GmcCurve.kt rename to maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/GmcCurve.kt index 8456cda..cad2bfe 100644 --- a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GmcCurve.kt +++ b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/GmcCurve.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.coordinates +package space.kscience.maps.coordinates import space.kscience.kmath.geometry.* import kotlin.math.* @@ -64,8 +64,8 @@ public fun GeoEllipsoid.meridianCurve( } return GmcCurve( - forward = GmcPose(Gmc.normalized(fromLatitude, longitude), if (up) Angle.zero else Angle.pi), - backward = GmcPose(Gmc.normalized(toLatitude, longitude), if (up) Angle.pi else Angle.zero), + forward = GmcPose(GeodeticMapCoordinates.normalized(fromLatitude, longitude), if (up) Angle.zero else Angle.pi), + backward = GmcPose(GeodeticMapCoordinates.normalized(toLatitude, longitude), if (up) Angle.pi else Angle.zero), distance = s ) } @@ -77,8 +77,8 @@ public fun GeoEllipsoid.parallelCurve(latitude: Angle, fromLongitude: Angle, toL require(latitude in (-Angle.piDiv2)..(Angle.piDiv2)) { "Latitude must be in (-90, 90) degrees range" } val right = toLongitude > fromLongitude return GmcCurve( - forward = GmcPose(Gmc.normalized(latitude, fromLongitude), if (right) Angle.piDiv2 else -Angle.piDiv2), - backward = GmcPose(Gmc.normalized(latitude, toLongitude), if (right) -Angle.piDiv2 else Angle.piDiv2), + forward = GmcPose(GeodeticMapCoordinates.normalized(latitude, fromLongitude), if (right) Angle.piDiv2 else -Angle.piDiv2), + backward = GmcPose(GeodeticMapCoordinates.normalized(latitude, toLongitude), if (right) -Angle.piDiv2 else Angle.piDiv2), distance = reducedRadius(latitude) * abs((fromLongitude - toLongitude).toRadians().value) ) } @@ -193,7 +193,7 @@ public fun GeoEllipsoid.curveInDirection( val L = lambda - (1 - C) * f * sinAlpha * (sigma.value + C * sinSigma * (cosSigmaM2 + C * cosSigma * (-1 + 2 * cos2SigmaM2))) - val endPoint = Gmc.normalized(phi2, start.longitude + L.radians) + val endPoint = GeodeticMapCoordinates.normalized(phi2, start.longitude + L.radians) // eq. 12 diff --git a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GmcPose.kt b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/GmcPose.kt similarity index 92% rename from maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GmcPose.kt rename to maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/GmcPose.kt index d66e66f..4bcdd60 100644 --- a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GmcPose.kt +++ b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/GmcPose.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.coordinates +package space.kscience.maps.coordinates import kotlinx.serialization.Serializable import space.kscience.kmath.geometry.Angle diff --git a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/MercatorProjection.kt b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/MercatorProjection.kt similarity index 98% rename from maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/MercatorProjection.kt rename to maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/MercatorProjection.kt index 478ffd0..4afce1d 100644 --- a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/MercatorProjection.kt +++ b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/MercatorProjection.kt @@ -3,7 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package center.sciprog.maps.coordinates +package space.kscience.maps.coordinates import kotlinx.serialization.Serializable import space.kscience.kmath.geometry.* diff --git a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/WebMercatorProjection.kt b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/WebMercatorProjection.kt similarity index 98% rename from maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/WebMercatorProjection.kt rename to maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/WebMercatorProjection.kt index 1b7bd6d..f4ce989 100644 --- a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/WebMercatorProjection.kt +++ b/maps-kt-core/src/commonMain/kotlin/space/kscience/maps/coordinates/WebMercatorProjection.kt @@ -3,7 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package center.sciprog.maps.coordinates +package space.kscience.maps.coordinates import space.kscience.kmath.geometry.abs import kotlin.math.* diff --git a/maps-kt-core/src/commonTest/kotlin/center/sciprog/maps/coordinates/DistanceTest.kt b/maps-kt-core/src/commonTest/kotlin/space/kscience/maps/coordinates/DistanceTest.kt similarity index 81% rename from maps-kt-core/src/commonTest/kotlin/center/sciprog/maps/coordinates/DistanceTest.kt rename to maps-kt-core/src/commonTest/kotlin/space/kscience/maps/coordinates/DistanceTest.kt index 7f42a46..5cb513b 100644 --- a/maps-kt-core/src/commonTest/kotlin/center/sciprog/maps/coordinates/DistanceTest.kt +++ b/maps-kt-core/src/commonTest/kotlin/space/kscience/maps/coordinates/DistanceTest.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.coordinates +package space.kscience.maps.coordinates import space.kscience.kmath.geometry.radians import kotlin.test.Test @@ -6,8 +6,8 @@ import kotlin.test.assertEquals internal class DistanceTest { companion object { - val moscow = Gmc.ofDegrees(55.76058287719673, 37.60358622841869) - val spb = Gmc.ofDegrees(59.926686023580444, 30.36038109122013) + val moscow = GeodeticMapCoordinates.ofDegrees(55.76058287719673, 37.60358622841869) + val spb = GeodeticMapCoordinates.ofDegrees(59.926686023580444, 30.36038109122013) } @Test diff --git a/maps-kt-core/src/commonTest/kotlin/center/sciprog/maps/coordinates/MercatorTest.kt b/maps-kt-core/src/commonTest/kotlin/space/kscience/maps/coordinates/MercatorTest.kt similarity index 83% rename from maps-kt-core/src/commonTest/kotlin/center/sciprog/maps/coordinates/MercatorTest.kt rename to maps-kt-core/src/commonTest/kotlin/space/kscience/maps/coordinates/MercatorTest.kt index f58a90f..04d4e08 100644 --- a/maps-kt-core/src/commonTest/kotlin/center/sciprog/maps/coordinates/MercatorTest.kt +++ b/maps-kt-core/src/commonTest/kotlin/space/kscience/maps/coordinates/MercatorTest.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.coordinates +package space.kscience.maps.coordinates import kotlin.test.Test import kotlin.test.assertEquals @@ -6,7 +6,7 @@ import kotlin.test.assertEquals class MercatorTest { @Test fun sphereForwardBackward(){ - val moscow = Gmc.ofDegrees(55.76058287719673, 37.60358622841869) + val moscow = GeodeticMapCoordinates.ofDegrees(55.76058287719673, 37.60358622841869) val mercator = MapProjection.epsg3857.toProjection(moscow) //https://epsg.io/transform#s_srs=4326&t_srs=3857&x=37.6035862&y=55.7605829 assertEquals(4186.0120709, mercator.x.kilometers, 1e-4) @@ -18,7 +18,7 @@ class MercatorTest { @Test fun ellipseForwardBackward(){ - val moscow = Gmc.ofDegrees(55.76058287719673, 37.60358622841869) + val moscow = GeodeticMapCoordinates.ofDegrees(55.76058287719673, 37.60358622841869) val projection = MercatorProjection(ellipsoid = GeoEllipsoid.WGS84) val mercator = projection.toProjection(moscow) val backwards = projection.toGeodetic(mercator) diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/compose/canvasControls.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/compose/canvasControls.kt similarity index 98% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/compose/canvasControls.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/compose/canvasControls.kt index 747abee..22884fb 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/compose/canvasControls.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/compose/canvasControls.kt @@ -1,6 +1,5 @@ -package center.sciprog.maps.compose +package space.kscience.maps.compose -import androidx.compose.foundation.gestures.detectTapGestures import androidx.compose.foundation.gestures.drag import androidx.compose.ui.Modifier import androidx.compose.ui.geometry.Offset @@ -20,7 +19,7 @@ import kotlin.math.min public fun Modifier.canvasControls( state: CanvasState, features: FeatureGroup, -): Modifier = with(state){ +): Modifier = with(state) { // //selecting all tapabales ahead of time // val allTapable = buildMap { diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/compose/clickGestures.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/compose/clickGestures.kt similarity index 99% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/compose/clickGestures.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/compose/clickGestures.kt index 9f9ada5..43e8929 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/compose/clickGestures.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/compose/clickGestures.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.compose +package space.kscience.maps.compose import androidx.compose.foundation.gestures.GestureCancellationException import androidx.compose.foundation.gestures.PressGestureScope diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/CanvasState.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/CanvasState.kt similarity index 97% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/CanvasState.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/CanvasState.kt index 1572b3c..5e31fe9 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/CanvasState.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/CanvasState.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.features +package space.kscience.maps.features import androidx.compose.runtime.MutableState import androidx.compose.runtime.getValue diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/CoordinateSpace.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/CoordinateSpace.kt similarity index 96% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/CoordinateSpace.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/CoordinateSpace.kt index 809f81a..cec0f5b 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/CoordinateSpace.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/CoordinateSpace.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.features +package space.kscience.maps.features import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpOffset diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/DragHandle.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/DragHandle.kt similarity index 98% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/DragHandle.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/DragHandle.kt index 239909b..2f58aed 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/DragHandle.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/DragHandle.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.features +package space.kscience.maps.features import androidx.compose.ui.input.pointer.PointerEvent import androidx.compose.ui.input.pointer.isPrimaryPressed diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/Feature.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/Feature.kt similarity index 99% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/Feature.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/Feature.kt index 6fb7bda..57417d0 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/Feature.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/Feature.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.features +package space.kscience.maps.features import androidx.compose.runtime.Composable import androidx.compose.runtime.Stable diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/FeatureDrawScope.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/FeatureDrawScope.kt similarity index 99% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/FeatureDrawScope.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/FeatureDrawScope.kt index a2368fc..a8d81be 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/FeatureDrawScope.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/FeatureDrawScope.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.features +package space.kscience.maps.features import androidx.compose.foundation.Canvas import androidx.compose.runtime.Composable diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/FeatureGroup.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/FeatureGroup.kt similarity index 99% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/FeatureGroup.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/FeatureGroup.kt index 9b55c2a..d218c22 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/FeatureGroup.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/FeatureGroup.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.features +package space.kscience.maps.features import androidx.compose.runtime.* import androidx.compose.runtime.snapshots.SnapshotStateMap diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/MouseListener.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/MouseListener.kt similarity index 95% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/MouseListener.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/MouseListener.kt index dc66b02..2c077d0 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/MouseListener.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/MouseListener.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.features +package space.kscience.maps.features import androidx.compose.ui.input.pointer.PointerEvent import androidx.compose.ui.input.pointer.isPrimaryPressed diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/ViewConfig.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/ViewConfig.kt similarity index 91% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/ViewConfig.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/ViewConfig.kt index aca3d4f..db377da 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/ViewConfig.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/ViewConfig.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.features +package space.kscience.maps.features import androidx.compose.ui.unit.DpSize diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/ViewPoint.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/ViewPoint.kt similarity index 80% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/ViewPoint.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/ViewPoint.kt index bcbfbc7..5f38d80 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/ViewPoint.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/ViewPoint.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.features +package space.kscience.maps.features /** * @param T type of coordinates used for the view point diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/compositeFeatures.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/compositeFeatures.kt similarity index 98% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/compositeFeatures.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/compositeFeatures.kt index 67e7967..3ce6c06 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/compositeFeatures.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/compositeFeatures.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.features +package space.kscience.maps.features import space.kscience.attributes.Attributes import kotlin.jvm.JvmName diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/drawFeature.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/drawFeature.kt similarity index 99% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/drawFeature.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/drawFeature.kt index c6b1522..6ac6bf9 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/drawFeature.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/drawFeature.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.features +package space.kscience.maps.features import androidx.compose.ui.geometry.Offset import androidx.compose.ui.geometry.Size diff --git a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/mapFeatureAttributes.kt b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/mapFeatureAttributes.kt similarity index 98% rename from maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/mapFeatureAttributes.kt rename to maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/mapFeatureAttributes.kt index 08b9280..a69134d 100644 --- a/maps-kt-features/src/commonMain/kotlin/center/sciprog/maps/features/mapFeatureAttributes.kt +++ b/maps-kt-features/src/commonMain/kotlin/space/kscience/maps/features/mapFeatureAttributes.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.features +package space.kscience.maps.features import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.PointerMatcher diff --git a/maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/GeoJson.kt b/maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/GeoJson.kt similarity index 98% rename from maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/GeoJson.kt rename to maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/GeoJson.kt index e5f7480..ff84ed4 100644 --- a/maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/GeoJson.kt +++ b/maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/GeoJson.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.geojson +package space.kscience.maps.geojson import center.sciprog.maps.geojson.GeoJson.Companion.PROPERTIES_KEY import center.sciprog.maps.geojson.GeoJson.Companion.TYPE_KEY diff --git a/maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/GeoJsonGeometry.kt b/maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/GeoJsonGeometry.kt similarity index 98% rename from maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/GeoJsonGeometry.kt rename to maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/GeoJsonGeometry.kt index c372f40..fb20a68 100644 --- a/maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/GeoJsonGeometry.kt +++ b/maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/GeoJsonGeometry.kt @@ -1,9 +1,9 @@ -package center.sciprog.maps.geojson +package space.kscience.maps.geojson -import center.sciprog.maps.coordinates.Gmc -import center.sciprog.maps.coordinates.meters import center.sciprog.maps.geojson.GeoJsonGeometry.Companion.COORDINATES_KEY import kotlinx.serialization.json.* +import space.kscience.maps.coordinates.Gmc +import space.kscience.maps.coordinates.meters import kotlin.jvm.JvmInline public sealed interface GeoJsonGeometry : GeoJson { diff --git a/maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/GeoJsonPropertiesAttribute.kt b/maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/GeoJsonPropertiesAttribute.kt similarity index 71% rename from maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/GeoJsonPropertiesAttribute.kt rename to maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/GeoJsonPropertiesAttribute.kt index 27a08c5..8b1b0c7 100644 --- a/maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/GeoJsonPropertiesAttribute.kt +++ b/maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/GeoJsonPropertiesAttribute.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.geojson +package space.kscience.maps.geojson import kotlinx.serialization.json.JsonObject import kotlinx.serialization.serializer diff --git a/maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/GeoJsonSerializer.kt b/maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/GeoJsonSerializer.kt similarity index 94% rename from maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/GeoJsonSerializer.kt rename to maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/GeoJsonSerializer.kt index 3ba3bd9..5b71cd8 100644 --- a/maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/GeoJsonSerializer.kt +++ b/maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/GeoJsonSerializer.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.geojson +package space.kscience.maps.geojson import kotlinx.serialization.KSerializer import kotlinx.serialization.descriptors.SerialDescriptor diff --git a/maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/geoJsonToMap.kt b/maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/geoJsonToMap.kt similarity index 96% rename from maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/geoJsonToMap.kt rename to maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/geoJsonToMap.kt index 49ceed7..eaf4c07 100644 --- a/maps-kt-geojson/src/commonMain/kotlin/center/sciprog/maps/geojson/geoJsonToMap.kt +++ b/maps-kt-geojson/src/commonMain/kotlin/space/kscience/maps/geojson/geoJsonToMap.kt @@ -1,12 +1,12 @@ -package center.sciprog.maps.geojson +package space.kscience.maps.geojson import androidx.compose.ui.graphics.Color -import center.sciprog.maps.coordinates.Gmc import center.sciprog.maps.features.* import kotlinx.serialization.json.contentOrNull import kotlinx.serialization.json.intOrNull import kotlinx.serialization.json.jsonPrimitive import space.kscience.NameAttribute +import space.kscience.maps.coordinates.Gmc /** diff --git a/maps-kt-geojson/src/jvmMain/kotlin/center/sciprog/maps/geojson/geoJsonFeatureJvm.kt b/maps-kt-geojson/src/jvmMain/kotlin/space/kscience/maps/geojson/geoJsonFeatureJvm.kt similarity index 87% rename from maps-kt-geojson/src/jvmMain/kotlin/center/sciprog/maps/geojson/geoJsonFeatureJvm.kt rename to maps-kt-geojson/src/jvmMain/kotlin/space/kscience/maps/geojson/geoJsonFeatureJvm.kt index da84729..9b47568 100644 --- a/maps-kt-geojson/src/jvmMain/kotlin/center/sciprog/maps/geojson/geoJsonFeatureJvm.kt +++ b/maps-kt-geojson/src/jvmMain/kotlin/space/kscience/maps/geojson/geoJsonFeatureJvm.kt @@ -1,11 +1,11 @@ -package center.sciprog.maps.geojson +package space.kscience.maps.geojson -import center.sciprog.maps.coordinates.Gmc import center.sciprog.maps.features.Feature import center.sciprog.maps.features.FeatureGroup import center.sciprog.maps.features.FeatureRef import kotlinx.serialization.json.Json import kotlinx.serialization.json.jsonObject +import space.kscience.maps.coordinates.Gmc import java.net.URL /** diff --git a/maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/SchemeView.kt b/maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/SchemeView.kt similarity index 98% rename from maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/SchemeView.kt rename to maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/SchemeView.kt index e95fb12..de867c6 100644 --- a/maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/SchemeView.kt +++ b/maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/SchemeView.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.scheme +package space.kscience.maps.scheme import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.runtime.Composable diff --git a/maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/XY.kt b/maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/XY.kt similarity index 98% rename from maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/XY.kt rename to maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/XY.kt index 7e8446b..cfe4be4 100644 --- a/maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/XY.kt +++ b/maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/XY.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.scheme +package space.kscience.maps.scheme import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp diff --git a/maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/XYCanvasState.kt b/maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/XYCanvasState.kt similarity index 96% rename from maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/XYCanvasState.kt rename to maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/XYCanvasState.kt index 532cd05..1b01ce3 100644 --- a/maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/XYCanvasState.kt +++ b/maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/XYCanvasState.kt @@ -1,7 +1,6 @@ -package center.sciprog.maps.scheme +package space.kscience.maps.scheme import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpOffset import androidx.compose.ui.unit.DpRect diff --git a/maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/XYCoordinateSpace.kt b/maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/XYCoordinateSpace.kt similarity index 98% rename from maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/XYCoordinateSpace.kt rename to maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/XYCoordinateSpace.kt index 7aced67..b90af99 100644 --- a/maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/XYCoordinateSpace.kt +++ b/maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/XYCoordinateSpace.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.scheme +package space.kscience.maps.scheme import androidx.compose.ui.unit.DpOffset import androidx.compose.ui.unit.DpSize diff --git a/maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/schemeFeatures.kt b/maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/schemeFeatures.kt similarity index 99% rename from maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/schemeFeatures.kt rename to maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/schemeFeatures.kt index 92f4fae..ec42596 100644 --- a/maps-kt-scheme/src/commonMain/kotlin/center/sciprog/maps/scheme/schemeFeatures.kt +++ b/maps-kt-scheme/src/commonMain/kotlin/space/kscience/maps/scheme/schemeFeatures.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.scheme +package space.kscience.maps.scheme import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color diff --git a/maps-kt-scheme/src/jvmMain/kotlin/center/sciprog/maps/svg/SvgCanvas.kt b/maps-kt-scheme/src/jvmMain/kotlin/space/kscience/maps/svg/SvgCanvas.kt similarity index 99% rename from maps-kt-scheme/src/jvmMain/kotlin/center/sciprog/maps/svg/SvgCanvas.kt rename to maps-kt-scheme/src/jvmMain/kotlin/space/kscience/maps/svg/SvgCanvas.kt index 44025b9..96e1f82 100644 --- a/maps-kt-scheme/src/jvmMain/kotlin/center/sciprog/maps/svg/SvgCanvas.kt +++ b/maps-kt-scheme/src/jvmMain/kotlin/space/kscience/maps/svg/SvgCanvas.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.svg +package space.kscience.maps.svg import androidx.compose.ui.geometry.Offset import androidx.compose.ui.geometry.Rect diff --git a/maps-kt-scheme/src/jvmMain/kotlin/center/sciprog/maps/svg/SvgDrawScope.kt b/maps-kt-scheme/src/jvmMain/kotlin/space/kscience/maps/svg/SvgDrawScope.kt similarity index 99% rename from maps-kt-scheme/src/jvmMain/kotlin/center/sciprog/maps/svg/SvgDrawScope.kt rename to maps-kt-scheme/src/jvmMain/kotlin/space/kscience/maps/svg/SvgDrawScope.kt index 0bc3b71..4e37d47 100644 --- a/maps-kt-scheme/src/jvmMain/kotlin/center/sciprog/maps/svg/SvgDrawScope.kt +++ b/maps-kt-scheme/src/jvmMain/kotlin/space/kscience/maps/svg/SvgDrawScope.kt @@ -1,4 +1,4 @@ -package center.sciprog.maps.svg +package space.kscience.maps.svg import androidx.compose.ui.geometry.CornerRadius import androidx.compose.ui.geometry.Offset diff --git a/maps-kt-scheme/src/jvmMain/kotlin/center/sciprog/maps/svg/exportToSvg.kt b/maps-kt-scheme/src/jvmMain/kotlin/space/kscience/maps/svg/exportToSvg.kt similarity index 98% rename from maps-kt-scheme/src/jvmMain/kotlin/center/sciprog/maps/svg/exportToSvg.kt rename to maps-kt-scheme/src/jvmMain/kotlin/space/kscience/maps/svg/exportToSvg.kt index a5073c9..7eecde2 100644 --- a/maps-kt-scheme/src/jvmMain/kotlin/center/sciprog/maps/svg/exportToSvg.kt +++ b/maps-kt-scheme/src/jvmMain/kotlin/space/kscience/maps/svg/exportToSvg.kt @@ -1,7 +1,6 @@ -package center.sciprog.maps.svg +package space.kscience.maps.svg import androidx.compose.runtime.Composable -import androidx.compose.ui.geometry.Size import androidx.compose.ui.graphics.painter.Painter import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp diff --git a/trajectory-kt/src/commonMain/kotlin/space/kscience/AttributesSerializer.kt b/trajectory-kt/src/commonMain/kotlin/space/kscience/AttributesSerializer.kt index 9efa48e..b3f67d5 100644 --- a/trajectory-kt/src/commonMain/kotlin/space/kscience/AttributesSerializer.kt +++ b/trajectory-kt/src/commonMain/kotlin/space/kscience/AttributesSerializer.kt @@ -36,6 +36,7 @@ public class AttributesSerializer( override val content: Map, Any?> = attributeMap override fun toString(): String = "Attributes(value=${content.entries})" override fun equals(other: Any?): Boolean = other is Attributes && Attributes.equals(this, other) + override fun hashCode(): Int = content.hashCode() } } @@ -68,7 +69,4 @@ public abstract class SerializableAttribute( override fun toString(): String = serialId } -public object NameAttribute : SerializableAttribute("name", String.serializer()) - -public fun Attributes.Companion.equals(a1: Attributes, a2: Attributes): Boolean = - a1.keys == a2.keys && a1.keys.all { a1[it] == a2[it] } \ No newline at end of file +public object NameAttribute : SerializableAttribute("name", String.serializer()) \ No newline at end of file