@swissgeo/coordinates 1.0.0-rc.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +119 -0
  2. package/dist/index.cjs +7 -0
  3. package/dist/index.d.ts +1 -12
  4. package/dist/index.js +8012 -18103
  5. package/dist/ol.cjs +1 -0
  6. package/dist/ol.d.ts +11 -0
  7. package/dist/ol.js +4467 -0
  8. package/dist/registerProj4-BuUOcPpF.cjs +23 -0
  9. package/dist/registerProj4-CwR_kPOz.js +10172 -0
  10. package/eslint.config.mts +12 -0
  11. package/index.html +14 -0
  12. package/package.json +30 -23
  13. package/setup-vitest.ts +8 -0
  14. package/src/DevApp.vue +66 -0
  15. package/src/__test__/coordinatesUtils.spec.ts +178 -0
  16. package/src/__test__/extentUtils.spec.ts +92 -0
  17. package/src/coordinatesUtils.ts +188 -0
  18. package/src/dev.ts +6 -0
  19. package/src/extentUtils.ts +196 -0
  20. package/src/index.ts +29 -0
  21. package/src/ol.ts +53 -0
  22. package/src/proj/CoordinateSystem.ts +315 -0
  23. package/src/proj/CoordinateSystemBounds.ts +170 -0
  24. package/src/proj/CustomCoordinateSystem.ts +58 -0
  25. package/src/proj/LV03CoordinateSystem.ts +23 -0
  26. package/src/proj/LV95CoordinateSystem.ts +35 -0
  27. package/src/proj/StandardCoordinateSystem.ts +22 -0
  28. package/src/proj/SwissCoordinateSystem.ts +233 -0
  29. package/src/proj/WGS84CoordinateSystem.ts +97 -0
  30. package/src/proj/WebMercatorCoordinateSystem.ts +89 -0
  31. package/src/proj/__test__/CoordinateSystem.spec.ts +63 -0
  32. package/src/proj/__test__/CoordinateSystemBounds.spec.ts +252 -0
  33. package/src/proj/__test__/SwissCoordinateSystem.spec.ts +136 -0
  34. package/src/proj/index.ts +65 -0
  35. package/src/proj/types.ts +22 -0
  36. package/src/registerProj4.ts +38 -0
  37. package/tsconfig.json +4 -0
  38. package/vite.config.ts +46 -0
  39. package/dist/index.umd.cjs +0 -29
package/dist/index.d.ts CHANGED
@@ -35,17 +35,6 @@ export declare interface CoordinatesChunk {
35
35
  isWithinBounds: boolean;
36
36
  }
37
37
 
38
- /**
39
- * Group of coordinates resulting in a "split by bounds" function. Will also contain information if
40
- * this chunk is within or outside the bounds from which it was cut from.
41
- */
42
- declare interface CoordinatesChunk_2 {
43
- /** Coordinates of this chunk */
44
- coordinates: SingleCoordinate[];
45
- /** Will be true if this chunk contains coordinates that are located within bounds */
46
- isWithinBounds: boolean;
47
- }
48
-
49
38
  export declare const coordinatesUtils: SwissGeoCoordinatesUtils;
50
39
 
51
40
  /**
@@ -239,7 +228,7 @@ export declare class CoordinateSystemBounds {
239
228
  * same coordinate system (projection) as the bounds
240
229
  * @returns {CoordinatesChunk[] | undefined}
241
230
  */
242
- splitIfOutOfBounds(coordinates: SingleCoordinate[]): CoordinatesChunk_2[] | undefined;
231
+ splitIfOutOfBounds(coordinates: SingleCoordinate[]): CoordinatesChunk[] | undefined;
243
232
  }
244
233
 
245
234
  declare interface CoordinateSystemBoundsProps {