[postgis-users] Ellipses and WGS84

David W Talmage - CONTRACTOR talmage at cmf.nrl.navy.mil
Mon Nov 17 14:25:17 PST 2008


Would someone please explain the units in this snippet modeled after the 
exampled offered in
http://postgis.refractions.net/pipermail/postgis-users/2007-March/014971.html 
?

translate(rotate(scale(buffer(GeomFromText('Point(0.0 0.0)', 4326), 
r),a,b),alpha),cx,cy)

What are the units of r, a, and b?  I think they are radians.

My intention is to create a 1-meter radius circle at the Equator, morph 
  it into an ellipse and then move the ellipse to an area of interest on 
the globe to select the things that are in that area.  All of my things 
are stored with coordinates in WGS84.

I know the values of a and b in meters.  I have a function that computes 
the number of meters per degree on an ellipsoid at any latitude, so I 
can convert a and b to radians.

I'm pretty sure that cx and cy are the longitude and latitude, 
respectively, in degrees of the center of the ellipse.

alpha is in radians.

I've looked all over for an answer to this question and either I can't 
find it or don't understand what I've found. :-(






More information about the postgis-users mailing list