Post about optional GeoRSS attributes

This commit is contained in:
~lucidiot 2023-10-08 21:16:56 +02:00
parent ec93f99cb5
commit 001ae0d3f1
1 changed files with 112 additions and 0 deletions

112
feed.xml
View File

@ -1431,6 +1431,118 @@
]]></description>
<georss:point>18.5166670 33.6666670</georss:point>
</item>
<item>
<title>Make pointier points with GeoRSS Simple</title>
<pubDate>Sun, 24 Sep 2023 21:02:51 +0200</pubDate>
<guid isPermaLink="false">georss-simple-2</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#26</link>
<description><![CDATA[
<p><a href="https://envs.net/~lucidiot/rsrsss/feed.xml#georss-simple-1" target="_blank">In a previous post</a>, I introduced GeoRSS Simple, a subset of GeoRSS, and described a fourth way to point to a location in your RSS feeds. With the W3C Geo namespace, we could add altitude information as well, but with GeoRSS, we can go even further beyond that:</p>
<pre>
&lt;rss version="2.0" xmlns:georss="http://www.georss.org/georss"&gt;
&lt;channel&gt;
&lt;item&gt;
&lt;!-- ... --&gt;
&lt;georss:point&gt;-33.8735580,151.2344385&lt;/georss:point&gt;
&lt;georss:featureName&gt;Boat Syndication Australia&lt;/georss:featureName&gt;
&lt;georss:featureTypeTag&gt;shop&lt;/georss:featureTypeTag&gt;
&lt;georss:relationshipTag&gt;has-nothing-to-do-with&lt;/georss:relationshipTag&gt;
&lt;georss:elev&gt;5.25&lt;/georss:elev&gt;
&lt;georss:floor&gt;0&lt;/georss:floor&gt;
&lt;georss:radius&gt;4.5&lt;/georss:radius&gt;
&lt;/item&gt;
&lt;/channel&gt;
&lt;/rss&gt;
</pre>
<p>Here's a description of all of those intriguing optional elements:</p>
<dl>
<dt><code>&lt;<dfn>georss:featureName</dfn>&gt;</code></dt>
<dd>The name of the thing you are referencing with that point. A feature is anything that has a geospatial location; a mountain, a country, a single atom, it doesn't matter.</dd>
<dt><code>&lt;<dfn>georss:featureTypeTag</dfn>&gt;</code></dt>
<dd>
<p>The type of that feature: whether it is a mountain, a country, etc. When unset, it defaults to <code>location</code>. There are no other defined values, as the intent was to let the community form its own taxonomy.</p>
<p>While neither the original website nor the OGC standard specify any restriction, the official XSD typed it as a <code>QName</code>, meaning an <a href="https://www.w3.org/TR/1999/REC-xml-names-19990114/#ns-qualnames" target="_blank">XML qualified name</a>, or anything you can use as the name of an XML element, with or without a namespace prefix. This means you can use something like <code>sandwich:blt</code>, but not <code>food:sandwich:blt</code> because only one colon is allowed, and you cannot use spaces. All examples in both the original website and the OGC standard never use spaces, instead preferring <a href="https://en.wikipedia.org/wiki/Kebab_case" target="_blank">kebab-case</a>. So you should probably limit yourself to a QName, or maybe just to kebab-case.</p></dd>
<dt><code>&lt;<dfn>georss:relationshipTag</dfn>&gt;</code></dt>
<dd>The relationship between the channel or item and the feature. For example, you could have a feed of sightings of toads and owls where the relationship is <code>seen-at</code>, or a feed of drawings where each drawing was <code>inspired-by</code>. The default is <code>is-located-at</code>. The relationship is always from the channel or item to the feature, not the other way around. It has the same confusing definition as a QName as <code>featureTypeTag</code>.</dd>
<dt><code>&lt;<dfn>georss:elev</dfn>&gt;</code></dt>
<dd>The elevation, in meters, with decimal and negative values allowed. The OGC standard says nothing about this, but this tag does not make any sense with GeoRSS GML since it supports three-dimensional coordinates.</dd>
<dt><code>&lt;<dfn>georss:floor</dfn>&gt;</code></dt>
<dd>The floor of a building, as any integer, including negative values. Since there are <a href="https://en.wikipedia.org/wiki/Storey#Numbering" target="_blank">two different ways to number floors</a> depending on which part of the world you are in, you'll have to guess which is the correct one!</dd>
<dt><code>&lt;<dfn>georss:radius</dfn>&gt;</code></dt>
<dd>Geospatial people probably know this better as a <em>buffer</em>. This means the location you are actually referencing is anything that is some amount of meters around the coordinates. For a point, this will create a circle, but since we can go beyond points with GeoRSS, this can add more complicated borders. <a href="https://wiki.gis.com/wiki/index.php/Buffer_(GIS)" target="_blank">This page has some examples</a>.</dd>
</dl>
<p>Next time, we will finally do more than just point at things, and use the other geometry types that GeoRSS offers.</p>
]]></description>
<georss:point>-33.8735580 151.2344385</georss:point>
<georss:featureName>Boat Syndication Australia</georss:featureName>
<georss:featureTypeTag>shop</georss:featureTypeTag>
<georss:relationshipTag>has-nothing-to-do-with</georss:relationshipTag>
<georss:elev>5.25</georss:elev>
<georss:floor>0</georss:floor>
<georss:radius>4.5</georss:radius>
</item>
<item>
<title>Completely miss the point with GeoRSS Simple</title>
<pubDate>Sun, 08 Oct 2023 19:45:50 +0200</pubDate>
<guid isPermaLink="false">georss-simple-3</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#23</link>
<description><![CDATA[
<p>In <a href="https://envs.net/~lucidiot/rsrsss/feed.xml#georss-simple-2" target="_blank">yet another post</a> of my series on geographical information in RSS, I introduced GeoRSS, and in particular GeoRSS Simple, its simpler version. I only showed a fourth way to add a point to your feeds, but some feeds might need to reference more than just a single point. GeoRSS Simple lets you go further with a few extra types of geometry:</p>
<dl>
<dt><code>&lt;<dfn>georss:line</dfn>&gt;</code></dt>
<dd>In the geospatial world, a line is not just between two points, it's a series of two or more points. In GeoRSS, it is represented by a long list of numbers, always in pairs.</dd>
<dt><code>&lt;<dfn>georss:box</dfn>&gt;</code></dt>
<dd>Two pairs of coordinates, representing the lower-left and upper-right corners of a rectangle.</dd>
<dt><code>&lt;<dfn>georss:polygon</dfn>&gt;</code></dt>
<dd>This is the geometric, and not the geospatial definition of a polygon. In <abbr title="Geographical Information Systems">GIS</abbr>, a polygon has multiple linear rings: one exterior ring, and zero or more interior rings that draw holes inside of the polygon. A linear ring is the more common definition of a polygon: a line that starts and ends at the same point. Here, we can only have the exterior ring of a polygon, so this is actually a linear ring. It is represented just like a line, as pairs of coordinates. There are at least three points per polygon, and the first and last must be equal.</dd>
</dl>
<p>Here are some examples of each of those tags:</p>
<pre>
&lt;!-- Part of Haaldersbroekerdwarsstraat, a long street name in the Netherlands --&gt;
&lt;georss:line&gt;52.4718867,4.8277792 52.4721926,4.8275892 52.4729501,4.8270419&lt;/georss:line&gt;
&lt;!-- Some random grass not so far away from there --&gt;
&lt;georss:box&gt;52.5662344 4.7976189 52.5676983 4.8013674&lt;/georss:box&gt;
&lt;!-- A building called ESPRESSO at the Very Large Telescope,
because astronomers need coffee to go through the night --&gt;
&lt;georss:polygon&gt;
-24.6273416,-70.4045081
-24.6273922,-70.4044894
-24.6274264,-70.4046014
-24.6274789,-70.4045820
-24.6276119,-70.4045330
-24.6275341,-70.4042780
-24.6274634,-70.4043041
-24.6274763,-70.4043463
-24.6273109,-70.4044074
-24.6273416,-70.4045081
&lt;/georss:polygon&gt;
</pre>
<p>You can only specify one of these geometries at once, along with all the optional elements that I described in the previous post. Those new shapes enable some new interesting use cases for feeds:</p>
<ul>
<li>Blogging about a cross-country hike, with the GPS track of each day as a <code>&lt;georss:line&gt;</code>.</li>
<li>A feed warning about upcoming solar eclipses, with a <code>&lt;georss:line&gt;</code> to show where the shadow of the eclipse will be moving on the Earth's surface. Maybe with a <code>&lt;georss:radius&gt;</code> as the radius of the shadow to do some buffering and not only show the center of that shadow.</li>
<li>A feed of weather reports, with the <code>&lt;channel&gt;</code> including the location of the weather station, or the area where the reports apply.</li>
<li>A feed of interesting architecture, with a <code>&lt;georss:polygon&gt;</code> around the circumference of each featured building.</li>
<li>A feed of triangulated radio signals heard by a whole bunch of radio equipment scattered around an area, either as a <code>&lt;georss:point&gt;</code> with a <code>&lt;georss:radius&gt;</code> to show the precision, or as a <code>&lt;georss:polygon&gt;</code> showing a triangle of the receivers that detected the signal.</li>
<li>A feed for any temporary changes to bus routes and timetables, with a <code>&lt;georss:point&gt;</code> when a stop is skipped or moved, a <code>&lt;georss:line&gt;</code> when a line gets rerouted, etc.</li>
</ul>
<p>You can probably use any of the geoportals out there, the websites that list open geographical data mostly from governments, and get plenty more ideas for GeoRSS feeds.</p>
<p>And since we are now done with GeoRSS Simple, we'll look at GeoRSS GML next time.</p>
]]></description>
<georss:line>52.4718867,4.8277792 52.4721926,4.8275892 52.4729501,4.8270419</georss:line>
<georss:featureName>Haaldersbroekerdwarsstraat</georss:featureName>
<georss:featureTypeTag>street</georss:featureTypeTag>
<georss:relationshipTag>has-nothing-to-do-with</georss:relationshipTag>
</item>
</channel>
<access:restriction relationship="allow" />
</rss>