@trackunit/geo-json-utils 1.6.26 → 1.6.28

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/geo-json-utils",
3
- "version": "1.6.26",
3
+ "version": "1.6.28",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -5,7 +5,7 @@ interface PointCoordinate {
5
5
  }
6
6
  interface GeoJSONGeometry {
7
7
  type?: unknown;
8
- coordinates?: GeoJsonPosition | GeoJsonPosition[] | GeoJsonPosition[][] | null;
8
+ coordinates?: GeoJsonPosition | Array<GeoJsonPosition> | Array<Array<GeoJsonPosition>> | null;
9
9
  }
10
10
  interface GeoJsonFeature {
11
11
  type?: unknown;
@@ -16,7 +16,7 @@ interface GeoJsonFeature {
16
16
  * @param inconsistentCoordinates Single point, array of points or nested array of points
17
17
  * @returns {GeoJsonPosition[]} Array of standardized coordinates
18
18
  */
19
- export declare const coordinatesToStandardFormat: (inconsistentCoordinates: GeoJsonPosition | GeoJsonPosition[] | GeoJsonPosition[][] | null | undefined) => [number, number][];
19
+ export declare const coordinatesToStandardFormat: (inconsistentCoordinates: GeoJsonPosition | Array<GeoJsonPosition> | Array<Array<GeoJsonPosition>> | null | undefined) => [number, number][];
20
20
  /**
21
21
  * @description Extracts a point coordinate from a GeoJSON object.
22
22
  * @param geoObject A GeoJSON object.
@@ -29,5 +29,5 @@ export declare const getPointCoordinateFromGeoJsonObject: (geoObject: GeoJsonFea
29
29
  * @returns {PointCoordinate[]} An array of point coordinates.
30
30
  * @example getMultipleCoordinatesFromGeoJsonObject({ type: "Point", coordinates: [1, 2] }) // [{ longitude: 1, latitude: 2 }]
31
31
  */
32
- export declare const getMultipleCoordinatesFromGeoJsonObject: (geoObject: GeoJsonFeature | GeoJSONGeometry | undefined | null) => PointCoordinate[] | undefined;
32
+ export declare const getMultipleCoordinatesFromGeoJsonObject: (geoObject: GeoJsonFeature | GeoJSONGeometry | undefined | null) => Array<PointCoordinate> | undefined;
33
33
  export {};
@@ -4,11 +4,11 @@
4
4
  /**
5
5
  * Checks if a sequence of longitudes crosses the meridian by looking for large longitude differences.
6
6
  */
7
- export declare const checkCrossesMeridian: (longitudes: number[]) => boolean;
7
+ export declare const checkCrossesMeridian: (longitudes: Array<number>) => boolean;
8
8
  /**
9
9
  * Normalizes longitudes to the 0-360 range.
10
10
  */
11
- export declare const normalizeLongitudes: (longitudes: number[]) => number[];
11
+ export declare const normalizeLongitudes: (longitudes: Array<number>) => Array<number>;
12
12
  /**
13
13
  * Converts a longitude from the 0-360 range back to the -180/180 range.
14
14
  */
@@ -21,7 +21,7 @@ export declare const boundingBoxCrossesMeridian: (nwLon: number, seLon: number)
21
21
  * Gets min/max longitudes handling meridian crossing.
22
22
  * Returns longitudes in -180/180 range.
23
23
  */
24
- export declare const getMinMaxLongitudes: (longitudes: number[]) => {
24
+ export declare const getMinMaxLongitudes: (longitudes: Array<number>) => {
25
25
  minLon: number;
26
26
  maxLon: number;
27
27
  };