WebSchemas/GeoShapeExamples

From W3C Wiki


This is an archived WebSchemas proposal GeoShapeExamples for schema.org. See Proposals listing for more. Note: active schema.org development is now based at github



The schema.org GeoShape class is under-specified, in particular lacking examples.

GeoShape (and GeoCoordinates) are based on IPTC rNews 1.0's GeoCoordinates, with some changes:

  • the point property was promoted to a first class type for schema.org
  • the definitions became confusing since points in rNews are always expressed as decimal pairs, rather than as complex entities.
  • rNews' examples suffer from HTML formatting errors anyway
  • check this against discussion thread for details.

The result is confusing. This page serves to collect examples that can be used to improve the spec.


Korcula example

From a thread on the geowankers mailing list.


Here's a crude approximation of the island of Korcula, in Croatia, which is home to a city of the same name. We will be lazy here and not write the accent over the 'c'. Nearby in the Web, Wikipedia has pages for both island and city, http://en.wikipedia.org/wiki/Kor%C4%8Dula and http://en.wikipedia.org/wiki/Kor%C4%8Dula_(town)

The polygon vectors were drawn using the openlayers vector-formats demo.

In GeoRSS with RSS2,

<item xmlns="http://backend.userland.com/rss2">
<title></title><description></description>
<georss:polygon
xmlns:georss="http://www.georss.org/georss">42.984695434571
17.052154541015 42.969589233399 17.108459472656 42.962722778321
17.140045166015 42.942123413087 17.166137695312 42.929763793946
17.181243896484 42.922897338868 17.212829589844 42.898178100587
17.208709716797 42.898178100587 17.177124023437 42.895431518555
17.090606689453 42.911911010743 16.964263916015 42.87208557129
16.839294433594 42.888565063477 16.833801269531 42.895431518555
16.732177734375 42.892684936524 16.725311279297 42.910537719727
16.670379638672 42.896804809571 16.656646728515 42.927017211915
16.618194580078 42.95997619629 16.658020019531 42.962722778321
16.658020019531 43.001174926758 16.603088378906 43.008041381837
16.658020019531 42.979202270508 16.857147216797 42.984695434571
17.052154541015</georss:polygon></item>

In GeoJSON,

{"type":"Feature", "properties":{}, "geometry":{"type":"Polygon",
"coordinates":[[[17.052154541015, 42.984695434571], [17.108459472656,
42.969589233399], [17.140045166015, 42.962722778321],
[17.166137695312, 42.942123413087], [17.181243896484,
42.929763793946], [17.212829589844, 42.922897338868],
[17.208709716797, 42.898178100587], [17.177124023437,
42.898178100587], [17.090606689453, 42.895431518555],
[16.964263916015, 42.911911010743], [16.839294433594, 42.87208557129],
[16.833801269531, 42.888565063477], [16.732177734375,
42.895431518555], [16.725311279297, 42.892684936524],
[16.670379638672, 42.910537719727], [16.656646728515,
42.896804809571], [16.618194580078, 42.927017211915],
[16.658020019531, 42.95997619629], [16.658020019531, 42.962722778321],
[16.603088378906, 43.001174926758], [16.658020019531,
43.008041381837], [16.857147216797, 42.979202270508],
[17.052154541015, 42.984695434571]]]}, "crs":{"type":"name",
"properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}}}

In KML,

<kml xmlns="http://earth.google.com/kml/2.0">
<Folder><name>OpenLayers
export</name>
<description>Exported on Fri Jun 22 2012 22:51:32 GMT+0200 (CEST)</description>
<Placemark>
 <name>OpenLayers_Feature_Vector_354</name>
 <description>No description available</description>
 <Polygon>
  <outerBoundaryIs>
    <LinearRing>
      <coordinates>17.052154541015,
42.984695434571 17.108459472656, 42.969589233399 17.140045166015,
42.962722778321 17.166137695312, 42.942123413087 17.181243896484,
42.929763793946 17.212829589844, 42.922897338868 17.208709716797,
42.898178100587 17.177124023437, 42.898178100587 17.090606689453,
42.895431518555 16.964263916015, 42.911911010743 16.839294433594,
42.87208557129 16.833801269531, 42.888565063477 16.732177734375,
42.895431518555 16.725311279297, 42.892684936524 16.670379638672,
42.910537719727 16.656646728515, 42.896804809571 16.618194580078,
42.927017211915 16.658020019531, 42.95997619629 16.658020019531,
42.962722778321 16.603088378906, 43.001174926758 16.658020019531,
43.008041381837 16.857147216797, 42.979202270508 17.052154541015,
42.984695434571
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
</Folder>
</kml>

(aside: RDF people might recognise some RDFishness in KML's GML heritage...)

schema.org version

... so what might we say of it in Schema.org?

Well, maybe we would say it's an Island? Pretty tough, http://schema.org/Landform has Volcano and Continent but no island. Are there standard medium-sized lists of expected values we should be using here?

Ok so picking from http://schema.org/Place ... let's go with http://schema.org/TouristAttraction. Maybe we'll describe the island, and then use Place's containedIn relation to describe the city (also called Korcula) that's on the island.

So, it's a thing of type http://schema.org/TouristAttraction ... it has a 'geo' property pointing to a thing that is of type http://schema.org/GeoShape ... which in turn has a 'polygon' property whose value is the Text,

"17.052154541015, 42.984695434571 17.108459472656, 42.969589233399 17.140045166015, 42.962722778321 17.166137695312, 42.942123413087 17.181243896484, 42.929763793946 17.212829589844, 42.922897338868 17.208709716797, 42.898178100587 17.177124023437, 42.898178100587 17.090606689453, 42.895431518555 16.964263916015, 42.911911010743 16.839294433594, 42.87208557129 16.833801269531, 42.888565063477 16.732177734375, 42.895431518555 16.725311279297, 42.892684936524 16.670379638672, 42.910537719727 16.656646728515, 42.896804809571 16.618194580078, 42.927017211915 16.658020019531, 42.95997619629 16.658020019531, 42.962722778321 16.603088378906, 43.001174926758 16.658020019531, 43.008041381837 16.857147216797, 42.979202270508 17.052154541015, 42.984695434571".

As discussed earlier, the first and last pairs are identical.

It's also btw the alleged-birthplace-of http://en.wikipedia.org/wiki/Marco_Polo but let's get the basics working first :)

TODO:

  • Microdata and RDFa examples
  • Suggest concrete example for specification
  • Suggested fixes to definitions
  • Check with IPTC rNews team