WebSchemas/GeoJSON

From W3C Wiki
Jump to: navigation, search


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



Overview

This page discusses the GeoJSON topic propsal for schema.org. It should be used to describe the geo property of a Place item by linking to a GeoJSON file. The topic should contain no additional properties, with the url property from Thing being used to link to the file.

An alternative would be to allow the geo parameter to contain an URL, but that could lead to confusion as to the format of the file.

The reason for this proposal is that many websites use geojson to fetch and render geographical information from remote location, without keeping the data locally. The GeoJSON format supports all the types of geo data included in GeoCoordinates and GeoShape.

Markup example

In Microdata:

  1. <div class="leftbar" itemscope itemtype="http://schema.org/AdministrativeArea">
  2.       <div class="leftbarelem map" itemprop="geo" itemscope itemtype="http://schema.org/GeoJSON">
  3.             <meta itemprop="url" content="http://despresate.strainu.ro/maps/uat-comune/29243.geojson" />
  4.       </div>
  5.       <div class="leftbartitle">Date statistice</div>
  6.         <table cellspacing="0" cellpadding="0" width="100%" id="stats" class="leftbarelem">
  7.          <tr><th>Nume</th><td itemprop="name">Drăgănești</td></tr>
  8.          <tr itemprop="containedIn"><th>Județ </th><td><a href="judet.php?id=5" >Bihor</a></td></tr>
  9.          <tr><th>Cod SIRUTA</th><td>29243</td></tr>
  10.          <tr><th>Populație (2011)</th><td>2.889 locuitori</td></tr>
  11.          <tr><th>Suprafață</th><td>36,67 km<sup>2</sup></td></tr>
  12.          <tr><th>Densitate</th><td>78,78 loc/km<sup>2</sup></td></tr>
  13.         </table>

Discussion