[Esip-documentation] ACDD 1.3 issue: geospatial_bounds, geospatial_vertical_units - x y vs. y x ordering

Bob Simons - NOAA Federal via Esip-documentation esip-documentation at lists.esipfed.org
Fri Oct 10 12:31:03 EDT 2014


I am thoroughly confused about the x y vs. y x (or lon lat vs lat lon) 
ordering
within WKT Geometries. Some people assert that the ordering is 
CRS-dependent.
I'm not disputing that CRS's, in other situations, may have a preferred 
ordering
(can someone please tell me where they are defined?),
but I have never read anything that says that that ordering applies to WKT.
Indeed, all of the documentation I can find for WKT only refers to
x y (lon lat) ordering, but maybe I'm misreading or overlooking the
important sections.

Below are quotes from three documents that refer only to x y (lon lat) 
ordering.
Can anyone refer me to authoritative documentation that indicates the
ordering in WKT is CRS-dependent and thus sometimes x y (lon lat)
and sometimes y x (lat lon)?

Thank you.

---
Seeking the most authoritative documentation, I see:

1) http://en.wikipedia.org/wiki/Well-known_text says
"The formats were originally defined by the Open Geospatial Consortium 
(OGC) and described in their Simple Feature Access ... specifications"
So that leads to ...

2) http://en.wikipedia.org/wiki/Simple_Features refers to
"OpenGIS Implementation Specification for Geographic information - 
Simple feature access - Part 1: Common architecture (05-126, 06-103r3, 
06-103r4), current version 1.2.1"
So that leads to ...

3) I think this is the most authoritative documentation:
OGC's 
06-103r4_Implementation_Specification_for_Geographic_Information_-_Simple_feature_access_-_Part_1_Common_Architecture_v1.2.1.pdf
(downloadable at http://www.opengeospatial.org/standards/sfa )
Here are some quotes from it:

"6.1.4.1 Description
A Point is a 0-dimensional geometric object and represents a single 
location in coordinate space. A Point has an
x-coordinate value, a y-coordinate value. If called for by the 
associated Spatial Reference System, it may also
have coordinate values for z and m."

"7.2.2 BNF Productions for Two-Dimension Geometry WKT
The following BNF defines two-dimensional geometries in (x, y) 
coordinate spaces. With the exception of the
addition of polyhedral surfaces, these structures are unchanged from 
earlier editions of this standard.
<point> ::= <x> <y>"

"7.2.3 BNF Productions for Three-Dimension Geometry WKT
The following BNF defines geometries in 3 dimensional (x, y, z) 
coordinates.
<point z> ::= <x> <y> <z>"

"7.2.5 BNF Productions for Three-Dimension Measured Geometry WKT
The following BNF defines three-dimensional geometries in (x, y, z) 
coordinate spaces. In addition, each
coordinate carries an "m" ordinate value that is part of some linear 
reference system.
<point zm> ::= <x> <y> <z> <m>"

"8.2.8 Description of WKBGeometry representations
The Well-known Binary Representation for Geometry is described below. 
The basic building block is the
representation for a Point, which consists of a number Doubles, 
depending on the coordinate referece system in
use for the geometry. The representations for other geometric objects 
are built using the representations for
geometric objects that have already been defined.
// Basic Type definitions
// byte : 1 byte
// uint32 : 32 bit unsigned integer (4 bytes)
// double : double precision number (8 bytes)
// Building Blocks : Coordinate, LinearRing
Point {
  double x;
  double y}
PointZ {
  double x;
  double y;
  double z} "

The document does not contain these text strings: "y, x" or "<y> <x>"

-----
The book "Pro Spatial with SQL Server 2012" By Alastair Aitchison
http://books.google.com/books?id=pHeWWBY3cPEC&pg=PA25&lpg=PA25&dq=wkt+point+syntax&source=bl&ots=STQk8kv__q&sig=aigFxz103N15G4yOCu0lCoXXvKI&hl=en&sa=X&ei=GQM4VPWLPMf7iwK454FA&ved=0CFcQ6AEwCTgK#v=onepage&q=wkt%20point%20syntax&f=false
the very bottom of page 25 says
"Defining a Point from geographic coordinates follows the same convention,
but with one thing to watch out for: whereas in everyday language it is 
common
to refer to coordinates of "latitude and longitude" (in that order), 
when you
write geographic coordinates in WKT the longitude coordinate always comes
first, then the latitude coordinate. The WKT syntax for a geography
Point located at a latitude of 40º and longitude of 60º is therefore:
   POINT(60 40)
"

-----
The MySql 5.7 documentation at
http://dev.mysql.com/doc/refman/5.7/en/gis-data-formats.html#gis-wkt-format 
says

mysql> SELECT X(POINT(15, 20));
+------------------+
| X(POINT(15, 20)) |
+------------------+
|               15 |
+------------------+

mysql> SELECT X(GeomFromText('POINT(15 20)'));
+---------------------------------+
| X(GeomFromText('POINT(15 20)')) |
+---------------------------------+
|                              15 |
+---------------------------------+

---


-- 
Sincerely,

Bob Simons
IT Specialist
Environmental Research Division
NOAA Southwest Fisheries Science Center
99 Pacific St, Suite 255A
Monterey, CA 93940
Phone: (831)333-9878 (Changed 2014-08-20)
Fax: (831)648-8440
Email: bob.simons at noaa.gov

The contents of this message are mine personally and
do not necessarily reflect any position of the
Government or the National Oceanic and Atmospheric
Administration.
<>< <>< <>< <>< <>< <>< <>< <>< <>< <><

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.esipfed.org/pipermail/esip-documentation/attachments/20141010/33d8bf47/attachment.html>


More information about the Esip-documentation mailing list