I am given an ellipse represented by a quadruple (major, minor, center, azimuth) where major,minor are the ellips's axis length in meters, the center is the WGS84 coordinates of the ellipse's center given in a (lat, lon) form. The azimuth is the angle of the ellipse relative to the north axis.

I want to transform this representation to one which uses degrees only. My attempt was to consider the earth a perfect sphere, and associate the major axis to the latitude distance and the minor axis to the longitude distance. Additionally, I take into account the latitude when computing the longitude distance (standard distance between two points on a sphere when one advances along the azimuthal axis). Unfortunately, when I draw the resulting ellipse's WKT, it does not match the original ellipse WKT.

I don't think that this difference is caused by the spherical assumption, but by a more serious flaw. One thought I had is that the major/minor are movements in meters along the ellipse's axes, which are not aligned with the polar/azimuthal axes (which are determined by the azimuth of the ellipse), in which case I have no idea how to proceed.

This seems like a rather trivial case, but unfortunately I wasn't able to find any references.

  • Achieving equivalence seems an unrealistic goal. Twenty-five years ago, when I first needed to make a spheroidal ellipse, I first had to port US Geodetic Survey FORTRAN to 'C' to solve the forward geodetic problem (lat1/lon1/bearing/distance to lat2/lon2). Nowadays there are scores of open-source implementations in most programming languages, so you just need to choose something appropriate and move on. – Vince May 19 '19 at 13:47
  • Given the ellipse in the form I specified, my guess is that I should find the point in the direction (azimuth) at distance (semi major axis). What about the other axis? same thing with semi minor axis and direction (azimuth + pi/2)? – GISnoob May 19 '19 at 14:14
  • Perhaps I should have clarified that I'm not sure how to do it even for a sphere (forget about WGS ellipsoide). – GISnoob May 19 '19 at 14:26
  • My point is that you don't need to know how to calculate an ellipse on a sphere if you have a library which will calculate one on an ellipsoid. Porting the FORTRAN and mating it with reference ellipse code was enough of a challenge for me (and yes, semi_maj >= semi_min) – Vince May 19 '19 at 14:45
  • Yeah I understand, it just seems like something which can be done analytically (at least on a sphere), and this would help me understand how does one move between representations. My guess is that one needs to start at the center and then move at direction given by azimuth, do the same for the minor axis, and then rotate the resulting ellipse in order to get something axis-aligned. – GISnoob May 19 '19 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.