Template:GeocoordinatesMapping

From Mediawiki1
Revision as of 17:25, 5 March 2010 by Admin (talk | contribs) (→‎Example)
Jump to navigationJump to search

{{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 }}
}}