Is it possible to draw a polygon on the surface of the globe in terms of meters?
In particular, I would like to specify a center point in lat/lon and then from there, draw lines that are X meters long (or equivalently, at location x,y meters from center? I suppose what I need is to be able to add meters to a lat/lon point?
Destination point given distance and bearing from start point
(You don’t have to enter minutes/seconds format, it also accepts decimal format, but it’s lat/lon order)
(click the show map, it updates as you put in new values.)
It also list the formula in JavaScript if you wanted to calculate from within your program.
Thanks. I guess I was hoping that I was missing a way built into to Cesium for doing this. (Drawing in meters but having it project onto the ellipsoid). Can anyone confirm if I'll need to do this manually?
- Project from cartographic to cartesian3
- Do calculation to offset in meters
- Project back to cartographic
If I understand correctly, isn't the Cartesian3 point in the ECEF frame? This would make it difficult to move the point to, say, for example, 5 meters east.
The formula from movable-type is along a great circle, and should be unaffected at the poles.
Type in 89 lat, 0 lon, 0 bearing, 200 kilo-meters
You’ll get 89°12′05″N, 180°00′00″W, from prime to anti meridian.
You’ll get non-sense lines if you click on view map though, Google Maps doesn’t handle high latitude properly.
Straight lines on Mercator are rhumblines (constant bearing) on a globe, not great circles (constant direction.) Constant bearing != constant direction. If you walk with constant direction around the world you’ll end up where you started. If you walk around the world with constant bearing you’ll only end up where you started if you walked due east,west,north, or south.
Don't know about the software, but "Bearing" allows you to do so. Starting at a given point and an angle, you set the distance to draw (or walk, run, drive) and the result is the new cartographic point of destination. Check: http://www.movable-type.co.uk/scripts/latlong.html
EllipsoidGeodesic will be useful for this issue. Given two points defining a line on the ellipsoid surface, you can compute a position X meters along the line from the start point.