Post about GeoRSS Simple

This commit is contained in:
~lucidiot 2023-09-24 21:02:26 +02:00
parent 7d5015677b
commit 901fc6f41f
1 changed files with 40 additions and 1 deletions

View File

@ -10,13 +10,17 @@
xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
xmlns:georss="http://www.georss.org/georss/11"
xmlns:icbm="http://postneo.com/icbm"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:webfeeds="http://webfeeds.org/rss/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="xsd/rss.xsd"
xsi:schemaLocation="http://postneo.com/icbm xsd/icbm.xsd"
xsi:schemaLocation="
http://postneo.com/icbm xsd/icbm.xsd
http://www.georss.org/georss/11 https://schemas.opengis.net/georss/1.0/schema-1.1/georss.xsd
"
>
<channel>
<title>RSRSSS</title>
@ -1392,6 +1396,41 @@
<geo:long>-73.1427788</geo:long>
<geo:alt>49</geo:alt>
</item>
<item>
<title>Please the geospatial nerds with GeoRSS Simple</title>
<pubDate>Mon, 18 Sep 2023 16:01:43 +0200</pubDate>
<guid isPermaLink="false">georss-simple-1</guid>
<category domain="https://envs.net/~lucidiot/rsrsss/">Tip</category>
<category domain="https://envs.net/~lucidiot/rsrsss/">Geospatial/GeoRSS</category>
<link>https://docs.ogc.org/cs/17-002r1/17-002r1.html</link>
<description><![CDATA[
<p><a href="https://envs.net/~lucidiot/rsrsss/feed.xml#geo" target="_blank">Previously on this feed</a>, we saw how to refer to geospatial locations using the ICBM, W3C Geo and GeoURL namespaces. Today, we will be looking at how to refer to points again, but soon more than just points, thanks to <a href="https://docs.ogc.org/cs/17-002r1/17-002r1.html">GeoRSS</a>. There's a lot to cover with that standard, so expect a whole lot of geography in the coming weeks.</p>
<p>GeoRSS is a standard that was developed by a mix of geospatial and syndication people and released in 2006 on georss.org. That website is now gone, but of course, <a href="https://web.archive.org/web/20200909171629/http://georss.org/" target="_blank">the Internet Archive's got our backs.</a> In 2017, that standard got republished by the Open Geospatial Consortium, the gods of geospatial standards, as OGC 17-002r1. I really like that quote from that version of the standard:</p>
<blockquote cite="https://docs.ogc.org/cs/17-002r1/17-002r1.html">
<p>The initial goal for designing and documenting GeoRSS was to keep the encoding of geography on the Web from fracturing into various encodings the way RSS ended up, with multiple similar implementations.</p>
<footer><a href="https://docs.ogc.org/cs/17-002r1/17-002r1.html" target="_blank"><cite>OGC GeoRSS Encoding Standard</cite></a>, 2017-08-18</footer>
</blockquote>
<p>Considering that the three namespaces we saw in the previous post appeared before GeoRSS, and that georss.org <a href="http://web.archive.org/web/20190602115923/http://www.georss.org/w3c.html" target="_blank">mentions the W3C Geo namespace</a>, it doesn't seem like they were starting well. However, the few remaining feeds that I know of that include geospatial information do use GeoRSS only, so I guess they won in the end. The fact that only geospatial experts would be using geospatial coordinates within RSS feeds, and that most GIS software only supports GeoRSS or name all of their RSS support GeoRSS, must have helped.</p>
<p>GeoRSS defines two so-called "serializations", called <em>Simple</em> and <em>GML</em>. In this post, we will only consider GeoRSS Simple; GML requires us to delve deeper into the mess that is geospatial information, so we'll see that at some other point in time. The goal is to have most feed producers, those that are not geospatial experts, use GeoRSS Simple, which is simple enough to be understandable by them, and have geospatial experts use GML, which they probably prefer. You can convert from GeoRSS Simple to GeoRSS GML, but not necessarily the other way around.</p>
<p>Here's an example of yet another way to represent a point in an RSS feed, but using GeoRSS Simple this time:</p>
<pre>
&lt;rss version="2.0" xmlns:georss="http://www.georss.org/georss/11"&gt;
&lt;channel&gt;
&lt;!-- ... --&gt;
&lt;georss:point&gt;18.5166670 33.6666670&lt;/georss:point&gt;
&lt;item&gt;
&lt;georss:point&gt;18.5166670,33.6666670&lt;/georss:point&gt;
&lt;/item&gt;
&lt;/channel&gt;
&lt;/rss&gt;
</pre>
<p>Where the other namespaces use two distinct tags to represent both coordinates of a point, GeoRSS uses only one tag, which is defined as a list of real numbers. While using one or two tags does not matter much whether you use one form or the other when using GPS coordinates, it does start to matter when you care a lot about altitude or work with other coordinate systems. GeoRSS Simple requires WGS84 (GPS) coordinates and represents elevation separately, so it won't ever matter in this serialization, but with GML, it will!</p>
<p>You may also note that in the first <code>point</code>, I used a space to separate both coordinates, whereas in the second one I used a comma. <a href="https://schemas.opengis.net/georss/1.0/schema-1.1/georss.xsd" target="_blank">The official <abbr title="XML Schema Definition">XSD</abbr></a> for GeoRSS Simple defines the point as holding a list of doubles (decimal numbers stored in 8 bytes) using the XSD <code>&lt;xs:list&gt;</code> element, which defines a list of items as being space-separated only. But <a href="https://docs.ogc.org/cs/17-002r1/17-002r1.html#20" target="_blank">section 7.3</a> of the OGC standard states that a comma is also acceptable, so anyone wishing to parse GeoRSS will have to take that into account.</p>
]]></description>
<georss:point>18.5166670 33.6666670</georss:point>
</item>
</channel>
<access:restriction relationship="allow" />
</rss>