Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Geography Markup Language
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Examples== [[Polygon]]s, [[Point (geometry)|Point]]s, and ''LineString'' objects are encoded in GML 1.0 and 2.0 as follows: <syntaxhighlight lang="xml"> <gml:Polygon> <gml:outerBoundaryIs> <gml:LinearRing> <gml:coordinates>0,0 100,0 100,100 0,100 0,0</gml:coordinates> </gml:LinearRing> </gml:outerBoundaryIs> </gml:Polygon> <gml:Point> <gml:coordinates>100,200</gml:coordinates> </gml:Point> <gml:LineString> <gml:coordinates>100,200 150,300</gml:coordinates> </gml:LineString> </syntaxhighlight> ''LineString'' objects, along with ''LinearRing'' objects, assume linear interpolation between the specified points. Also the coordinates of a Polygon have to be closed. ===Features using geometries=== The following GML example illustrates the distinction between ''features'' and ''geometry objects''. The ''Building'' feature has several ''geometry objects'', sharing one of them (the ''Point'' with identifier ''p21'') with the ''SurveyMonument'' feature: <syntaxhighlight lang="xml"> <abc:Building gml:id="SearsTower"> <abc:height>52</abc:height> <abc:position xlink:type="Simple" xlink:href="#p21"/> </abc:Building> <abc:SurveyMonument gml:id="g234"> <abc:position> <gml:Point gml:id="p21"> <gml:posList>100,200</gml:posList> </gml:Point> </abc:position> </abc:SurveyMonument> </syntaxhighlight> The reference is to the shared ''Point'' and not to the ''SurveyMonument'', since any ''feature'' object can have more than one ''geometry object'' property. ===Point Profile=== The GML ''Point Profile'' contains a single GML geometry, namely a {{code|<gml:Point>}} object type. Any XML Schema can use the ''Point Profile'' by importing it and referencing the subject {{code|<gml:Point>}} instance: <syntaxhighlight lang="xml"> <PhotoCollection xmlns="http://www.myphotos.org" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.myphotos.org MyGoodPhotos.xsd"> <items> <Item> <name>Lynn Valley</name> <description>A shot of the falls from the suspension bridge</description> <where>North Vancouver</where> <position> <gml:Point srsDimension="2" srsName="http://www.opengis.net/def/crs/EPSG/0/4326"> <gml:pos>49.40 -123.26</gml:pos> </gml:Point> </position> </Item> </items> </PhotoCollection> </syntaxhighlight> When using the ''Point Profile'', the only geometry object is the '<gml:Point>' object. The rest of the geography is defined by the photo-collection schema.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)