Post about circles in GeoRSS

This commit is contained in:
~lucidiot 2023-10-22 19:22:47 +02:00
parent ea323a4948
commit 1af1620efa
1 changed files with 85 additions and 0 deletions

View File

@ -1676,6 +1676,91 @@ because astronomers need coffee to go through the night -->
<georss:relationshipTag>author-likes-the-name</georss:relationshipTag>
<georss:elev>2635</georss:elev>
</item>
<item>
<title>Going around in circles in GeoRSS</title>
<pubDate>Sun, 22 Oct 2023 19:19:32 +0200</pubDate>
<guid isPermaLink="false">georss-circle</guid>
<category domain="https://envs.net/~lucidiot/rsrsss/">Tip</category>
<category domain="https://envs.net/~lucidiot/rsrsss/">Geospatial/GeoRSS</category>
<description><![CDATA[
<p>In <a href="https://envs.net/~lucidiot/rsrsss/#georss-gml" target="_blank">yet another incredibly niche blog post</a>, I described GeoRSS GML. While working on this, I got quite confused by circles, eenough to decide to just remove any mention of circles in all of the previous GeoRSS posts.</p>
<p>The <a href="https://docs.ogc.org/cs/17-002r1/17-002r1.html" target="_blank">OGC standard</a>, which is the only currently active standard, and the original archived pages for <a href="https://web.archive.org/web/20200629173428/http://www.georss.org/simple.html" target="_blank">GeoRSS Simple</a> and <a href="https://web.archive.org/web/20200629173624/http://www.georss.org/gml.html" target="_blank">GeoRSS GML</a> do not define any specific element to describe a circle. If you want to represent a circle, you can do so using the &lt;georss:radius&gt; element, which will create a <a href="https://wiki.gis.com/wiki/index.php/Buffer_(GIS)" target="_blank">buffer</a> around a point.</p>
<figure>
<pre>
&lt;!-- GeoRSS Simple --&gt;
&lt;gml:point&gt;-24.62759969859908 -70.40503541618583&lt;/gml:point&gt;
&lt;georss:radius&gt;14.74038882&lt;/gml:radius&gt;
&lt;georss:featureName&gt;Antu, VLT-UT1&lt;/georss:featureName&gt;
&lt;georss:featureTypeTag&gt;telescope&lt;/georss:featureTypeTag&gt;
&lt;georss:relationshipTag&gt;has-nothing-to-do-with&lt;/georss:relationshipTag&gt;
&lt;georss:elev&gt;2635&lt;/georss:elev&gt;
&lt;!-- GeoRSS GML --&gt;
&lt;georss:where&gt;
&lt;gml:CircleByCenterPoint&gt;
&lt;gml:pos&gt;-24.62759969859908 -70.40503541618583&lt;/gml:pos&gt;
&lt;/gml:CircleByCenterPoint&gt;
&lt;/georss:where&gt;
&lt;georss:radius&gt;14.74038882&lt;/gml:radius&gt;
&lt;georss:featureName&gt;Antu, VLT-UT1&lt;/georss:featureName&gt;
&lt;georss:featureTypeTag&gt;telescope&lt;/georss:featureTypeTag&gt;
&lt;georss:relationshipTag&gt;has-nothing-to-do-with&lt;/georss:relationshipTag&gt;
&lt;georss:elev&gt;2635&lt;/georss:elev&gt;
</pre>
<figcaption>Examples of a circle represented as a center point and a radius in GeoRSS</figcaption>
</figure>
<p>However, <a href="https://schemas.opengis.net/georss/1.0/schema-1.1/gmlgeorss.xsd" target="_blank">the <abbr title="XML Schema Definition">XSD</abbr> defining the GeoRSS GML Profile</a> and <a href="https://schemas.opengis.net/georss/1.0/schema-1.1/georss.xsd" target="_blank">the one for GeoRSS Simple</a>, both include ways to specify a circle separately. The OGC standard <a href="https://docs.ogc.org/cs/17-002r1/17-002r1.html#7" target="_blank">has links to the schemas</a> and does not state that those schemas are not non-normative, as many other specifications do. That means that in theory, it is completely legal to use them.</p>
<h3>Reference</h3>
<dl>
<dt><code>&lt;<dfn>georss:circle</dfn>&gt;</code></dt>
<dd>A GeoRSS Simple circle. Circles are defined by their center and their radius, so three numbers should be used here: latitude, longitude as WGS84 coordinates, and the radius in meters.</dd>
<dt><code>&lt;<dfn>gml:CircleByCenterPoint</dfn>&gt;</code></dt>
<dd>A GeoRSS GML circle. Must be used within a <code>&lt;georss:where&gt;</code> element. This should have a <code>&lt;gml:pos&gt;</code> element to specify the coordinates of the center point of the circle, and a <code>&lt;gml:radius&gt;</code> element to specify the radius.</dd>
<dt><code>&lt;<dfn>gml:radius</dfn>&gt;</code></dt>
<dd>The radius of a circle. This can have an <code>uom</code> attribute to specify the unit of measurement, which is by default <code>m</code> to represent meters.</dd>
<dt><code><dfn>uom</dfn></code></dt>
<dd>A unit of measurement. <a href="https://portal.ogc.org/files/?artifact_id=20509" target="_blank">OGC GML 3.2.1 specification</a> defines its value under section 8.2.3.6. It can be either a string, without any colons, spaces, tabs, carriage returns or line breaks, or a URL. When using strings, following the <a href="https://ucum.org/" target="_blank">Unified Code for Units of Measure</a> is recommended. For example, you could use <code>m</code> for meters, <code>cm</code> for centimeters, <code>[ft_i]</code> for feet (international definition) or <code>[ft_us]</code> for U.S. feets. It is highly likely that most systems will only support meters.</dd>
</dl>
<h3>Examples</h3>
<figure>
<pre>
&lt;!-- GeoRSS Simple --&gt;
&lt;georss:circle&gt;-24.62759969859908 -70.40503541618583 14.74038882&lt;/georss:circle&gt;
&lt;georss:featureName&gt;Antu, VLT-UT1&lt;/georss:featureName&gt;
&lt;georss:featureTypeTag&gt;telescope&lt;/georss:featureTypeTag&gt;
&lt;georss:relationshipTag&gt;has-nothing-to-do-with&lt;/georss:relationshipTag&gt;
&lt;georss:elev&gt;2635&lt;/georss:elev&gt;
&lt;!-- GeoRSS GML --&gt;
&lt;georss:where&gt;
&lt;gml:CircleByCenterPoint&gt;
&lt;gml:pos&gt;-24.62759969859908 -70.40503541618583&lt;/gml:pos&gt;
&lt;gml:radius uom="m"&gt;14.74038882&lt;/gml:radius&gt;
&lt;/gml:CircleByCenterPoint&gt;
&lt;/georss:where&gt;
&lt;georss:featureName&gt;Antu, VLT-UT1&lt;/georss:featureName&gt;
&lt;georss:featureTypeTag&gt;telescope&lt;/georss:featureTypeTag&gt;
&lt;georss:relationshipTag&gt;has-nothing-to-do-with&lt;/georss:relationshipTag&gt;
&lt;georss:elev&gt;2635&lt;/georss:elev&gt;
</pre>
<figcaption>Examples of a circle represented with the secret circle geometries in GeoRSS</figcaption>
</figure>
<h3>Notes</h3>
<p>The <a href="https://doc.arcgis.com/en/arcgis-online/reference/georss.htm" target="_blank">GeoRSS documentation on ArcGIS Online</a> mentions supports for circles on GeoRSS Simple, but excludes them from GeoRSS GML. I would therefore advise against trying to use a <code>CircleByCenterPoint</code>. It is likely that the few GeoRSS implementations out there will only support <code>&lt;georss:circle&gt;</code>, if they support circles at all.</p>
<p>The <a href="https://validator.w3.org/feed/" target="_blank">W3C Feed Validation Service</a> does not support circles in either its <a href="https://github.com/w3c/feedvalidator/blob/ff89646c3f6869058dfcf5a3cf9b6ead49bbe42d/src/feedvalidator/extension.py#L211-L239" target="_blank">GeoRSS Simple validator</a> nor its <a href="https://github.com/w3c/feedvalidator/blob/ff89646c3f6869058dfcf5a3cf9b6ead49bbe42d/src/feedvalidator/extension.py#L732-L740" target="_blank">GeoRSS GML validator</a>.
<p>Circles were probably either added before <code>&lt;georss:radius&gt;</code> was introduced, or added, then partially removed when someone noticed <code>&lt;georss:radius&gt;</code> could already do the job. Another possibility is that circles and curves are far less supported by GIS software than linear geometries, so they wouldn't be that usable anyway. This raises interesting questions: what happens if you use a circle, but also add a radius around it? Do you get a larger circle? Is the radius ignored? Does it become an approximation of a circle as a polygon, as is common with GIS software that doesn't support circles? Those questions will definitely remain unanswered, as with most things about RSS, the answer of most organizations nowadays will be "who cares?". This is why we can't have nice things.</p>
]]></description>
<georss:circle>-24.62759969859908 -70.40503541618583 14.74038882</georss:circle>
<georss:featureName>Antu, VLT-UT1</georss:featureName>
<georss:featureTypeTag>telescope</georss:featureTypeTag>
<georss:relationshipTag>has-nothing-to-do-with</georss:relationshipTag>
<georss:elev>2635</georss:elev>
</item>
</channel>
<access:restriction relationship="allow" />
</rss>