-
I got latitude and longitude using 'spatialToCartographic' function. I changed the latitude and longitude to the ecef coordinate system for testing(EPSG:3857 WGS 84 to ECEF). Then I converted it to a function 'ecefToSpatial' and marked its position, Was the way I tried wrong? Please give me advice. Thank you. ( imodeljs ver : v2.12.1) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Please see this article. If you have a projected coordinate system, the ECEF transform only gives a rough approximation of location. It gets worse the farther you get from the ECEF origin. The only value of ECEF for iModels with a projected coordinate system is for getting an approximate location without requiring a round trip to a server (e.g. on mobile devices with GPS but no connectivity.) |
Beta Was this translation helpful? Give feedback.
-
If you do have a projected coordinate system and wish for a more accurate conversion from ECEF to spatial coordinates, try converting the ECEF to cartographic (Cartographic.fromEcef) and then iModel.cartographicToSpatial. This will do the actual GCS projection and should give accurate results. As Keith points out the ecef transform stored with projected iModels is an approximation. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer. After changing the method, the difference from the original location was reduced to 5m. Perhaps, with this result, it should be said that it has been resolved. |
Beta Was this translation helpful? Give feedback.
If you do have a projected coordinate system and wish for a more accurate conversion from ECEF to spatial coordinates, try converting the ECEF to cartographic (Cartographic.fromEcef) and then iModel.cartographicToSpatial. This will do the actual GCS projection and should give accurate results. As Keith points out the ecef transform stored with projected iModels is an approximation.