openskidata-format 5.5.0 → 7.0.0
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/dist/Lift.d.ts +7 -2
- package/dist/Lift.js.map +1 -1
- package/dist/{Location.d.ts → Place.d.ts} +1 -1
- package/dist/{Location.js → Place.js} +1 -1
- package/dist/Place.js.map +1 -0
- package/dist/Run.d.ts +5 -2
- package/dist/Run.js.map +1 -1
- package/dist/SkiArea.d.ts +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/ElevationProfile.test.ts +9 -4
- package/src/Lift.ts +7 -2
- package/src/{Location.ts → Place.ts} +1 -1
- package/src/Run.ts +5 -2
- package/src/SkiArea.ts +6 -6
- package/src/SlopeGradingScale.test.ts +10 -5
- package/src/index.ts +1 -1
- package/dist/Location.js.map +0 -1
package/dist/Lift.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ElevationData } from './ElevationProfile';
|
|
2
2
|
import { FeatureType } from './FeatureType';
|
|
3
|
+
import { Place } from './Place';
|
|
3
4
|
import { SkiAreaSummaryFeature } from './SkiArea';
|
|
4
5
|
import { Source } from './Source';
|
|
5
6
|
import { Status } from './Status';
|
|
@@ -23,6 +24,7 @@ export type LiftGeometry = GeoJSON.LineString | GeoJSON.MultiLineString;
|
|
|
23
24
|
* @property {Status} status - Operational status of the lift. Derived from OpenStreetMap lifecycle tags.
|
|
24
25
|
* @property {string | null} name - Name of the lift. Derived from the OpenStreetMap name tag.
|
|
25
26
|
* @property {string | null} ref - Reference code/number for the lift. Derived from the OpenStreetMap ref tag.
|
|
27
|
+
* @property {string | null} refFRCAIRN - French CAIRN reference identifier. Derived from the OpenStreetMap ref:FR:CAIRN tag.
|
|
26
28
|
* @property {string | null} description - Description of the lift. Derived from the OpenStreetMap description tag.
|
|
27
29
|
* @property {boolean | null} oneway - Whether the lift allows riding only in one direction. Derived from the OpenStreetMap oneway tag.
|
|
28
30
|
* @property {number | null} occupancy - Number of people each carrier can transport. Derived from the OpenStreetMap aerialway:occupancy tag.
|
|
@@ -34,7 +36,8 @@ export type LiftGeometry = GeoJSON.LineString | GeoJSON.MultiLineString;
|
|
|
34
36
|
* @property {SkiAreaSummaryFeature[]} skiAreas - Ski areas this lift is a part of.
|
|
35
37
|
* @property {Source[]} sources - Data sources for the feature.
|
|
36
38
|
* @property {string[]} websites - Websites associated with this lift. Derived from the OpenStreetMap website tag.
|
|
37
|
-
* @property {string | null}
|
|
39
|
+
* @property {string | null} wikidataID - Wikidata identifier. Derived from the OpenStreetMap wikidata tag.
|
|
40
|
+
* @property {Place[]} places - Geographic places this lift is within (e.g., city, region, country). Derived from reverse geocoding.
|
|
38
41
|
*/
|
|
39
42
|
export type LiftProperties = {
|
|
40
43
|
type: FeatureType.Lift;
|
|
@@ -43,6 +46,7 @@ export type LiftProperties = {
|
|
|
43
46
|
status: Status;
|
|
44
47
|
name: string | null;
|
|
45
48
|
ref: string | null;
|
|
49
|
+
refFRCAIRN: string | null;
|
|
46
50
|
description: string | null;
|
|
47
51
|
oneway: boolean | null;
|
|
48
52
|
occupancy: number | null;
|
|
@@ -54,7 +58,8 @@ export type LiftProperties = {
|
|
|
54
58
|
skiAreas: SkiAreaSummaryFeature[];
|
|
55
59
|
sources: Source[];
|
|
56
60
|
websites: string[];
|
|
57
|
-
|
|
61
|
+
wikidataID: string | null;
|
|
62
|
+
places: Place[];
|
|
58
63
|
};
|
|
59
64
|
export declare enum LiftType {
|
|
60
65
|
CableCar = "cable_car",
|
package/dist/Lift.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Lift.js","sourceRoot":"","sources":["../src/Lift.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Lift.js","sourceRoot":"","sources":["../src/Lift.ts"],"names":[],"mappings":";;;AAwFA,oDAwBC;AAED,oDA6BC;AAED,oCAgBC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
|
|
1
1
|
import * as GeoJSON from 'geojson';
|
|
2
2
|
import { ElevationData, ElevationProfile } from './ElevationProfile';
|
|
3
3
|
import { FeatureType } from './FeatureType';
|
|
4
|
+
import { Place } from './Place';
|
|
4
5
|
import { RunDifficultyConvention } from './RunDifficultyConvention';
|
|
5
6
|
import { SkiAreaSummaryFeature } from './SkiArea';
|
|
6
7
|
import { SnowCoverHistory } from './SnowCoverHistory';
|
|
@@ -46,7 +47,8 @@ export type RunFeature = GeoJSON.Feature<RunGeometry, RunProperties>;
|
|
|
46
47
|
* @property {ElevationProfile | null} elevationProfile - Elevation profile of the run, only available for runs with LineString geometry.
|
|
47
48
|
* @property {Source[]} sources - Data sources for this run's information
|
|
48
49
|
* @property {string[]} websites - Websites associated with this run, derived from the OpenStreetMap website tag
|
|
49
|
-
* @property {string | null}
|
|
50
|
+
* @property {string | null} wikidataID - Wikidata identifier, if available, derived from the OpenStreetMap wikidata tag
|
|
51
|
+
* @property {Place[]} places - Geographic places this run is within (e.g., city, region, country). Derived from reverse geocoding.
|
|
50
52
|
* @property {SnowCoverHistory} [snowCoverHistory] - Historical snow cover data for this run, if available
|
|
51
53
|
*/
|
|
52
54
|
export type RunProperties = {
|
|
@@ -68,7 +70,8 @@ export type RunProperties = {
|
|
|
68
70
|
elevationProfile: ElevationProfile | null;
|
|
69
71
|
sources: Source[];
|
|
70
72
|
websites: string[];
|
|
71
|
-
|
|
73
|
+
wikidataID: string | null;
|
|
74
|
+
places: Place[];
|
|
72
75
|
snowCoverHistory?: SnowCoverHistory;
|
|
73
76
|
};
|
|
74
77
|
export declare enum RunUse {
|
package/dist/Run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Run.js","sourceRoot":"","sources":["../src/Run.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Run.js","sourceRoot":"","sources":["../src/Run.ts"],"names":[],"mappings":";;;AA0IA,kDAUC;AAED,kCAKC;AAED,kDAiBC;AAED,0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,aAAa,CAAC,MAAM;oBACvB,OAAO,YAAY,CAAC,KAAK,CAAA;gBAC3B,KAAK,aAAa,CAAC,QAAQ,CAAC;gBAC5B,KAAK,aAAa,CAAC,OAAO;oBACxB,OAAO,YAAY,CAAC,MAAM,CAAA;gBAC5B;oBACE,OAAO,YAAY,CAAC,IAAI,CAAA;YAC5B,CAAC;QACH;YACE,OAAO,IAAA,iDAAuB,EAAC,UAAU,CAAC,CAAA;IAC9C,CAAC;AACH,CAAC"}
|
package/dist/SkiArea.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FeatureType } from './FeatureType';
|
|
2
2
|
import { LiftType } from './Lift';
|
|
3
|
-
import {
|
|
3
|
+
import { Place } from './Place';
|
|
4
4
|
import { RunDifficulty } from './Run';
|
|
5
5
|
import { RunDifficultyConvention } from './RunDifficultyConvention';
|
|
6
6
|
import { SnowCoverHistory } from './SnowCoverHistory';
|
|
@@ -30,7 +30,7 @@ export type SkiAreaFeature = GeoJSON.Feature<SkiAreaGeometry, SkiAreaProperties>
|
|
|
30
30
|
export type SkiAreaGeometry = GeoJSON.Point | GeoJSON.Polygon | GeoJSON.MultiPolygon;
|
|
31
31
|
export type SkiAreaSummaryFeature = GeoJSON.Feature<SkiAreaGeometry, SkiAreaSummaryProperties>;
|
|
32
32
|
/**
|
|
33
|
-
* @property {string} id - Unique identifier for the ski area. The ID is just a hash of the feature, so will change if the feature changes in any way. If a stable identifier is needed, use the
|
|
33
|
+
* @property {string} id - Unique identifier for the ski area. The ID is just a hash of the feature, so will change if the feature changes in any way. If a stable identifier is needed, use the wikidataID property, or a source id.
|
|
34
34
|
* @property {string | null} name - Name of the ski area.
|
|
35
35
|
* @property {Source[]} sources - Data sources.
|
|
36
36
|
* @property {SkiAreaActivity[]} activities - Activities available at this ski area, derived from presence of ski runs and Skimap.org data.
|
|
@@ -38,15 +38,16 @@ export type SkiAreaSummaryFeature = GeoJSON.Feature<SkiAreaGeometry, SkiAreaSumm
|
|
|
38
38
|
* @property {Status | null} status - Operational status. Derived from OpenStreetMap lifecycle tags and Skimap.org data.
|
|
39
39
|
* @property {RunColorConvention} runConvention - Color convention used for runs at this ski area.
|
|
40
40
|
* @property {string[]} websites - Official website(s) of the ski area. Derived from the OpenStreetMap website tag and Skimap.org data.
|
|
41
|
-
* @property {string | null}
|
|
42
|
-
* @property {
|
|
41
|
+
* @property {string | null} wikidataID - Wikidata identifier. Derived from the OpenStreetMap wikidata tag.
|
|
42
|
+
* @property {Place[]} places - Geographic places this ski area is within (e.g., city, region, country). Derived from reverse geocoding.
|
|
43
43
|
*/
|
|
44
44
|
export type SkiAreaProperties = SkiAreaSummaryProperties & {
|
|
45
45
|
sources: Source[];
|
|
46
46
|
statistics?: SkiAreaStatistics;
|
|
47
47
|
runConvention: RunDifficultyConvention;
|
|
48
48
|
websites: string[];
|
|
49
|
-
|
|
49
|
+
wikidataID: string | null;
|
|
50
|
+
places: Place[];
|
|
50
51
|
};
|
|
51
52
|
export type SkiAreaSummaryProperties = {
|
|
52
53
|
type: FeatureType.SkiArea;
|
|
@@ -54,7 +55,6 @@ export type SkiAreaSummaryProperties = {
|
|
|
54
55
|
name: string | null;
|
|
55
56
|
activities: SkiAreaActivity[];
|
|
56
57
|
status: Status | null;
|
|
57
|
-
location: Location | null;
|
|
58
58
|
};
|
|
59
59
|
export declare enum SkiAreaActivity {
|
|
60
60
|
Downhill = "downhill",
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export * from './ElevationProfile';
|
|
|
2
2
|
export * from './FeatureType';
|
|
3
3
|
export * from './Lift';
|
|
4
4
|
export * from './LiftNameFormatter';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './Place';
|
|
6
6
|
export * from './Run';
|
|
7
7
|
export * from './RunDifficultyConvention';
|
|
8
8
|
export * from './SlopeGradingScale';
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ tslib_1.__exportStar(require("./ElevationProfile"), exports);
|
|
|
5
5
|
tslib_1.__exportStar(require("./FeatureType"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./Lift"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./LiftNameFormatter"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./
|
|
8
|
+
tslib_1.__exportStar(require("./Place"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./Run"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./RunDifficultyConvention"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("./SlopeGradingScale"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6DAAkC;AAClC,wDAA6B;AAC7B,iDAAsB;AACtB,8DAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6DAAkC;AAClC,wDAA6B;AAC7B,iDAAsB;AACtB,8DAAmC;AACnC,kDAAuB;AACvB,gDAAqB;AACrB,oEAAyC;AACzC,8DAAmC;AACnC,oDAAyB;AACzB,6DAAkC;AAClC,mDAAwB;AACxB,mDAAwB"}
|
package/package.json
CHANGED
|
@@ -176,7 +176,8 @@ describe('ElevationProfile', () => {
|
|
|
176
176
|
patrolled: null,
|
|
177
177
|
grooming: null,
|
|
178
178
|
websites: [],
|
|
179
|
-
|
|
179
|
+
wikidataID: null,
|
|
180
|
+
places: [],
|
|
180
181
|
},
|
|
181
182
|
}
|
|
182
183
|
|
|
@@ -212,7 +213,8 @@ describe('ElevationProfile', () => {
|
|
|
212
213
|
patrolled: null,
|
|
213
214
|
grooming: null,
|
|
214
215
|
websites: [],
|
|
215
|
-
|
|
216
|
+
wikidataID: null,
|
|
217
|
+
places: [],
|
|
216
218
|
},
|
|
217
219
|
}
|
|
218
220
|
|
|
@@ -237,6 +239,7 @@ describe('ElevationProfile', () => {
|
|
|
237
239
|
skiAreas: [],
|
|
238
240
|
sources: [],
|
|
239
241
|
ref: null,
|
|
242
|
+
refFRCAIRN: null,
|
|
240
243
|
description: null,
|
|
241
244
|
oneway: null,
|
|
242
245
|
occupancy: null,
|
|
@@ -246,7 +249,8 @@ describe('ElevationProfile', () => {
|
|
|
246
249
|
bubble: null,
|
|
247
250
|
heating: null,
|
|
248
251
|
websites: [],
|
|
249
|
-
|
|
252
|
+
wikidataID: null,
|
|
253
|
+
places: [],
|
|
250
254
|
},
|
|
251
255
|
}
|
|
252
256
|
|
|
@@ -288,7 +292,8 @@ describe('ElevationProfile', () => {
|
|
|
288
292
|
},
|
|
289
293
|
sources: [],
|
|
290
294
|
websites: [],
|
|
291
|
-
|
|
295
|
+
wikidataID: null,
|
|
296
|
+
places: [],
|
|
292
297
|
},
|
|
293
298
|
geometry: {
|
|
294
299
|
type: 'LineString',
|
package/src/Lift.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ElevationData, getElevationData } from './ElevationProfile'
|
|
2
2
|
import { FeatureType } from './FeatureType'
|
|
3
|
+
import { Place } from './Place'
|
|
3
4
|
import { SkiAreaSummaryFeature } from './SkiArea'
|
|
4
5
|
import { Source } from './Source'
|
|
5
6
|
import { Status } from './Status'
|
|
@@ -27,6 +28,7 @@ export type LiftGeometry = GeoJSON.LineString | GeoJSON.MultiLineString
|
|
|
27
28
|
* @property {Status} status - Operational status of the lift. Derived from OpenStreetMap lifecycle tags.
|
|
28
29
|
* @property {string | null} name - Name of the lift. Derived from the OpenStreetMap name tag.
|
|
29
30
|
* @property {string | null} ref - Reference code/number for the lift. Derived from the OpenStreetMap ref tag.
|
|
31
|
+
* @property {string | null} refFRCAIRN - French CAIRN reference identifier. Derived from the OpenStreetMap ref:FR:CAIRN tag.
|
|
30
32
|
* @property {string | null} description - Description of the lift. Derived from the OpenStreetMap description tag.
|
|
31
33
|
* @property {boolean | null} oneway - Whether the lift allows riding only in one direction. Derived from the OpenStreetMap oneway tag.
|
|
32
34
|
* @property {number | null} occupancy - Number of people each carrier can transport. Derived from the OpenStreetMap aerialway:occupancy tag.
|
|
@@ -38,7 +40,8 @@ export type LiftGeometry = GeoJSON.LineString | GeoJSON.MultiLineString
|
|
|
38
40
|
* @property {SkiAreaSummaryFeature[]} skiAreas - Ski areas this lift is a part of.
|
|
39
41
|
* @property {Source[]} sources - Data sources for the feature.
|
|
40
42
|
* @property {string[]} websites - Websites associated with this lift. Derived from the OpenStreetMap website tag.
|
|
41
|
-
* @property {string | null}
|
|
43
|
+
* @property {string | null} wikidataID - Wikidata identifier. Derived from the OpenStreetMap wikidata tag.
|
|
44
|
+
* @property {Place[]} places - Geographic places this lift is within (e.g., city, region, country). Derived from reverse geocoding.
|
|
42
45
|
*/
|
|
43
46
|
export type LiftProperties = {
|
|
44
47
|
type: FeatureType.Lift
|
|
@@ -47,6 +50,7 @@ export type LiftProperties = {
|
|
|
47
50
|
status: Status
|
|
48
51
|
name: string | null
|
|
49
52
|
ref: string | null
|
|
53
|
+
refFRCAIRN: string | null
|
|
50
54
|
description: string | null
|
|
51
55
|
oneway: boolean | null
|
|
52
56
|
occupancy: number | null
|
|
@@ -58,7 +62,8 @@ export type LiftProperties = {
|
|
|
58
62
|
skiAreas: SkiAreaSummaryFeature[]
|
|
59
63
|
sources: Source[]
|
|
60
64
|
websites: string[]
|
|
61
|
-
|
|
65
|
+
wikidataID: string | null
|
|
66
|
+
places: Place[]
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
export enum LiftType {
|
package/src/Run.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
getProfileGeometry,
|
|
7
7
|
} from './ElevationProfile'
|
|
8
8
|
import { FeatureType } from './FeatureType'
|
|
9
|
+
import { Place } from './Place'
|
|
9
10
|
import { RunDifficultyConvention } from './RunDifficultyConvention'
|
|
10
11
|
import { SkiAreaSummaryFeature } from './SkiArea'
|
|
11
12
|
import { SnowCoverHistory } from './SnowCoverHistory'
|
|
@@ -55,7 +56,8 @@ export type RunFeature = GeoJSON.Feature<RunGeometry, RunProperties>
|
|
|
55
56
|
* @property {ElevationProfile | null} elevationProfile - Elevation profile of the run, only available for runs with LineString geometry.
|
|
56
57
|
* @property {Source[]} sources - Data sources for this run's information
|
|
57
58
|
* @property {string[]} websites - Websites associated with this run, derived from the OpenStreetMap website tag
|
|
58
|
-
* @property {string | null}
|
|
59
|
+
* @property {string | null} wikidataID - Wikidata identifier, if available, derived from the OpenStreetMap wikidata tag
|
|
60
|
+
* @property {Place[]} places - Geographic places this run is within (e.g., city, region, country). Derived from reverse geocoding.
|
|
59
61
|
* @property {SnowCoverHistory} [snowCoverHistory] - Historical snow cover data for this run, if available
|
|
60
62
|
*/
|
|
61
63
|
export type RunProperties = {
|
|
@@ -77,7 +79,8 @@ export type RunProperties = {
|
|
|
77
79
|
elevationProfile: ElevationProfile | null
|
|
78
80
|
sources: Source[]
|
|
79
81
|
websites: string[]
|
|
80
|
-
|
|
82
|
+
wikidataID: string | null
|
|
83
|
+
places: Place[]
|
|
81
84
|
snowCoverHistory?: SnowCoverHistory
|
|
82
85
|
}
|
|
83
86
|
|
package/src/SkiArea.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FeatureType } from './FeatureType'
|
|
2
2
|
import { LiftType } from './Lift'
|
|
3
|
-
import {
|
|
3
|
+
import { Place } from './Place'
|
|
4
4
|
import { RunDifficulty } from './Run'
|
|
5
5
|
import { RunDifficultyConvention } from './RunDifficultyConvention'
|
|
6
6
|
import { SnowCoverHistory } from './SnowCoverHistory'
|
|
@@ -40,7 +40,7 @@ export type SkiAreaSummaryFeature = GeoJSON.Feature<
|
|
|
40
40
|
>
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* @property {string} id - Unique identifier for the ski area. The ID is just a hash of the feature, so will change if the feature changes in any way. If a stable identifier is needed, use the
|
|
43
|
+
* @property {string} id - Unique identifier for the ski area. The ID is just a hash of the feature, so will change if the feature changes in any way. If a stable identifier is needed, use the wikidataID property, or a source id.
|
|
44
44
|
* @property {string | null} name - Name of the ski area.
|
|
45
45
|
* @property {Source[]} sources - Data sources.
|
|
46
46
|
* @property {SkiAreaActivity[]} activities - Activities available at this ski area, derived from presence of ski runs and Skimap.org data.
|
|
@@ -48,15 +48,16 @@ export type SkiAreaSummaryFeature = GeoJSON.Feature<
|
|
|
48
48
|
* @property {Status | null} status - Operational status. Derived from OpenStreetMap lifecycle tags and Skimap.org data.
|
|
49
49
|
* @property {RunColorConvention} runConvention - Color convention used for runs at this ski area.
|
|
50
50
|
* @property {string[]} websites - Official website(s) of the ski area. Derived from the OpenStreetMap website tag and Skimap.org data.
|
|
51
|
-
* @property {string | null}
|
|
52
|
-
* @property {
|
|
51
|
+
* @property {string | null} wikidataID - Wikidata identifier. Derived from the OpenStreetMap wikidata tag.
|
|
52
|
+
* @property {Place[]} places - Geographic places this ski area is within (e.g., city, region, country). Derived from reverse geocoding.
|
|
53
53
|
*/
|
|
54
54
|
export type SkiAreaProperties = SkiAreaSummaryProperties & {
|
|
55
55
|
sources: Source[]
|
|
56
56
|
statistics?: SkiAreaStatistics
|
|
57
57
|
runConvention: RunDifficultyConvention
|
|
58
58
|
websites: string[]
|
|
59
|
-
|
|
59
|
+
wikidataID: string | null
|
|
60
|
+
places: Place[]
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
export type SkiAreaSummaryProperties = {
|
|
@@ -65,7 +66,6 @@ export type SkiAreaSummaryProperties = {
|
|
|
65
66
|
name: string | null
|
|
66
67
|
activities: SkiAreaActivity[]
|
|
67
68
|
status: Status | null
|
|
68
|
-
location: Location | null
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export enum SkiAreaActivity {
|
|
@@ -25,7 +25,8 @@ describe("getEstimatedRunDifficulty", () => {
|
|
|
25
25
|
elevationProfile: null,
|
|
26
26
|
sources: [],
|
|
27
27
|
websites: [],
|
|
28
|
-
|
|
28
|
+
wikidataID: null,
|
|
29
|
+
places: [],
|
|
29
30
|
},
|
|
30
31
|
});
|
|
31
32
|
|
|
@@ -55,14 +56,16 @@ describe("getEstimatedRunDifficulty", () => {
|
|
|
55
56
|
elevationProfile: null,
|
|
56
57
|
sources: [],
|
|
57
58
|
websites: [],
|
|
58
|
-
|
|
59
|
+
wikidataID: null,
|
|
60
|
+
places: [],
|
|
59
61
|
},
|
|
60
62
|
});
|
|
61
63
|
|
|
62
64
|
expect(getEstimatedRunDifficulty(0.1, downhillScale)).toBe(RunDifficulty.EASY); // 10%
|
|
63
65
|
expect(getEstimatedRunDifficulty(0.3, downhillScale)).toBe(RunDifficulty.INTERMEDIATE); // 30%
|
|
64
66
|
expect(getEstimatedRunDifficulty(0.6, downhillScale)).toBe(RunDifficulty.ADVANCED); // 60%
|
|
65
|
-
expect(getEstimatedRunDifficulty(
|
|
67
|
+
expect(getEstimatedRunDifficulty(0.9, downhillScale)).toBe(RunDifficulty.EXPERT); // 90%
|
|
68
|
+
expect(getEstimatedRunDifficulty(1.0, downhillScale)).toBe(RunDifficulty.FREERIDE); // 100%
|
|
66
69
|
});
|
|
67
70
|
|
|
68
71
|
it("should return correct difficulty for nordic slopes", () => {
|
|
@@ -88,7 +91,8 @@ describe("getEstimatedRunDifficulty", () => {
|
|
|
88
91
|
elevationProfile: null,
|
|
89
92
|
sources: [],
|
|
90
93
|
websites: [],
|
|
91
|
-
|
|
94
|
+
wikidataID: null,
|
|
95
|
+
places: [],
|
|
92
96
|
},
|
|
93
97
|
});
|
|
94
98
|
|
|
@@ -120,7 +124,8 @@ describe("getEstimatedRunDifficulty", () => {
|
|
|
120
124
|
elevationProfile: null,
|
|
121
125
|
sources: [],
|
|
122
126
|
websites: [],
|
|
123
|
-
|
|
127
|
+
wikidataID: null,
|
|
128
|
+
places: [],
|
|
124
129
|
},
|
|
125
130
|
});
|
|
126
131
|
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ export * from './ElevationProfile'
|
|
|
2
2
|
export * from './FeatureType'
|
|
3
3
|
export * from './Lift'
|
|
4
4
|
export * from './LiftNameFormatter'
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './Place'
|
|
6
6
|
export * from './Run'
|
|
7
7
|
export * from './RunDifficultyConvention'
|
|
8
8
|
export * from './SlopeGradingScale'
|
package/dist/Location.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Location.js","sourceRoot":"","sources":["../src/Location.ts"],"names":[],"mappings":""}
|