Help:Datatype "Geographic coordinates"

Maps extension
Installation and Configuration
Displaying maps
Customizing maps
    ↪  Leaflet  •  Google Maps
Displaying GeoJSON
Converting coordinates
SMW integration
Storing coordinates
Aggregating onto a map
On this page
Geographic coordinates
Holds coordinates describing geographic locations
Further information
Provided by: Maps (Semantic Maps)
Since version: 1.0
Until version: still in use
Datatype ID:
In this wiki: Geographic coordinates
Table of Contents

The datatype geographic coordinates is used for geographic locations. Each value specifies a single point on the surface of Earth by giving latitude and longitude coordinates in decimal degrees, or in degrees, minutes and seconds.

Since Semantic MediaWiki 1.5.0Released on 7 March 2010 and compatible with MW 1.14.x - 1.17.x., this datatype is no longer part of extension "Semantic MediaWiki"Allows to store and query data annotated to pages but is instead defined in extension "Maps"Allows embedding of dynamic maps, geocoding and geospatial operations (formerly extension "Semantic Maps"Provides the ability to view and edit coordinate data stored with the Semantic MediaWiki extension), which also provides further features for visualising values of this type on interactive maps:

Geo formats

These are the geo related result formats provided:

Declaration and Usage[edit]

A property of this type can be declared by writing [[Has type::Geographic coordinates]] on the property page.

Values are specified by giving the values of latitude and longitude, separated by a comma or a semicolon. Various notations can be used for the parts of a coordinate. In particular, their values can be written as decimal numbers (as in "48.854325°") or using minutes and seconds (as in "48°51′15,57″"). The letters "N", "S", W" and "E" are available to denote the points of the compass North, South, West, and East, but it is also possible to use signed numbers (with negative coordinates for denoting West/South). If no letters are given, then the default order is to supply the latitude (North/South) before the longitude (East/West).

The acceptable symbols for minutes and seconds are:

  • The prime ′ and double prime ″ symbols (or their character entity references &prime; and &Prime;, or their decimal character references &#8242; and &#8243;)
  • apostrophe ' and double-quote " on most computer keyboards
  • one acute accent symbol ´ and two acute accent symbols ´´ (or its character entity reference &acute;, or its decimal character reference &#180;).

You can optionally follow the latitude and longitude coordinates with the degree symbol ° (or its character entity reference &deg; or its decimal character reference &#176;).

The net of these rules is that most coordinate formats, including GeoURL format and geotag format will be recognized. If not, you can use a semantic template.


Below are some examples of correct coordinates. As the symbols used for degrees, minutes, and seconds can be confused with a variety of other similar symbols, it can be helpful to copy directly from these examples.

[[Test geographic coordinate:: 32°42′54″ N, 117°9′45″ W]]
[[Test geographic coordinate:: 32.715° N, 117.163° W]]
[[Test geographic coordinate:: -32.715°, -77.03201°]]

Properties using Geographic coordinate can use service links to generate links to map services for coordinates; take a look at Property:Has coordinates and the factbox of pages using it such as Berlin.

API example

Semantic search[edit]

Using coordinate properties for searching pages can be done in a similar fashion as for all other properties; see Semantic search. As with any property, you can use the + wildcard to select all pages with some value for a geographic coordinate property, for example

{{#ask: [[Test geographic coordinate::+]] }}