Convert geometric coordinates to iModel's spatial coordinate system.
iModel coordinates in response array will be ordered in the same order as they were requested.
Response coordinate may contain warning
property which identifies an issue with converted coordinate:
Out of useful range
- indicates that the conversion was performed outside of the normal use of application of either Geographic Coordinate Reference Systems.Vertical datum convert error
- indicates that a problem occurred during vertical datum conversion. The horizontal coordinates returned are valid but the returned elevation ordinate is unchanged or partially changed.
Instead of coordinate, response may contain an error
:
Out of mathematical domain
- conversions were requested outside of the area of the mathematical capacity of the conversion process for either Geographic Coordinate Reference Systems involved.
For more information on how iModels are geolocated see GeoLocation of iModels.
Authentication
Requires Authorization
header with valid Bearer token for scope itwin-platform
.
For more documentation on authorization and how to get access token visit OAUTH2 Authorization page.
Request parameters
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v1+json
is recommended.
Request body
IModelCoordinatesRequest
Datum (e.g. WGS84, NAD83)
Example
{ "source": "WGS84", "geoCoordinates": [{ "longitude": 103.58176079102425, "latitude": 1.0162823426821597, "elevation": 3 }, { "longitude": 103.58176079102425, "latitude": 90, "elevation": 2 }, { "longitude": 200, "latitude": 1.05, "elevation": 1 } ] }
Response 200 OK
{ "iModelCoordinates": [{ "point": { "x": 1.0000000007239578, "y": 1.999999989173375, "z": 3 } }, { "point": { "x": 28001.642, "y": 9889591.836564282, "z": 2 }, "warning": "Out of useful range" }, { "error": "Out of mathematical domain" } ] }
Response 401 Unauthorized
This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.
{ "error": { "code": "HeaderNotFound", "message": "Header Authorization was not found in the request. Access denied." } }
Response 429 Too many requests
This response indicates that the client sent more requests than allowed by this API for the current tier of the client.
{ "error": { "code": "RateLimitExceeded", "message": "The client sent more requests than allowed by this API for the current tier of the client." } }
Response headers
Number of seconds to wait until client is allowed to make more requests.
Coordinate
{ "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "z": { "type": "number" } }, "required": [ "x", "y", "z" ], "additionalProperties": false }
GeoCoordinate
{ "type": "object", "properties": { "latitude": { "type": "number" }, "longitude": { "type": "number" }, "elevation": { "type": "number" } }, "required": [ "latitude", "longitude", "elevation" ], "additionalProperties": false }
CoordinateConversionWarning
{ "type": "string", "enum": [ "Out of useful range", "Vertical datum convert error", "CSMap error" ] }
CoordinateConversionError
{ "type": "string", "enum": [ "Out of mathematical domain" ] }
CoordinateConversionResponseError
{ "type": "object", "properties": { "error": { "$ref": "#/components/schemas/CoordinateConversionError" } }, "required": [ "error" ], "additionalProperties": false }
IModelCoordinatesRequest
{ "type": "object", "properties": { "source": { "type": "string", "description": "Datum (e.g. WGS84, NAD83)" }, "geoCoordinates": { "type": "array", "items": { "$ref": "#/components/schemas/GeoCoordinate" }, "description": "Array of geographic coordinates" } }, "required": [ "source", "geoCoordinates" ], "additionalProperties": false }
IModelCoordinatesResponsePoint
{ "type": "object", "properties": { "point": { "$ref": "#/components/schemas/Coordinate" }, "warning": { "$ref": "#/components/schemas/CoordinateConversionWarning" } }, "required": [ "point" ], "additionalProperties": false }
IModelCoordinatesResponse
{ "type": "object", "properties": { "iModelCoordinates": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/IModelCoordinatesResponsePoint" }, { "$ref": "#/components/schemas/CoordinateConversionResponseError" } ] } } }, "required": [ "iModelCoordinates" ], "additionalProperties": false }
Error
Contains error information.
One of a server-defined set of error codes.
A human-readable representation of the error.
The target of the error.
{ "type": "object", "description": "Contains error information.", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "message": { "type": "string", "description": "A human-readable representation of the error." }, "target": { "type": "string", "description": "The target of the error.", "nullable": true } }, "required": [ "code", "message" ], "additionalProperties": true }
Error Response
Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.
{ "type": "object", "title": "Error Response", "description": "Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.", "properties": { "error": { "description": "Error information.", "$ref": "#/components/schemas/Error" } }, "required": [ "error" ], "additionalProperties": false }
Was this page helpful?