[MetaCRS] proj4js and axis order

Christopher Schmidt crschmidt at metacarta.com
Wed Sep 30 15:25:28 EDT 2009


On Wed, Sep 30, 2009 at 09:11:01AM -1000, Harley Powers Parks wrote:
> Hi, just curious.
> 
> What is meant by "axis order"?
> 
> Axis orientation from the origin..0,0 on a 2D plane? X is horizontal,
> increase from left to right, decreases from right to left; y is vertical
> perpendicular to X axis, increase from low to high, decreases from high to
> low.

Axis order, as it relates to coordinate systems, is the definition of 
which axis comes first in a series of coordinates. So, for example, if you
have Boston, is the point:
  
 * lon, lat -- -71, 42
 * lat, lon -- 42, -71
 * x, y,   y, x,  x, y, z, etc.

The EPSG database defines, for each projection, the order of the coordinates
within a set of coordinates. Generally, these coordinates are lat, lon
ordered in the case of geographic projections, and lon, lat ordered in the
case of projected coordinate systems.

However, there are exceptions to all of these cases.

More modern WMS specs require clients to know what the coordinate order 
for a set of coordinates is, and request a bounding box (4-tuple defining
a 2d box) in that projection. So for Boston, you have to request in
  
  srs=EPSG:4326&bbox=41,-72,43,-70

The problem with this is, of course, the fact that in order to make this 
request correctly, rather than assuming you can just do 'min_x, min_y, 
max_x, max_y', you have to have a complete knowledge of the coordinate 
systems that are possible to use in your application, or have some way
to communicate or obtain that data.

Best Regards,
-- 
Christopher Schmidt
MetaCarta


More information about the MetaCRS mailing list