@esri/arcgis-rest-elevation 1.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/README.md +84 -0
- package/dist/bundled/elevation.esm.js +84 -0
- package/dist/bundled/elevation.esm.js.map +1 -0
- package/dist/bundled/elevation.esm.min.js +7 -0
- package/dist/bundled/elevation.esm.min.js.map +1 -0
- package/dist/bundled/elevation.umd.js +93 -0
- package/dist/bundled/elevation.umd.js.map +1 -0
- package/dist/bundled/elevation.umd.min.js +7 -0
- package/dist/bundled/elevation.umd.min.js.map +1 -0
- package/dist/cjs/findElevationAtManyPoints.js +47 -0
- package/dist/cjs/findElevationAtManyPoints.js.map +1 -0
- package/dist/cjs/findElevationAtPoint.js +38 -0
- package/dist/cjs/findElevationAtPoint.js.map +1 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/openapi-types.js +7 -0
- package/dist/cjs/openapi-types.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/utils.js +5 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/esm/findElevationAtManyPoints.d.ts +48 -0
- package/dist/esm/findElevationAtManyPoints.js +43 -0
- package/dist/esm/findElevationAtManyPoints.js.map +1 -0
- package/dist/esm/findElevationAtPoint.d.ts +40 -0
- package/dist/esm/findElevationAtPoint.js +34 -0
- package/dist/esm/findElevationAtPoint.js.map +1 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/openapi-types.d.ts +473 -0
- package/dist/esm/openapi-types.js +6 -0
- package/dist/esm/openapi-types.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/utils.d.ts +1 -0
- package/dist/esm/utils.js +2 -0
- package/dist/esm/utils.js.map +1 -0
- package/package.json +75 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { request, appendCustomParams } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { baseUrl } from "./utils.js";
|
|
3
|
+
/**
|
|
4
|
+
* This method returns elevations in meters at given longitudes and latitudes
|
|
5
|
+
* within the WGS84 coordinate system. The order of the points returned by this
|
|
6
|
+
* request will be the same as the order of the points passed in the coordinates
|
|
7
|
+
* parameter.
|
|
8
|
+
*
|
|
9
|
+
* If the distance between the furthest West and furthest East coordinate or
|
|
10
|
+
* the furthest North and furthest South coordinate exceeds 50km, the service
|
|
11
|
+
* will return a 400 HTTP response as the distance between these points is too
|
|
12
|
+
* large.
|
|
13
|
+
*
|
|
14
|
+
* By default the elevation is measured with respect to the Earth's mean sea level.
|
|
15
|
+
* It takes into account the local variations in gravity and provides a consistent
|
|
16
|
+
* vertical reference.
|
|
17
|
+
*
|
|
18
|
+
* If the relativeTo query parameter is set to `ellipsoid`, the elevation will be
|
|
19
|
+
* measured with respect to the ellipsoid. This is a mathematical model that
|
|
20
|
+
* approximates the shape of the Earth. It does not consider local variations
|
|
21
|
+
* in gravity and is commonly used in GPS positioning.
|
|
22
|
+
*
|
|
23
|
+
* ```
|
|
24
|
+
* import { findElevationAtManyPoints } from "@esri/arcgis-rest-elevation";
|
|
25
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
26
|
+
*
|
|
27
|
+
* const results = await findElevationAtManyPoints({
|
|
28
|
+
* coordinates: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]],
|
|
29
|
+
* authentication: ApiKeyManager.fromKey("YOUR_ACCESS_TOKEN");
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* console.log(results)
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export function findElevationAtManyPoints(requestOptions) {
|
|
36
|
+
const options = appendCustomParams(requestOptions, ["relativeTo"], Object.assign({}, requestOptions));
|
|
37
|
+
options.params.coordinates = JSON.stringify(requestOptions.coordinates);
|
|
38
|
+
return request(`${baseUrl}/elevation/at-many-points`, Object.assign({}, options)).then((response) => {
|
|
39
|
+
const r = Object.assign({}, response);
|
|
40
|
+
return r;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=findElevationAtManyPoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findElevationAtManyPoints.js","sourceRoot":"","sources":["../../src/findElevationAtManyPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,kBAAkB,EAEnB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAyBrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,UAAU,yBAAyB,CACvC,cAAiD;IAEjD,MAAM,OAAO,GAAQ,kBAAkB,CACrC,cAAc,EACd,CAAC,YAAY,CAAC,oBAET,cAAc,EAEpB,CAAC;IAEF,OAAO,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAExE,OACE,OAAO,CAAC,GAAG,OAAO,2BAA2B,oBACxC,OAAO,EAEb,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;QAClB,MAAM,CAAC,qBACF,QAAQ,CACZ,CAAC;QAEF,OAAO,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtManyPointsPost\"][\"requestBody\"][\"content\"][\"application/json\"],\n \"coordinates\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtManyPointsPost\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtManyPointsResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtManyPointsOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns elevations in meters at given longitudes and latitudes\n * within the WGS84 coordinate system. The order of the points returned by this\n * request will be the same as the order of the points passed in the coordinates\n * parameter.\n *\n * If the distance between the furthest West and furthest East coordinate or\n * the furthest North and furthest South coordinate exceeds 50km, the service\n * will return a 400 HTTP response as the distance between these points is too\n * large.\n *\n * By default the elevation is measured with respect to the Earth's mean sea level.\n * It takes into account the local variations in gravity and provides a consistent\n * vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtManyPoints } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtManyPoints({\n * coordinates: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]],\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtManyPoints(\n requestOptions: IFindElevationAtManyPointsOptions\n): Promise<IFindElevationAtManyPointsResponse> {\n const options: any = appendCustomParams<IFindElevationAtManyPointsOptions>(\n requestOptions,\n [\"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n options.params.coordinates = JSON.stringify(requestOptions.coordinates);\n\n return (\n request(`${baseUrl}/elevation/at-many-points`, {\n ...options\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtManyPointsResponse = {\n ...response\n };\n\n return r;\n });\n}\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { operations } from "./openapi-types.js";
|
|
3
|
+
declare type queryParams = Pick<operations["ElevationAtPointGet"]["parameters"]["query"], "lon" | "lat" | "relativeTo">;
|
|
4
|
+
declare type successResponse = operations["ElevationAtPointGet"]["responses"]["200"]["content"]["application/json"];
|
|
5
|
+
/**
|
|
6
|
+
* The response format for {@linkcode findElevationAtPoint};
|
|
7
|
+
*/
|
|
8
|
+
export interface IFindElevationAtPointResponse extends successResponse {
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Options for {@linkcode findElevationAtPoint}.
|
|
12
|
+
*/
|
|
13
|
+
export interface IFindElevationAtPointOptions extends Omit<IRequestOptions, "httpMethod" | "f">, queryParams {
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* This method returns the elevation in meters at a given longitude and latitude
|
|
17
|
+
* within the WGS84 coordinate system. By default the elevation is measured with
|
|
18
|
+
* respect to the Earth's mean sea level. It takes into account the local
|
|
19
|
+
* variations in gravity and provides a consistent vertical reference.
|
|
20
|
+
*
|
|
21
|
+
* If the relativeTo query parameter is set to `ellipsoid`, the elevation will be
|
|
22
|
+
* measured with respect to the ellipsoid. This is a mathematical model that
|
|
23
|
+
* approximates the shape of the Earth. It does not consider local variations
|
|
24
|
+
* in gravity and is commonly used in GPS positioning.
|
|
25
|
+
*
|
|
26
|
+
* ```
|
|
27
|
+
* import { findElevationAtPoint } from "@esri/arcgis-rest-elevation";
|
|
28
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
29
|
+
*
|
|
30
|
+
* const results = await findElevationAtPoint({
|
|
31
|
+
* lon: -179.99,
|
|
32
|
+
* lat: -85.05,
|
|
33
|
+
* authentication: ApiKeyManager.fromKey("YOUR_ACCESS_TOKEN");
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* console.log(results)
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function findElevationAtPoint(requestOptions: IFindElevationAtPointOptions): Promise<IFindElevationAtPointResponse>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { request, appendCustomParams } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { baseUrl } from "./utils.js";
|
|
3
|
+
/**
|
|
4
|
+
* This method returns the elevation in meters at a given longitude and latitude
|
|
5
|
+
* within the WGS84 coordinate system. By default the elevation is measured with
|
|
6
|
+
* respect to the Earth's mean sea level. It takes into account the local
|
|
7
|
+
* variations in gravity and provides a consistent vertical reference.
|
|
8
|
+
*
|
|
9
|
+
* If the relativeTo query parameter is set to `ellipsoid`, the elevation will be
|
|
10
|
+
* measured with respect to the ellipsoid. This is a mathematical model that
|
|
11
|
+
* approximates the shape of the Earth. It does not consider local variations
|
|
12
|
+
* in gravity and is commonly used in GPS positioning.
|
|
13
|
+
*
|
|
14
|
+
* ```
|
|
15
|
+
* import { findElevationAtPoint } from "@esri/arcgis-rest-elevation";
|
|
16
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
17
|
+
*
|
|
18
|
+
* const results = await findElevationAtPoint({
|
|
19
|
+
* lon: -179.99,
|
|
20
|
+
* lat: -85.05,
|
|
21
|
+
* authentication: ApiKeyManager.fromKey("YOUR_ACCESS_TOKEN");
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* console.log(results)
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export function findElevationAtPoint(requestOptions) {
|
|
28
|
+
const options = appendCustomParams(requestOptions, ["lon", "lat", "relativeTo"], Object.assign({}, requestOptions));
|
|
29
|
+
return request(`${baseUrl}/elevation/at-point`, Object.assign(Object.assign({}, options), { httpMethod: "GET" })).then((response) => {
|
|
30
|
+
const r = Object.assign({}, response);
|
|
31
|
+
return r;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=findElevationAtPoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findElevationAtPoint.js","sourceRoot":"","sources":["../../src/findElevationAtPoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,kBAAkB,EAEnB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAyBrC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,oBAAoB,CAClC,cAA4C;IAE5C,MAAM,OAAO,GAAG,kBAAkB,CAChC,cAAc,EACd,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,oBAEvB,cAAc,EAEpB,CAAC;IAEF,OACE,OAAO,CAAC,GAAG,OAAO,qBAAqB,kCAClC,OAAO,KACV,UAAU,EAAE,KAAK,IAEpB,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;QAClB,MAAM,CAAC,qBACF,QAAQ,CACZ,CAAC;QAEF,OAAO,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtPointGet\"][\"parameters\"][\"query\"],\n \"lon\" | \"lat\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtPointGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtPointResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtPointOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns the elevation in meters at a given longitude and latitude\n * within the WGS84 coordinate system. By default the elevation is measured with\n * respect to the Earth's mean sea level. It takes into account the local\n * variations in gravity and provides a consistent vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtPoint } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtPoint({\n * lon: -179.99,\n * lat: -85.05,\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtPoint(\n requestOptions: IFindElevationAtPointOptions\n): Promise<IFindElevationAtPointResponse> {\n const options = appendCustomParams<IFindElevationAtPointOptions>(\n requestOptions,\n [\"lon\", \"lat\", \"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/elevation/at-point`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtPointResponse = {\n ...response\n };\n\n return r;\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;gBACgB;AAMhB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC","sourcesContent":["/* Copyright (c) 2023 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\n// Types that are used in this package are re-exported for convenience and\n// to make the links work correctly in the documentation pages.\nexport type {} from \"@esri/arcgis-rest-request\";\n\nexport * from \"./findElevationAtPoint.js\";\nexport * from \"./findElevationAtManyPoints.js\";\n"]}
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/elevation/at-point": {
|
|
7
|
+
/**
|
|
8
|
+
* Returns the elevation in meters at a given longitude and latitude within the WGS84 coordinate system.
|
|
9
|
+
*
|
|
10
|
+
* By default the elevation is measured with respect to the Earth's mean sea level. It takes into account the local variations in gravity and provides a consistent vertical reference.
|
|
11
|
+
*
|
|
12
|
+
* If the `relativeTo` query parameter is set to `ellipsoid`, the elevation will be measured with respect to the ellipsoid. This is a mathematical model that approximates the shape of the Earth. It does not consider local variations in gravity and is commonly used in GPS positioning.
|
|
13
|
+
*
|
|
14
|
+
* Note: You cannot permanently store elevations. Please see the [Terms of use](https://developers.arcgis.com/documentation/mapping-apis-and-services/deployment/terms-of-use/).
|
|
15
|
+
*/
|
|
16
|
+
get: operations["ElevationAtPointGet"];
|
|
17
|
+
};
|
|
18
|
+
"/elevation/at-many-points": {
|
|
19
|
+
/**
|
|
20
|
+
* Returns elevations in meters at given longitudes and latitudes within the WGS84 coordinate system.
|
|
21
|
+
*
|
|
22
|
+
* The order of the points returned by this request will be the same as the order of the points passed in the
|
|
23
|
+
* `coordinates` parameter.
|
|
24
|
+
*
|
|
25
|
+
* If the distance between the furthest West and furthest East coordinate exceeds 50km, the service will return a `400` HTTP response as the distance between these points is too large.
|
|
26
|
+
*
|
|
27
|
+
* If the distance between the furthest North and furthest South coordinate exceeds 50km, the service will return a `400` HTTP response as the distance between these points is too large.
|
|
28
|
+
*
|
|
29
|
+
* If any of the points are otherwise invalid, a `400` HTTP response will be returned.
|
|
30
|
+
*
|
|
31
|
+
* By default the elevation is measured with respect to the Earth's mean sea level. It takes into account the local variations in gravity and provides a consistent vertical reference.
|
|
32
|
+
*
|
|
33
|
+
* If the `relativeTo` parameter in the body is set to `ellipsoid`, the elevation will be measured with respect to the ellipsoid. This is a mathematical model that approximates the shape of the Earth. It does not consider local variations in gravity and is commonly used in GPS positioning.
|
|
34
|
+
*
|
|
35
|
+
* Note: You cannot permanently store elevations. Please see the [Terms of use](https://developers.arcgis.com/documentation/mapping-apis-and-services/deployment/terms-of-use/).
|
|
36
|
+
*
|
|
37
|
+
* The Post Body content type must be either:
|
|
38
|
+
* - JSON with content type of `application/json`, or
|
|
39
|
+
* - form URL encoded key-value pairs with content type `application/x-www-form-urlencoded`.
|
|
40
|
+
*
|
|
41
|
+
* The following parameters are used to fetch elevations for multiple coordinates:
|
|
42
|
+
*
|
|
43
|
+
* **coordinates**
|
|
44
|
+
* - (Required) Array of (longitude, latitude) pairs in the WGS84 spatial reference. Maximum size of 100 coordinates. The order of each pair must be
|
|
45
|
+
* - longitude in the range `-179.99` to `179.99` representing the east/west or x-axis
|
|
46
|
+
* - latitude in the range `-85.05` to `85.05` representing the north/south or y-axis
|
|
47
|
+
* - For example: `[[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]]`
|
|
48
|
+
*
|
|
49
|
+
* **f**
|
|
50
|
+
* - (Optional) Case-sensitive parameter to specify the format in which responses are given. Can either be `json` or `pjson`.
|
|
51
|
+
*
|
|
52
|
+
* **relativeTo**
|
|
53
|
+
* - (Optional) The reference position (datum) from which to measure elevation. The valid values are:
|
|
54
|
+
*
|
|
55
|
+
* - **meanSeaLevel**: The elevation above or below the WGS84 geoid reference surface, which is approximately the mean sea level. It takes into account the local variations in gravity and provides a consistent vertical reference.
|
|
56
|
+
* - **ellipsoid**: Ellipsoidal height is measured with respect to an ellipsoid, which is a mathematical model that approximates the shape of the Earth. It does not consider local variations in gravity and is commonly used in GPS positioning.
|
|
57
|
+
*
|
|
58
|
+
* **token**
|
|
59
|
+
* - (Optional) The authentication token, used to access the elevation service. Alternatively, you can supply a token in the request header with either the `Authorization` or `X-Esri-Authorization` key, using the "Bearer" scheme.
|
|
60
|
+
*/
|
|
61
|
+
post: operations["ElevationAtManyPointsPost"];
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export interface components {
|
|
65
|
+
schemas: {
|
|
66
|
+
/** @description A geometry point referring to a location on a map. */
|
|
67
|
+
Point: {
|
|
68
|
+
/** @description The spatial reference system the point is relative to. */
|
|
69
|
+
spatialReference: {
|
|
70
|
+
/**
|
|
71
|
+
* @description The Well-Known ID (WKID) value of the spatial reference.
|
|
72
|
+
* @example 4326
|
|
73
|
+
*/
|
|
74
|
+
wkid: number;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* @description The X coordinate which is measured along the east/west axis.
|
|
78
|
+
* @example 86.925278
|
|
79
|
+
*/
|
|
80
|
+
x: number;
|
|
81
|
+
/**
|
|
82
|
+
* @description The Y coordinate which is measured along the north/south axis.
|
|
83
|
+
* @example 27.988333
|
|
84
|
+
*/
|
|
85
|
+
y: number;
|
|
86
|
+
/**
|
|
87
|
+
* @description The Z coordinate represents the vertical position of a point above or below a reference level, such as sea level (in meters, rounded to the nearest meter).
|
|
88
|
+
* @example 8744
|
|
89
|
+
*/
|
|
90
|
+
z: number;
|
|
91
|
+
};
|
|
92
|
+
/** @description A structure containing human readable metadata about the specified point. */
|
|
93
|
+
ElevationInfo: {
|
|
94
|
+
/**
|
|
95
|
+
* @description The reference position (datum) from which to measure elevation.
|
|
96
|
+
* The valid values are:
|
|
97
|
+
* - meanSeaLevel: The elevation above or below the WGS84 geoid reference surface, which is approximately the mean sea level.
|
|
98
|
+
* It takes into account the local variations in gravity and provides a consistent vertical reference.
|
|
99
|
+
* - ellipsoid: Ellipsoidal height is measured with respect to an ellipsoid, which is a mathematical model that approximates the shape of the Earth.
|
|
100
|
+
* It does not consider local variations in gravity and is commonly used in GPS positioning.
|
|
101
|
+
*
|
|
102
|
+
* @default meanSeaLevel
|
|
103
|
+
* @example meanSeaLevel
|
|
104
|
+
* @enum {string}
|
|
105
|
+
*/
|
|
106
|
+
relativeTo: "meanSeaLevel" | "ellipsoid";
|
|
107
|
+
};
|
|
108
|
+
/** @description A structure containing a point including an elevation value (defined as Z). */
|
|
109
|
+
Elevation: {
|
|
110
|
+
/** @description The point containing the elevation. */
|
|
111
|
+
point: components["schemas"]["Point"];
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* @description A structure containing a collection of points which contain elevation values (defined as Z). When returned from
|
|
115
|
+
* a request to the `/elevation/at-many-points` endpoint, the order of the points will match the order of the
|
|
116
|
+
* points in the request.
|
|
117
|
+
*/
|
|
118
|
+
Elevations: {
|
|
119
|
+
points: components["schemas"]["Point"][];
|
|
120
|
+
};
|
|
121
|
+
Error: {
|
|
122
|
+
/** @description Error information */
|
|
123
|
+
error: {
|
|
124
|
+
/**
|
|
125
|
+
* @description A code identifying the type of error, either an HTTP error code, `498` (signifying invalid or expired token), or `499` (signifying missing token).
|
|
126
|
+
* @example 400
|
|
127
|
+
* @enum {integer}
|
|
128
|
+
*/
|
|
129
|
+
code: 400 | 401 | 403 | 404 | 413 | 415 | 498 | 499 | 500;
|
|
130
|
+
/** @description A message describing the error. */
|
|
131
|
+
message: string;
|
|
132
|
+
/** @description List of details about the error. */
|
|
133
|
+
details?: string[];
|
|
134
|
+
/**
|
|
135
|
+
* @description URL that provides the elevation service information.
|
|
136
|
+
* @example https://elevation-api.arcgis.com/arcgis/rest/info
|
|
137
|
+
*/
|
|
138
|
+
restInfoUrl?: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* @description Optional, case-sensitive parameter to specify the format in which responses are given. Can either be `json` or `pjson`.
|
|
143
|
+
* @enum {string}
|
|
144
|
+
*/
|
|
145
|
+
Format: "json" | "pjson";
|
|
146
|
+
};
|
|
147
|
+
responses: {
|
|
148
|
+
/** Response to a request for the elevation at a specified point. */
|
|
149
|
+
ElevationResponse: {
|
|
150
|
+
content: {
|
|
151
|
+
"application/json": {
|
|
152
|
+
elevationInfo: components["schemas"]["ElevationInfo"];
|
|
153
|
+
result: components["schemas"]["Elevation"];
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Response to a request for the elevations at specified points. There will be one response point for each point
|
|
159
|
+
* in the request. The order of these points will match the order of the points in the request.
|
|
160
|
+
*/
|
|
161
|
+
MultipleElevationsResponse: {
|
|
162
|
+
content: {
|
|
163
|
+
"application/json": {
|
|
164
|
+
elevationInfo: components["schemas"]["ElevationInfo"];
|
|
165
|
+
result: components["schemas"]["Elevations"];
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
/** Authentication Error. The API key or token is missing, invalid or expired. */
|
|
170
|
+
UnauthorizedErrorResponse: {
|
|
171
|
+
content: {
|
|
172
|
+
"application/json": components["schemas"]["Error"];
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
/** An error occurred on the server. */
|
|
176
|
+
ServerErrorResponse: {
|
|
177
|
+
content: {
|
|
178
|
+
"application/json": components["schemas"]["Error"];
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
/** Invalid query parameters / Incorrect portal item type. */
|
|
182
|
+
InvalidQueryErrorResponse: {
|
|
183
|
+
content: {
|
|
184
|
+
"application/json": components["schemas"]["Error"];
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
/** The supplied authentication information is valid but does not have permission to access the service. */
|
|
188
|
+
PermissionMissingErrorResponse: {
|
|
189
|
+
content: {
|
|
190
|
+
"application/json": components["schemas"]["Error"];
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
/** The requested resource cannot be accessed because of incorrect sharing permissions. */
|
|
194
|
+
ResourcePermissionErrorResponse: {
|
|
195
|
+
content: {
|
|
196
|
+
"application/json": components["schemas"]["Error"];
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
/** The request body was larger than limits defined by the service. */
|
|
200
|
+
ContentTooLargeErrorResponse: {
|
|
201
|
+
content: {
|
|
202
|
+
"application/json": components["schemas"]["Error"];
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
/** The request's message content is of a media-type that the service does not support. */
|
|
206
|
+
UnsupportedMediaTypeErrorResponse: {
|
|
207
|
+
content: {
|
|
208
|
+
"application/json": components["schemas"]["Error"];
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
parameters: {
|
|
213
|
+
/** @description Optional, case-sensitive parameter to specify the format in which responses are given. Can either be `json` or `pjson`. */
|
|
214
|
+
FormatParam: components["schemas"]["Format"];
|
|
215
|
+
/**
|
|
216
|
+
* @description The authentication token, used to access the elevation service.
|
|
217
|
+
*
|
|
218
|
+
* The `token` parameter can be either an API Key or short-lived token.
|
|
219
|
+
*
|
|
220
|
+
* Alternatively, you can supply a token in the request header with one of
|
|
221
|
+
* the following keys using the "Bearer" scheme:
|
|
222
|
+
*
|
|
223
|
+
* - `Authorization: Bearer <YOUR_TOKEN>`
|
|
224
|
+
* - `X-Esri-Authorization: Bearer <YOUR_TOKEN>`
|
|
225
|
+
*
|
|
226
|
+
* The provided `token` must be created from an ArcGIS Location Platform account and have the necessary `premium:user:elevation` privilege to use the elevation service.
|
|
227
|
+
*
|
|
228
|
+
* **Developer guide**: To learn more, go to [Security and authentication](https://developers.arcgis.com/documentation/mapping-apis-and-services/security/).
|
|
229
|
+
*/
|
|
230
|
+
TokenParam: string;
|
|
231
|
+
/** @description The longitude of the specified point. */
|
|
232
|
+
LongitudeParam: number;
|
|
233
|
+
/** @description The latitude of the specified point. */
|
|
234
|
+
LatitudeParam: number;
|
|
235
|
+
/**
|
|
236
|
+
* @description The reference position (datum) from which to measure elevation.
|
|
237
|
+
* The valid values are:
|
|
238
|
+
* - meanSeaLevel: The elevation above or below the WGS84 geoid reference surface, which is approximately the mean sea level.
|
|
239
|
+
* It takes into account the local variations in gravity and provides a consistent vertical reference.
|
|
240
|
+
* - ellipsoid: Ellipsoidal height is measured with respect to an ellipsoid, which is a mathematical model that approximates the shape of the Earth.
|
|
241
|
+
* It does not consider local variations in gravity and is commonly used in GPS positioning.
|
|
242
|
+
*/
|
|
243
|
+
RelativeToParam: "meanSeaLevel" | "ellipsoid";
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
export interface operations {
|
|
247
|
+
/**
|
|
248
|
+
* Returns the elevation in meters at a given longitude and latitude within the WGS84 coordinate system.
|
|
249
|
+
*
|
|
250
|
+
* By default the elevation is measured with respect to the Earth's mean sea level. It takes into account the local variations in gravity and provides a consistent vertical reference.
|
|
251
|
+
*
|
|
252
|
+
* If the `relativeTo` query parameter is set to `ellipsoid`, the elevation will be measured with respect to the ellipsoid. This is a mathematical model that approximates the shape of the Earth. It does not consider local variations in gravity and is commonly used in GPS positioning.
|
|
253
|
+
*
|
|
254
|
+
* Note: You cannot permanently store elevations. Please see the [Terms of use](https://developers.arcgis.com/documentation/mapping-apis-and-services/deployment/terms-of-use/).
|
|
255
|
+
*/
|
|
256
|
+
ElevationAtPointGet: {
|
|
257
|
+
parameters: {
|
|
258
|
+
query: {
|
|
259
|
+
/** The longitude of the specified point. */
|
|
260
|
+
lon: components["parameters"]["LongitudeParam"];
|
|
261
|
+
/** The latitude of the specified point. */
|
|
262
|
+
lat: components["parameters"]["LatitudeParam"];
|
|
263
|
+
/**
|
|
264
|
+
* The reference position (datum) from which to measure elevation.
|
|
265
|
+
* The valid values are:
|
|
266
|
+
* - meanSeaLevel: The elevation above or below the WGS84 geoid reference surface, which is approximately the mean sea level.
|
|
267
|
+
* It takes into account the local variations in gravity and provides a consistent vertical reference.
|
|
268
|
+
* - ellipsoid: Ellipsoidal height is measured with respect to an ellipsoid, which is a mathematical model that approximates the shape of the Earth.
|
|
269
|
+
* It does not consider local variations in gravity and is commonly used in GPS positioning.
|
|
270
|
+
*/
|
|
271
|
+
relativeTo?: components["parameters"]["RelativeToParam"];
|
|
272
|
+
/**
|
|
273
|
+
* The authentication token, used to access the elevation service.
|
|
274
|
+
*
|
|
275
|
+
* The `token` parameter can be either an API Key or short-lived token.
|
|
276
|
+
*
|
|
277
|
+
* Alternatively, you can supply a token in the request header with one of
|
|
278
|
+
* the following keys using the "Bearer" scheme:
|
|
279
|
+
*
|
|
280
|
+
* - `Authorization: Bearer <YOUR_TOKEN>`
|
|
281
|
+
* - `X-Esri-Authorization: Bearer <YOUR_TOKEN>`
|
|
282
|
+
*
|
|
283
|
+
* The provided `token` must be created from an ArcGIS Location Platform account and have the necessary `premium:user:elevation` privilege to use the elevation service.
|
|
284
|
+
*
|
|
285
|
+
* **Developer guide**: To learn more, go to [Security and authentication](https://developers.arcgis.com/documentation/mapping-apis-and-services/security/).
|
|
286
|
+
*/
|
|
287
|
+
token?: components["parameters"]["TokenParam"];
|
|
288
|
+
/** Optional, case-sensitive parameter to specify the format in which responses are given. Can either be `json` or `pjson`. */
|
|
289
|
+
f?: components["parameters"]["FormatParam"];
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
responses: {
|
|
293
|
+
200: components["responses"]["ElevationResponse"];
|
|
294
|
+
400: components["responses"]["InvalidQueryErrorResponse"];
|
|
295
|
+
401: components["responses"]["UnauthorizedErrorResponse"];
|
|
296
|
+
403: components["responses"]["ResourcePermissionErrorResponse"];
|
|
297
|
+
"5XX": components["responses"]["ServerErrorResponse"];
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
/**
|
|
301
|
+
* Returns elevations in meters at given longitudes and latitudes within the WGS84 coordinate system.
|
|
302
|
+
*
|
|
303
|
+
* The order of the points returned by this request will be the same as the order of the points passed in the
|
|
304
|
+
* `coordinates` parameter.
|
|
305
|
+
*
|
|
306
|
+
* If the distance between the furthest West and furthest East coordinate exceeds 50km, the service will return a `400` HTTP response as the distance between these points is too large.
|
|
307
|
+
*
|
|
308
|
+
* If the distance between the furthest North and furthest South coordinate exceeds 50km, the service will return a `400` HTTP response as the distance between these points is too large.
|
|
309
|
+
*
|
|
310
|
+
* If any of the points are otherwise invalid, a `400` HTTP response will be returned.
|
|
311
|
+
*
|
|
312
|
+
* By default the elevation is measured with respect to the Earth's mean sea level. It takes into account the local variations in gravity and provides a consistent vertical reference.
|
|
313
|
+
*
|
|
314
|
+
* If the `relativeTo` parameter in the body is set to `ellipsoid`, the elevation will be measured with respect to the ellipsoid. This is a mathematical model that approximates the shape of the Earth. It does not consider local variations in gravity and is commonly used in GPS positioning.
|
|
315
|
+
*
|
|
316
|
+
* Note: You cannot permanently store elevations. Please see the [Terms of use](https://developers.arcgis.com/documentation/mapping-apis-and-services/deployment/terms-of-use/).
|
|
317
|
+
*
|
|
318
|
+
* The Post Body content type must be either:
|
|
319
|
+
* - JSON with content type of `application/json`, or
|
|
320
|
+
* - form URL encoded key-value pairs with content type `application/x-www-form-urlencoded`.
|
|
321
|
+
*
|
|
322
|
+
* The following parameters are used to fetch elevations for multiple coordinates:
|
|
323
|
+
*
|
|
324
|
+
* **coordinates**
|
|
325
|
+
* - (Required) Array of (longitude, latitude) pairs in the WGS84 spatial reference. Maximum size of 100 coordinates. The order of each pair must be
|
|
326
|
+
* - longitude in the range `-179.99` to `179.99` representing the east/west or x-axis
|
|
327
|
+
* - latitude in the range `-85.05` to `85.05` representing the north/south or y-axis
|
|
328
|
+
* - For example: `[[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]]`
|
|
329
|
+
*
|
|
330
|
+
* **f**
|
|
331
|
+
* - (Optional) Case-sensitive parameter to specify the format in which responses are given. Can either be `json` or `pjson`.
|
|
332
|
+
*
|
|
333
|
+
* **relativeTo**
|
|
334
|
+
* - (Optional) The reference position (datum) from which to measure elevation. The valid values are:
|
|
335
|
+
*
|
|
336
|
+
* - **meanSeaLevel**: The elevation above or below the WGS84 geoid reference surface, which is approximately the mean sea level. It takes into account the local variations in gravity and provides a consistent vertical reference.
|
|
337
|
+
* - **ellipsoid**: Ellipsoidal height is measured with respect to an ellipsoid, which is a mathematical model that approximates the shape of the Earth. It does not consider local variations in gravity and is commonly used in GPS positioning.
|
|
338
|
+
*
|
|
339
|
+
* **token**
|
|
340
|
+
* - (Optional) The authentication token, used to access the elevation service. Alternatively, you can supply a token in the request header with either the `Authorization` or `X-Esri-Authorization` key, using the "Bearer" scheme.
|
|
341
|
+
*/
|
|
342
|
+
ElevationAtManyPointsPost: {
|
|
343
|
+
responses: {
|
|
344
|
+
200: components["responses"]["MultipleElevationsResponse"];
|
|
345
|
+
400: components["responses"]["InvalidQueryErrorResponse"];
|
|
346
|
+
401: components["responses"]["UnauthorizedErrorResponse"];
|
|
347
|
+
403: components["responses"]["ResourcePermissionErrorResponse"];
|
|
348
|
+
413: components["responses"]["ContentTooLargeErrorResponse"];
|
|
349
|
+
415: components["responses"]["UnsupportedMediaTypeErrorResponse"];
|
|
350
|
+
"5XX": components["responses"]["ServerErrorResponse"];
|
|
351
|
+
};
|
|
352
|
+
requestBody: {
|
|
353
|
+
content: {
|
|
354
|
+
"application/json": {
|
|
355
|
+
/**
|
|
356
|
+
* @description The authentication token, used to access the elevation service.
|
|
357
|
+
*
|
|
358
|
+
* The `token` parameter can be either an API Key or short-lived token.
|
|
359
|
+
*
|
|
360
|
+
* Alternatively, you can supply a token in the request header with one of
|
|
361
|
+
* the following keys using the "Bearer" scheme:
|
|
362
|
+
*
|
|
363
|
+
* - `Authorization: Bearer <YOUR_TOKEN>`
|
|
364
|
+
* - `X-Esri-Authorization: Bearer <YOUR_TOKEN>`
|
|
365
|
+
*
|
|
366
|
+
* The provided `token` must be created from an ArcGIS Location Platform account and have the necessary `premium:user:elevation` privilege to use the elevation service.
|
|
367
|
+
*
|
|
368
|
+
* **Developer guide**: To learn more, go to [Security and authentication](https://developers.arcgis.com/documentation/security-and-authentication/).
|
|
369
|
+
*
|
|
370
|
+
* @example My token
|
|
371
|
+
*/
|
|
372
|
+
token?: string;
|
|
373
|
+
/**
|
|
374
|
+
* @description The reference position (datum) from which to measure elevation.
|
|
375
|
+
* The valid values are:
|
|
376
|
+
* - meanSeaLevel: The elevation above or below the WGS84 geoid reference surface, which is approximately the mean sea level.
|
|
377
|
+
* It takes into account the local variations in gravity and provides a consistent vertical reference.
|
|
378
|
+
* - ellipsoid: Ellipsoidal height is measured with respect to an ellipsoid, which is a mathematical model that approximates the shape of the Earth.
|
|
379
|
+
* It does not consider local variations in gravity and is commonly used in GPS positioning.
|
|
380
|
+
*
|
|
381
|
+
* @default meanSeaLevel
|
|
382
|
+
* @example meanSeaLevel
|
|
383
|
+
* @enum {string}
|
|
384
|
+
*/
|
|
385
|
+
relativeTo?: "meanSeaLevel" | "ellipsoid";
|
|
386
|
+
f?: components["schemas"]["Format"];
|
|
387
|
+
/**
|
|
388
|
+
* @description Array of (longitude, latitude) pairs in the WGS84 spatial reference. Maximum size of 100 coordinates. The order of each pair must be
|
|
389
|
+
* - longitude in the range `-179.99` to `179.99` representing the east/west or x-axis
|
|
390
|
+
* - latitude in the range `-85.05` to `85.05` representing the north/south or y-axis
|
|
391
|
+
*
|
|
392
|
+
* For example: `[[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]]`
|
|
393
|
+
*
|
|
394
|
+
* @example [
|
|
395
|
+
* [
|
|
396
|
+
* 31.134167,
|
|
397
|
+
* 29.979167
|
|
398
|
+
* ],
|
|
399
|
+
* [
|
|
400
|
+
* 31.130833,
|
|
401
|
+
* 29.976111
|
|
402
|
+
* ],
|
|
403
|
+
* [
|
|
404
|
+
* 31.128333,
|
|
405
|
+
* 29.9725
|
|
406
|
+
* ]
|
|
407
|
+
* ]
|
|
408
|
+
*/
|
|
409
|
+
coordinates: number[][];
|
|
410
|
+
};
|
|
411
|
+
"application/x-www-form-urlencoded": {
|
|
412
|
+
/**
|
|
413
|
+
* @description The authentication token, used to access the elevation service.
|
|
414
|
+
*
|
|
415
|
+
* The `token` parameter can be either an API Key or short-lived token.
|
|
416
|
+
*
|
|
417
|
+
* Alternatively, you can supply a token in the request header with one of
|
|
418
|
+
* the following keys using the "Bearer" scheme:
|
|
419
|
+
*
|
|
420
|
+
* - `Authorization: Bearer <YOUR_TOKEN>`
|
|
421
|
+
* - `X-Esri-Authorization: Bearer <YOUR_TOKEN>`
|
|
422
|
+
*
|
|
423
|
+
* The provided `token` must be created from an ArcGIS Location Platform account and have the necessary `premium:user:elevation` privilege to use the elevation service.
|
|
424
|
+
*
|
|
425
|
+
* **Developer guide**: To learn more, go to [Security and authentication](https://developers.arcgis.com/documentation/security-and-authentication/).
|
|
426
|
+
*
|
|
427
|
+
* @example My token
|
|
428
|
+
*/
|
|
429
|
+
token?: string;
|
|
430
|
+
/**
|
|
431
|
+
* @description The reference position (datum) from which to measure elevation.
|
|
432
|
+
* The valid values are:
|
|
433
|
+
* - meanSeaLevel: The elevation above or below the WGS84 geoid reference surface, which is approximately the mean sea level.
|
|
434
|
+
* It takes into account the local variations in gravity and provides a consistent vertical reference.
|
|
435
|
+
* - ellipsoid: Ellipsoidal height is measured with respect to an ellipsoid, which is a mathematical model that approximates the shape of the Earth.
|
|
436
|
+
* It does not consider local variations in gravity and is commonly used in GPS positioning.
|
|
437
|
+
*
|
|
438
|
+
* @default meanSeaLevel
|
|
439
|
+
* @example meanSeaLevel
|
|
440
|
+
* @enum {string}
|
|
441
|
+
*/
|
|
442
|
+
relativeTo?: "meanSeaLevel" | "ellipsoid";
|
|
443
|
+
f?: components["schemas"]["Format"];
|
|
444
|
+
/**
|
|
445
|
+
* @description Array of (longitude, latitude) pairs in the WGS84 spatial reference. Maximum size of 100 coordinates. The order of each pair must be
|
|
446
|
+
* - longitude in the range `-179.99` to `179.99` representing the east/west or x-axis
|
|
447
|
+
* - latitude in the range `-85.05` to `85.05` representing the north/south or y-axis
|
|
448
|
+
*
|
|
449
|
+
* For example: `[[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]]`
|
|
450
|
+
*
|
|
451
|
+
* @example [
|
|
452
|
+
* [
|
|
453
|
+
* 31.134167,
|
|
454
|
+
* 29.979167
|
|
455
|
+
* ],
|
|
456
|
+
* [
|
|
457
|
+
* 31.130833,
|
|
458
|
+
* 29.976111
|
|
459
|
+
* ],
|
|
460
|
+
* [
|
|
461
|
+
* 31.128333,
|
|
462
|
+
* 29.9725
|
|
463
|
+
* ]
|
|
464
|
+
* ]
|
|
465
|
+
*/
|
|
466
|
+
coordinates: number[][];
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
export interface external {
|
|
473
|
+
}
|