August 03, 2005

GML and Coordinate Systems

You may have wondered how in GML we designate the coordinate system used to interpret the coordinates in a <gml:coordinates>, <gml:pos> or <gml:posList> element.

Unlike KML or geoRSS (at least thus far) GML does NOT assume a single, fixed coordinate system.  It must be specified by the creator of the data.  The coordinate system is specified (what OGC calls a Coordinate Reference System) using the srsName attribute. This is attached to a geometry object as shown in the following example:

    <gml:Point gml:id="p1" srsName="#srs36">
        <gml:coordinates>100,200</gml:coordinates>
    </gml:Point>

The value of the srsName attribute is a URI.  It refers to a definition of the coordinate reference system that is used to interpret the coordinates in the geometry.  This definition may live in a document (e.g. a flat file)or in an online web service (e.g. CRS Demonstration).

The srsName URI may also be a URN.  This then provides a well known string for referencing common CRS definitions. The OGC has developed a set of URN strings for some common coordinate systems.  It is intended that these URN's resolve through a URN resolver to CRS definitions.

GML provides a means of encoding CRS definitions.  A draft URN structure has been created by the OGC in part for this purpose and specific URN names have been created.

 

Posted by RLake at 23:00:40 | Permanent Link | Comments (1) |
Comments
1 - I have a question. As you represent in gml the height of an object. Like for example a mountain.
Thanks. (Comment this)

Written by: Alberto at 2006/01/30 - 19:41:10
Write a comment