forked from lieberjosh/georss
-
Notifications
You must be signed in to change notification settings - Fork 2
/
gml.html
330 lines (293 loc) · 16.7 KB
/
gml.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="The GeoRSS specification GML encoding for adding geography to Atom and RSS feeds using Geography Markup Language from OGC">
<title>GeoRSS GML</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'><link href="global.css" type="text/css" rel="stylesheet">
</head>
<body>
<div class="nav"><a href="index.html">home</a> | <a href="overview.html">overview</a> | <a href="model.html">model</a> | <a href="gml.html">gml</a> | <a href="simple.html">simple</a> | <a href="w3c.html">W3C Geo</a> | <a href="atom.html">atom</a> | <a href="rdf_rss1.html">rdf/rss1</a> | <a href="implementations.html">implementations</a> | <a href="proposals.html">proposals</a></div>
<h4>GeoRSS ::<br/>Geographically Encoded Objects for RSS feeds</h4>
<h2>GeoRSS GML</h2>
<p><font size="-1"><em>Geography Markup Language (GML) is an XML grammar written in XML Schema for the modelling, transport, and storage of geographic information...GML provides a variety of kinds of objects for describing geography including features, coordinate reference systems, geometry, topology, time, units of measure and generalized values. A geographic feature is "an abstraction of a real world phenomenon; it is a geographic feature if it is associated with a location relative to the Earth?. So a digital representation of the real world can be thought of as a set of features.<br>
- <a href="http://www.opengeospatial.org/groups/?iid=31">OGC GML Working Group</a></em></font></p>
<p>Here we present the encoding of GeoRSS' objects in a simple <a href="http://portal.opengeospatial.org/files/?artifact_id=4700" target="_blank">GML version 3.1.1</a> profile. Each section details the construction of GeoRSS' five objects, followed by some informative use cases. As with all GeoRSS encodings, if not specified, the implied coordinate reference system is WGS84 with coordinates written in decimal degrees.</p>
<p><a href="#gmlpoint">Point</a><br />
<a href="#gmline">Line</a><br />
<a href="#gmlboundary">Polygon</a><br />
<a href="#gmlbox">Box</a><br />
<a href="#examples">Examples</a><br />
<a href="#gmlcrs">Coordinate Reference Systems</a><br />
<a href="#gmlappschema">GML Application Schema</a></p>
<p> </p>
<h3><a name="gmlpoint" id="gmlpoint"></a>Point</h3>
<p>A point consists of a <strong><Point></strong> element with a child <strong><coords></strong>
element. Within<strong> <coords></strong> the latitude and longitude values
are separated by a space. </p>
<blockquote>
<pre style="z-index: 3;"><?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
<strong> xmlns:georss="http://www.georss.org/georss</strong>"
<strong>xmlns:gml="http://www.opengis.net/gml</strong>">
<title>Earthquakes</title>
<subtitle>International earthquake observation labs</subtitle>
<link href="http://example.org/"/>
<updated>2005-12-13T18:30:02Z</updated>
<author>
<name>Dr. Thaddeus Remor</name>
<email>[email protected]</email>
</author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<entry>
<title>M 3.2, Mona Passage</title>
<link href="http://example.org/2005/09/09/atom01"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2005-08-17T07:02:32Z</updated>
<summary>We just had a big one.</summary>
<strong><georss:where>
<<strong>gml:</strong>Point>
<<strong>gml:</strong>pos>45.256 -71.92</<strong>gml:</strong>pos>
</<strong><strong><strong>gml</strong></strong>:</strong>P<strong></strong>oint>
</<strong>georss:</strong>where></strong>
</entry>
</feed></pre>
</blockquote>
<h3><a name="gmline"></a>Line</h3>
<p>A line consists of a <strong><LineString></strong> element with a child <strong><coordList></strong> element.
Within <strong><coordList></strong> the coordinates of the points on the
line are entered as pairs of
latitude and longitude values, separated by spaces. There must be at least two
pairs. No two pairs may be separated by more than 179 degrees in either latitude
or longitude.</p>
<blockquote>
<pre><entry>
...
<strong><georss:where>
</strong><strong> <gml:LineString>
<gml:posList></strong>
<strong> 45.256 -110.45 46.46 -109.48 43.84 -109.86</strong>
<strong></gml:posList>
</gml:LineString></strong><strong>
</georss:where></strong>
</entry></pre>
</blockquote>
<blockquote></blockquote>
<h3><a name="gmlboundary" id="gmlboundary"></a>Polygon</h3>
<p>A polygon consists of a <strong><Polygon></strong> element with a
child <strong><exterior></strong>, <strong><LinearRing></strong> and <strong><coordList></strong> elements.
There must be at least four pairs with the last being identical to the first.
(a boundary has a minimum of three actual points.) No two pairs may be separated
by more than 179 degrees in either latitude or longitude.</p>
<blockquote>
<pre><entry>
...
<strong><georss:where></strong><!--
<gml:Polygon>
<gml:exterior>-->
<strong><gml:Polygon>
<gml:exterior>
<gml:LinearRing>
<gml:posList></strong>
<strong>45.256 -110.45 46.46 -109.48 43.84 -109.86 45.256 -110.45</strong>
<strong></gml:posList></strong>
<strong> </gml:LinearRing>
</gml:exterior>
</strong> <strong></gml:Polygon></strong><!--
</gml:exterior>
</gml:Polygon>-->
<strong></georss:where></strong>
</entry>
</pre>
</blockquote>
<p><strong> <Exterior></strong> specifies this shape as defining the outside of an area, and <strong><LinearRing></strong> states that the coordinates should be connected with straight lines. Within <strong><coordList></strong> the coordinates of the points are entered as pairs of latitude and longitude values, separated by
spaces. There must be at least four pairs with the last being identical to the first. (a polygon has a minimum of three actual points.) No two pairs may be separated by more than 179 degrees in either latitude or longitude.</p>
<h3><a name="gmlbox" id="gmlbox"></a>Box</h3>
<p>A bounding box defines a rectangular region. It is often used to define the extents of a map or define a rough area of interest. A GML box is called an Envelope. It consists of an <strong><Envelope></strong> element with a
child <strong><lowerCorner></strong> element and a child <strong><upperCorner></strong> element.</p>
<p><img src="graphics/gml_envelope.jpg" width="260" height="140" /></p>
<blockquote>
<pre><entry>
...
<strong><georss:where></strong><!--
<gml:Polygon>
<gml:exterior>-->
<strong><gml:Envelope>
<gml:lowerCorner>42.943 -71.032</gml:lowerCorner><br /> <gml:upperCorner>43.039 -69.856</gml:upperCorner><br /> </gml:Envelope>
</georss:where></strong>
</entry>
</pre>
<p> </p>
</blockquote>
<p> </p>
<h2><a name="examples" id="examples"></a>Examples</h2>
<h3><a name="boathike" id="boathike"></a>Boat trip / hike (Atom)</h3>
<p>A good way to describe a trip that has many places of interest like
a boat trip or a hike is to specify the overall trip's path with a line
as a child of the <feed>. Then mark each location of interest
with a point in the <entry>.</p>
<blockquote>
<pre><feed xmlns="http://www.w3.org/2005/Atom"
<strong> xmlns:georss="http://www.georss.org/georss"
<strong>xmlns:gml="http://www.opengis.net/gml</strong>"</strong>>
<title>Dino's Mt. Washington trip</title>
<link href="http://www.myisp.com/dbv/"/>
<updated>2005-12-13T18:30:02Z</updated>
<author>
<name>Dino Bravo</name>
<email>[email protected]</email>
</author>
<id>http://www.myisp.com/dbv/</id>
<strong><georss:where>
<<strong>gml:LineString</strong>>
<<strong>gml:pos</strong>List>
45.256 -110.45 46.46 -109.48 43.84 -109.86 45.8 -109.2
</<strong>gml:pos</strong>List>
</<strong><strong>gml:LineString</strong></strong>>
</<strong>georss:</strong>where></strong>
<entry>
<title>Setting off</title>
<link href="http://www.myisp.com/dbv/1"/>
<id>http://www.myisp.com/dbv/1</id>
<updated>2005-08-17T07:02:32Z</updated>
<content>getting ready to take the mountain!</content>
<strong><georss:where>
<<strong>gml:Point</strong>>
<<strong>gml:pos</strong>>45.256 -110.45</<strong>gml:pos</strong>>
</<strong><strong>gml:Point</strong></strong>>
</<strong>georss:</strong>where></strong>
</entry>
<entry>
<title>Crossing Muddy Creek</title>
<link href="http://www.myisp.com/dbv/2"/>
<id>http://www.myisp.com/dbv/2</id>
<updated>2005-08-15T07:02:32Z</updated>
<content>Check out the salamanders here</content>
<strong><georss:where>
<<strong><strong>gml:Point</strong></strong>>
<<strong>gml:pos</strong>>45.94 -74.377</<strong>gml:pos</strong>>
</<strong><strong>gml:Point</strong></strong>>
</<strong>georss:</strong>where></strong>
</entry>
</feed>
</pre>
</blockquote>
<h3><a name="eventscal" id="eventscal"></a>Calendar of events (Atom)</h3>
<blockquote>
<pre><feed xmlns="http://www.w3.org/2005/Atom"
<strong> xmlns:georss="http://www.georss.org/georss</strong>"
<strong>xmlns:gml="http://www.opengis.net/gml</strong>">
<title>Cambridge Calendar of Events</title>
<subtitle>Goings on around Cambridge</subtitle>
<link href="http://example.org/"/>
<updated>2005-12-13T18:30:02Z</updated>
<author>
<name>Arty "the one man party" Collins</name>
<email>[email protected]</email>
</author>
<id>http://www.cambridgema.gov/calendar</id>
<strong><georss:where>
<<strong>gml:Polygon</strong>>
<gml:exterior><gml:LinearRing>
45.256 -110.45 46.46 -109.48 43.84 -109.86
45.8 -109.2 45.256 -110.45
<strong><strong></gml:LinearRing></strong></strong><strong></gml:exterior></strong>
</<strong><strong>gml:Polygon</strong></strong>>
</<strong>georss:</strong>where></strong>
<entry>
<title>City Council Meeting</title>
<link href="http://www.cambridgema.gov/calendar/2005/09/09/evt01"/>
<id>http://www.cambridgema.gov/calendar/2005/09/09/evt01</id>
<updated>2005-08-17T07:02:32Z</updated>
<content>Regular weekly meeting</content>
<strong><georss:where>
<<strong><strong><strong>gml:Point</strong></strong></strong>>
<<strong>gml:pos</strong>>45.256 -110.45</<strong>gml:pos</strong>>
</<strong><strong><strong>gml:Point</strong></strong></strong>>
</<strong>georss:</strong>where></strong>
</entry>
<entry>
<title>NoCa Arts Open House</title>
<link href="http://www.cambridgema.gov/calendar/2005/09/12/evt02"/>
<id>http://www.cambridgema.gov/calendar/2005/09/12/evt02</id>
<updated>2005-08-15T07:02:32Z</updated>
<content>North Cambridge arts festival featuring local artists</content>
<strong><georss:where>
<<strong><strong><strong>gml:Point</strong></strong></strong>>
<<strong>gml:pos</strong>>45.94 -74.377</<strong>gml:pos</strong>>
</<strong><strong><strong>gml:Point</strong></strong></strong>>
</<strong>georss:</strong>where></strong>
</entry>
</feed>
</pre>
</blockquote>
<h3><a name="gmlcrs"></a>Coordinate Reference System Usage</h3>
<p>A lot of data out in the world doesn't come in latitude/longitude coordinates. It's in UTM or Stateplane or some other coordinate reference system. Why? Because lat/lon just isn't very good when you care about inches or centimeter accuracy. And thank goodness engineers building roads and bridges, and surveyors measuring your property boundaries care very much.</p>
<p>If your GeoRSS GML data is in a coordinate reference system other than lat/lon WGS84 (often technically referred to as EPSG:4236), add in an srsName attribute to your geometry.</p>
<h4>3D decimal degrees CRS example</h4>
<p>The key thing here is to use CRS epsg:4979, specify the srsDimension attribute, and include a third number in your coordinate tuple.</p>
<pre><entry>
...
<georss:where>
<gml:Point srsName="urn:ogc:def:crs:EPSG:9.0:4979" srsDimension="3">
<gml:pos>42.3453 -156.2342 45</gml:pos>
</gml:Point>
</georss:where>
</entry></pre>
<h4>Stateplane CRS example</h4>
<p>26986 is the Stateplane system for Massachusetts Mainland </p>
<blockquote>
<pre><entry>
...
<strong><georss:where></strong><!--
<gml:Polygon>
<gml:exterior>-->
<strong><gml:Polygon srsName="urn:ogc:def:crs:EPSG:9.0:26986">
<gml:exterior>
<gml:LinearRing>
<gml:posList></strong>
<strong>45.256 -110.45 46.46 -109.48 43.84 -109.86 45.256 -110.45</strong>
<strong></gml:posList></strong>
<strong> </gml:LinearRing>
</gml:exterior>
</strong> <strong></gml:Polygon></strong><!--
</gml:exterior>
</gml:Polygon>-->
<strong></georss:where></strong>
</entry>
</pre>
</blockquote>
<h2><a name="gmlappschema"></a>GML profile and application schema for GeoRSS</h2>
<p>All good information encodings should be backed by a formal definition. In this case, we use XML schema to do the job. This helps software developers--especially XML-savvy ones, know the full capabilities of the language, and program their software to handle any case, not just those they've come across in examples.</p>
<h3>GML Profile</h3>
<p>GML is a large and complex language which is also defined by XML schema. Since it is so large, a practice has emerged to define subsets of GML, called Profiles, that contain only those elements of GML needed for the encoding job at hand. </p>
<p>Here is our <a href="georss/gmlgeorss.xsd" target="_blank">GeoRSS GML Profile [http://www.georss.org/georss/gmlgeorss.xsd]</a>.</p>
<p>We also have a rather large graphic of the <a href="graphics/georss-gml-uml.png" target="_blank">UML model for this profile</a>. </p>
<h3>GeoRSS Application Schema</h3>
<p>The application schema defines <georss:where> as the tag that signals geographic content--either in GeoRSS Simple or GML. </p>
<p>Here is our GeoRSS Application Schema <a href="georss/georss.xsd" target="_blank"> [http://www.georss.org/georss/georss.xsd]</a>.</p>
<p>The UML model is shown below. Click on it for a larger, more readable version. </p>
<p><a href="graphics/georss-appschema-uml.png" target="_blank"><img src="graphics/georss-appschema-uml_sm.png" alt="GeoRSS application schema" width="490" height="309" border="0"></a></p>
<p> </p>
<p>
<!-- /Creative Commons License -->
<!--
<rdf:RDF xmlns="http://web.resource.org/cc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="">
<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
<license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
</Work>
<License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/">
<permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<permits rdf:resource="http://web.resource.org/cc/Distribution" />
<requires rdf:resource="http://web.resource.org/cc/Notice" />
<requires rdf:resource="http://web.resource.org/cc/Attribution" />
<permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
</License>
</rdf:RDF>
-->
</p>
</body>
</html>