August 03, 2005

Features and Geometry Properties

To understand GML it is necessary to understand the relationship between GML geomery objects and GML features.  A feature is an application object like a building, a river or person. It may or may not have geometric aspects.  A geometry object is NOT a feature.  Note that in some GIS (especially older ones) a feature referred to something on a map and was more or less the same thing as a geometry object. This is NOT the case in GML.

We do not (except in abusing the language) speak in GML of point features or area features.  A feature can have various geometric properties that describe aspects or characteristics of the feature.  A Building for example might have a position given by a Point geometry object.  We do NOT think of the Building as a point, but we can say that the position of the building is given by a point. In GML we might write:

<abc:Building gml:id="SearsTower">
       <abc:position>
                <gml:Point>
                        <gml:coordinates>100,200</gml:coordinates>
                </gml:Point>
      </abc:position>
</abc:Building>

We might also say that the building has a "footprint" or an "extent" and write:

<abc:Building gml:id="SearsTower">
       <app:extent>
                <gml:Polygon>
                        <gml:exterior>
                                <gml:LinearRing>
                                         <gml:coordinates>100,200</gml:coordinates>
                                </gml:LinearRing>
                       </gml:exterior>
                </gml:Polygon>
      </app:extent>
</abc:Building>
 

Of course, our Building may have both a position and an extent, as well as other properties and could be encoded as:

<abc:Building gml:id="SearsTower">
       <gml:name>Sears Tower</gml:name>
       <abc:height>52</abc:height>
       <abc:position>
                <gml:Point>
                        <gml:coordinates>100,200</gml:coordinates>
                </gml:Point>
      </abc:position>
       <app:extent>
                <gml:Polygon>
                        <gml:exterior>
                                <gml:LinearRing>
                                         <gml:coordinates>100,200</gml:coordinates>
                                </gml:LinearRing>
                       </gml:exterior>
                </gml:Polygon>
      </app:extent>
</abc:Building>
 

GML provides the ability for features to share geometry with one another. This is accomplished using the remote property reference on a geometry property.  Remote properties are a general feature of GML borrowed from RDF.  If you see (or use) an xlnk:href on a GML property it means that the value of the property is the resource referenced in the link.  This can be used for geometry property values.

Suppose we had a Building whose position was given by a Point with identifier p21 (gml:id = "p1").  Suppose also that this Point was also the position of a survey Monument.  We might then write in GML something as follows:

<abc:Building gml:id="SearsTower">
       <abc:position xlink:type="Simple" xlink:href="#p21"/>
</abc:Building>
 
<abc:SurveyMonument gml:id="g234">
       <abc:position>
                <gml:Point gml:id="p21">
                        <gml:coordinates>100,200</gml:coordinates>
                </gml:Point>
      </abc:position>
</abc:SurveyMonument >

Note that the reference is to the shared point and NOT to the SurveyMonument, since the feature object can have more than one geometry property.

Posted by RLake at 22:17:40 | Permanent Link | Comments (0) |
Comments
Write a comment