Difference between revisions of "WebSchemas/GeoShapeExamples"

From W3C Wiki
Jump to: navigation, search
(first notes)
(No difference)

Revision as of 21:24, 22 June 2012


This is a WebSchemas proposal GeoShapeExamples for schema.org. See Proposals listing for more. Status: Proposal



The schema.org [1] 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

The result is confusion. 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, as hand-drawn by me just now.

In GeoRSS with RSS2,

  1. <item xmlns="http://backend.userland.com/rss2"><title></title><description></description><georss:polygon
  2. xmlns:georss="http://www.georss.org/georss">42.984695434571
  3. 17.052154541015 42.969589233399 17.108459472656 42.962722778321
  4. 17.140045166015 42.942123413087 17.166137695312 42.929763793946
  5. 17.181243896484 42.922897338868 17.212829589844 42.898178100587
  6. 17.208709716797 42.898178100587 17.177124023437 42.895431518555
  7. 17.090606689453 42.911911010743 16.964263916015 42.87208557129
  8. 16.839294433594 42.888565063477 16.833801269531 42.895431518555
  9. 16.732177734375 42.892684936524 16.725311279297 42.910537719727
  10. 16.670379638672 42.896804809571 16.656646728515 42.927017211915
  11. 16.618194580078 42.95997619629 16.658020019531 42.962722778321
  12. 16.658020019531 43.001174926758 16.603088378906 43.008041381837
  13. 16.658020019531 42.979202270508 16.857147216797 42.984695434571
  14. 17.052154541015</georss:polygon></item>
In GeoJSON,

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic


{"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,

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

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.

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)

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