Template:GeocoordinatesMapping: Difference between revisions

From DBpedia Mappings
Jump to navigationJump to search
No edit summary
Line 48: Line 48:
{{#if:{{{ontologyProperty|}}}|<tr>
{{#if:{{{ontologyProperty|}}}|<tr>
<td> ontology property</td>
<td> ontology property</td>
<td>[[OntologyProperty:{{#replace:{{{ontologyProperty}}}|:|/}}]]</td>
<td>[[OntologyProperty:{{#replace:{{{ontologyProperty}}}|:|/}}|{{{ontologyProperty}}}]]</td>
</tr>}}
</tr>}}
</table></includeonly>
</table></includeonly>

Revision as of 15:13, 22 April 2010

{{GeocoordinatesMapping}} maps one or more template properties containing geo coordinate values to ontology properties. It can combine several values (containing e.g. degree, minute and second) to one coordinate.

Usage

{{GeocoordinatesMapping
| coordinates      =
| ontologyProperty =
}}
{{GeocoordinatesMapping
| latitude         =
| longitude        =
| ontologyProperty =
}}
{{GeocoordinatesMapping
| latitudeDirection  =
| latitudeDegrees    =
| latitudeMinutes    =
| latitudeSeconds    =
| longitudeDirection =
| longitudeDegrees   =
| longitudeMinutes   =
| longitudeSeconds   =
| ontologyProperty   =
}}

Meanings

  • coordinates: Use the coordinates parameter if the geo coordinates are covered by one template property.


  • latitude
  • longitude


  • latitudeDirection
  • latitudeDegrees
  • latitudeMinutes
  • latitudeSeconds
  • longitudeDirection
  • longitudeDegrees
  • longitudeMinutes
  • longitudeSeconds


  • ontologyProperty

Example

Geo coordinates are often distributed to four or six properties: for latitude and longitude and the corresponding degree, minute, second, south/north, east/west. See template Infobox Settlement.

{{ Infobox settlement
|latd = 39  |latm = 52  |latNS = N
|longd = 32 |longm = 52 |longEW = E
...
}}

The template Settlement contains the template properties lat_deg, lat_min, lat_sec, lat_dir, long_deg, long_min, long_sec, long_dir from which the DBpedia parser named GeocoordinatesMapping has to generate correct latitude and longitude values and write them as GeoNames triples. Here the template GeocoordinatesMapping is used.

{{TemplateMapping
| mapToClass = Settlement
| mappings = 
  {{GeocoordinatesMapping | latitudeDirection = lat_dir | latitudeDegrees = lat_deg | latitudeMinutes = lat_min | latitudeSeconds = lat_sec | longitudeDirection = long_dir | longitudeDegrees = long_deg | longitudeMinutes = long_min | longitudeSeconds = long_sec }}
}}