Templat:Coord

Daripada Wikipedia, ensiklopedia bebas.
Lompat ke: pandu arah, cari
Padlock.svg

Templat risiko tinggi ini telah dilindungi dari suntingan bagi menghalang laku musnah. (log perlindungan). Sila bincangkan perubahan pada laman perbualan atau mohon nyahlindung. Anda boleh gunakan {{editprotected}} pada laman perbualan untuk meminta bantuan dari penyelia bagi melakukan suntingan anda.

Documentation icon Pendokumenan templat[lihat] [sunting] [sejarah] [nyahcache]
Jalan pintas:

Panduan pantas

Panduan ringkas
Untuk membubuh 57°18′22.5″U 4°27′32.7″B / 57.30625°U 4.459083°B / 57.30625; -4.459083 di bahagian atas rencana, gunakan
{{Coord|57|18|22.5|N|4|27|32.7|W|display=title}}

Koordinat ini dinyatakan dalam darjah, minit, dan saat arka.

Untuk membubuh 44°06′43″U 87°54′47″B / 44.112°U 87.913°B / 44.112; -87.913 di bahagian atas rencana, gunakan
{{Coord|44.112|N|87.913|W|display=title}}

atau

{{Coord|44.112|-87.913|display=title}}

Koordinat ini dinyatakan dalam darjah perpuluhan.

Parameter koordinat bukan wajib menyusuli longitud dan dipisahkan dengan tanda garis bawah ("_"):

Parameter koordinat bukan wajib selanjutnya dipisahkan dengan tanda paip ("|"):

  • display
    display=inline (tentu awal) untuk dipaparkan dalam isi rencana sahaja,
    display=title untuk dipaparkan di paras tajuk, atau
    display=inline,title untuk dipaparkan di kedua-dua tempat.
  • name
    name=X untuk menandakan tempatnya pada peta (tentu awalnya ialah PAGENAME)

Maka: {{Coord|44.117|-87.913|dim:30_region:US-WI_type:event

|display=inline,title|name=accident site}}

Tujuan

{{Coord}} provides a standard notation for encoding locations by their latitude and longitude coordinates. It is primarily for specifying the WGS84 geographic coordinates of locations on Earth. However, it can also encode locations on natural satellites, dwarf planets, and planets other than Earth.

  • To specify celestial coordinates, use {{sky}} instead.
  • Tag articles which lack coordinates (but need them) with {{coord missing}}.
  • If the subject's location is truly unknown or disputed, note this with {{coord unknown}}.

See also Wikipedia:WikiProject Geographical coordinates.

Features

Latitude and longitude may be specified (with appropriate precision) either in decimal notation or as degrees/minutes/seconds. By default, coordinates appear in the format used to specify them. However, the format= parameter can be used to force display in a particular format.

The template displays the formatted coordinates with a hyperlink to GeoHack. GeoHack displays information customized to the location, including links to external mapping services.

For terrestrial locations, a blue globe (Erioll world.svg) appears to the left of the hyperlink. Clicking on the globe activates the WikiMiniAtlas (requires JavaScript).

By default, coordinates appear "in line" with the adjacent text. However, the display= parameter can be used to move the coordinates up near the page title—or display them in both places at once.

The template outputs coordinates in three formats:

  • Degree/minutes/seconds ("DMS", precision is degrees, or degrees/minutes, or degrees/minutes/seconds, based on input precision).
  • Decimal degrees (varying the number of decimal places based on input precision)
  • Geo microformat.

Logged-in users can customize how coordinates appear in their browsers.

Caveats

The template must not be modified without prior discussion.

Tools which read Wikipedia database dumps (such as Google Earth) often ignore inline coordinates. To ensure that coordinates are seen by these tools, one set should be displayed in the title. See How do I get my Wikipedia article to show up in the Google Earth Geographic Web layer?. However, if multiple title coordinates appear on a single page, they will overlap, making them illegible.

Superseded templates

This single template supersedes {{coor d}}, (and others in that family which have since been redirected to it), plus the Geolinks and Mapit templates. Most parameters can be used as before – see Usage.

Examples:

{{coord|10.2|N|-20.3|E|type:city}} Replaces {{coor d|10.2|N|-20.3|E|city}}
{{coord|44.4|-111.1|type:city_region:US|display=inline,title}} Replaces {{Geolinks-US-cityscale|44.4|-111.1}}
{{coord|51.01234|-1.56789|type:landmark_region:GB|display=inline,title}} Replaces {{Geolinks-UK-buildingscale|51.01234|-1.56789}}
{{coord|-35.5|150.1|type:landmark_region:AU|display=inline,title}} Replaces {{Mapit-AUS-suburbscale|lat=-35.5|long=150.1}}
{{coord|12|34|12|N|45|33|45|W|display=title}} Replaces {{CoorHeader|12|34|12|N|45|33|45|W}}

Penggunaan

{{coord|latitude|longitude|coordinate parameters|template parameters}}
{{coord|dd|N/S|dd|E/W|coordinate parameters|template parameters}}
{{coord|dd|mm|N/S|dd|mm|E/W|coordinate parameters|template parameters}}
{{coord|dd|mm|ss|N/S|dd|mm|ss|E/W|coordinate parameters|template parameters}}

The hemisphere identifiers (N/S) and (E/W), if used, must be adjacent to the enclosing pipe "|" characters, and cannot be preceded or succeeded by spaces.

There are two kinds of parameters, all optional:

  • Coordinate parameters are parameters that {{Coord}} passes to the map server. These have the format parameter:value and are separated from each other by the underscore character ( _ ). The supported coordinate parameters are dim:, globe:, region:, scale:, source:, and type:. See coordinate parameters for details and examples.
  • Template parameters are parameters used by the {{Coord}} template. These have format parameter=value and are separated from each other by the pipe character ( | ). The supported template parameters are display=, format=, name=, and notes=.
  • display= can be one of the following:
  • display=inline – Display the coordinate inline (default)
  • display=title – Display the coordinate near the article title (replaces {{coor title dms}} family)
    • shortcut: display=t
  • display=inline,title – Display the coordinate both inline and at title (replaces {{coor at dms}} family)
    • shortcut: display=it
  • display=title,inline has the same effect as display=inline,title
Note: the title attribute indicates that the coordinates apply to the entire article, and not just one of (perhaps many) places mentioned in it — so it should only be omitted in the latter case.
  • format= can be used to force dec or dms coordinate display.
  • format=dec reformats the coordinates to decimal degrees format.
  • format=dms reformats the coordinates to degrees | minutes | seconds format.
  • name= can be used to annotate inline coordinates for display in map services such as the WikiMiniAtlas. If omitted, the article title (PAGENAME) is assumed.
Note: a name= parameter causes {{Coord}} to emit an hCard microformat using that name, even if used within an existing hCard. Do not use when the name is that of a person (e.g for a gravesite), as the generated hCard would be invalid. Also, do not use square brackets in names.
  • notes= specifies text to be displayed immediately following the coordinates. This is primarily intended for adding footnotes to title coordinates.

Contoh

{{coord|43.651234|-79.383333}} 43°39′04″U 79°23′00″B / 43.651234°U 79.383333°B / 43.651234; -79.383333 Toronto – Fully decimal – N & W
{{coord|43.65|-79.38}} 43°39′U 79°23′B / 43.65°U 79.38°B / 43.65; -79.38 Toronto – less precise
{{coord|43.6500|-79.3800}} 43°39′00″U 79°22′48″B / 43.6500°U 79.3800°B / 43.6500; -79.3800 Toronto – medium precision with trailing zeroes
{{coord|43.651234|N|79.383333|W}} 43°39′04″U 79°23′00″B / 43.651234°U 79.383333°B / 43.651234; -79.383333 Toronto – decimal with Northing & Westing
{{coord|43|29|N|79|23|W}} 43°29′U 79°23′B / 43.483°U 79.383°B / 43.483; -79.383 Toronto – degrees & minutes
{{coord|43|29|4|N|79|23|0|W}} 43°29′4″U 79°23′0″B / 43.48444°U 79.383333°B / 43.48444; -79.383333 Toronto – degrees, minutes & seconds
{{coord|43|29|4.5|N|79|23|0.5|W}} 43°29′4.5″U 79°23′0.5″B / 43.484583°U 79.383472°B / 43.484583; -79.383472 Toronto – degrees, minutes, seconds & fractions of seconds
{{coord|55.752222|N|37.615556|E}} 55°45′08″U 37°36′56″T / 55.752222°U 37.615556°T / 55.752222; 37.615556 Moscow – N & E
{{coord|55.752222|N|37.615556|E|format=dms}} 55°45′08″U 37°36′56″T / 55.752222°U 37.615556°T / 55.752222; 37.615556 Convert to dms format
{{coord|39.098095|-94.587307|format=dms}} 39°05′53″U 94°35′14″B / 39.098095°U 94.587307°B / 39.098095; -94.587307 Decimal conversion without N/S/E/W
{{coord|55.752222|N|37.615556|E|format=dec|name=Moscow}} 55°45′08″U 37°36′56″T / 55.752222°U 37.615556°T / 55.752222; 37.615556 (Moscow) Convert to decimal and label on some maps
{{coord|33|55|S|18|25|E}} 33°55′S 18°25′T / 33.917°S 18.417°T / -33.917; 18.417 Cape Town – S & E
{{coord|35|00|N|105|00|E}} 35°00′U 105°00′T / 35°U 105°T / 35; 105 People's Republic of China
{{coord|22|54|30|S|43|14|37|W}} 22°54′30″S 43°14′37″B / 22.90833°S 43.24361°B / -22.90833; -43.24361 Rio – S & W
{{coord|22|S|43|W}} 22°S 43°B / 22°S 43°B / -22; -43 A degree confluence.
{{coord|52|28|N|1|55|W|notes=<ref>{{cite web|url=http://www.fallingrain.com/world/UK/0/Birmingham.html|title=Birmingham}}</ref>|display=inline,title|region:GB_type:city}} 52°28′U 1°55′B / 52.467°U 1.917°B / 52.467; -1.917[1]Koordinat: 52°28′U 1°55′B / 52.467°U 1.917°B / 52.467; -1.917[1] Birmingham – with display, notes, and parameter settings; note display also in title of this page.

Rujukan

Parameter-parameter koordinat

The first unnamed parameter following the longitude is an optional string of coordinate parameters, separated by underscores. These parameters help GeoHack select suitable map resources, and they will become more important when Wikimaps becomes fully functional.

Jenis:T

Parameter type: menyatakan jenis lokasi untuk pemetaan songsang (cth. memilih ikon penanda di WikiMiniAtlas).

Ia juga menetapkan skala peta, tetapi boleh dibatalkan oleh dim: atau scale:.

Valid types are:

T Huraian Skala peta
country (cth. "type:country") 1:10,000,000
satellite satelit geo-pegun 1:10,000,000
adm1st Unit pentadbiran negara peringkat pertama (negeri, wilayah) 1:1,000,000
adm2nd Unit pentadbiran negara peringkat kedua (daerah) 1:300,000
adm3rd Unit pentadbiran negara peringkat ketiga 1:100,000
city(pop) Bandaraya, bandar, kampung, perumahan, mana-mana petempatan manusia (termasuk yang tidak diperbadankan/ditinggalkan) yang dinyatakan bilangan penduduk
Tanda koma dalam pop diabaikan; jangan letakkan jarak.
1:30,000 ... 1:300,000
city Bandaraya, bandar, kampung, perumahan, mana-mana petempatan manusia (termasuk yang tidak diperbadankan/ditinggalkan) tanpa dinyatakan bilangan penduduk
Dilayan seperti bandar kecil.
1:100,000
airport Lapangan terbang 1:30,000
mountain Puncak, banjaran gunung, bukit, terumbu karang 1:100,000
isle Pulau 1:100,000
waterbody Teluk, tasik, kolam, lagun, muara, laut pedalaman, air terjun 1:100,000
forest Hutan 1:50,000
river Sungai, terusan, caruk, anak sungai 1:100,000
glacier Glasier 1:50,000
event one-time or regular events and incidents that occurred at a specific location, including battles, earthquakes, festivals, and shipwrecks 1:50,000
edu schools, colleges, and universities 1:10,000
pass mountain passes 1:10,000
railwaystation stations, stops, and maintenance areas of railways and trains, including railroad, metro, rapid transit, underground, subway, elevated railway, etc. 1:10,000
landmark buildings (including factories, museums, theatres, and power plants but excluding schools and railway stations), caves, cemeteries, cultural landmarks, geologic faults, headlands, intersections, mines, ranches, roads, structures (including antennas, bridges, castles, dams, factories, lighthouses, monuments, and stadiums), tourist attractions, valleys, and other points of interest 1:10,000
Default scale: if no type is used or the type is not defined in the geohack extension 1:300,000
Contoh
T Markup Hasil
waterbody {{coord|46|43|N|7|58|E|type:waterbody}} 46°43′U 7°58′T / 46.717°U 7.967°T / 46.717; 7.967
skala:N

Parameter scale: menyatakan skala peta yang dikehendaki sebagai 1:N untuk membatalkan skala yang dibayankan oleh mana-mana parameter type:.

GeoHack menggunakan scale: untuk memilih skala peta untuk monitor komputer 72 dpi. Jika tiada perameter dim:, type:, or scale:, GeoHack menggunakan skala tentu awal 1:300,000.

Contoh
Subjek Skala Markup Hasil
Big Ben 1:500 {{coord|51.500611|N|0.124611|W|scale:500}} 51°30′02″U 0°07′29″B / 51.500611°U 0.124611°B / 51.500611; -0.124611
Istana Westminster 1:5,000 {{coord|51.5006|N|0.1246|W|scale:5000}} 51°30′02″U 0°07′29″B / 51.5006°U 0.1246°B / 51.5006; -0.1246
Kota Westminster 1:50,000 {{coord|51.501|N|0.125|W|scale:50000}} 51°30′04″U 0°07′30″B / 51.501°U 0.125°B / 51.501; -0.125
London Raya 1:500,000 {{coord|51.50|N|0.12|W|scale:500000}} 51°30′U 0°07′B / 51.50°U 0.12°B / 51.50; -0.12
dim:D

Parameter dim: menyatakan diameter bulatan pemandangan yang bertengahkan koordinat. Walaupun unit ukuran tentu awalnya ialah meter, namun akhiran km boleh dibubuh untuk menyatakan kilometer.

GeoHack menggunakan dim: untuk memilih skala peta supaya bulatan pemandangan berada pada diameter kira-kira 10 sentimeter (4 in) dalam monitor komputer 72 dpi. Jika tiadanya dim:, type:, atau scale:, GeoHack menggunakan bulatan pemandangan tentu awal 30 kilometer (19 bt).

Contoh
Subjek Diameter pemandangan Markup Hasil
Hemisfera Barat 10,000 kilometer (6,200 bt) {{coord|0|N|90|W|dim:10000km}} 0°U 90°B / 0°U 90°B / 0; -90
Ohio 400 kilometer (250 bt) {{coord|40.5|-82.5|dim:400km}} 40°30′U 82°30′B / 40.5°U 82.5°B / 40.5; -82.5
Dresden 20,000 meter (12 bt) {{coord|51.033|13.73|dim:20000}} 51°01′59″U 13°43′48″T / 51.033°U 13.73°T / 51.033; 13.73
Patung Liberty 100 meter (330 ka) {{coord|40.6892|-74.0445|dim:100}} 40°41′21″U 74°02′40″B / 40.6892°U 74.0445°B / 40.6892; -74.0445
region:R

Parameter region: menyatakan kawasan politik untuk koordinat daratan, digunakan untuk memilih sumber peta yang bersesuaian. Jika tiada parameter region:, GeoHack akan cuba menentukan kawasannya dari koordinat.

Kawasannya harus dinyatakan sebagai kod negara ISO 3166-1 alpha-2 dwihuruf atau kod rantau ISO 3166-2.

Contoh kod ISO 3166-1 alpha-2:


Contoh kod ISO 3166-2:


Selain itu, dua unsur kod tetapan Wiki boleh digunakan bersama {{coord}}:

  • XZ untuk objek di dalam atau atas perairan antarabangsa (serupa dengan UN/LOCODE).
  • ZZ untuk kegunaan dalam contoh.
Contoh
Kawasan tumpuan Kawasan Markup Hasil
Switzerland CH  {{coord|46.9524|N|7.4396|E|region:CH}}  46°57′09″U 7°26′23″T / 46.9524°U 7.4396°T / 46.9524; 7.4396
Berlin, Jerman DE-BE  {{coord|52.5164|N|13.3775|E|region:DE-BE}}  52°30′59″U 13°22′39″T / 52.5164°U 13.3775°T / 52.5164; 13.3775
globe:G

Parameter globe: menentukan planet, planet kerdil, atau satelit semula jadi yang terletaknya koordinat. Selain earth (yang ditentu awal), nilai-nilai yang boleh digunakan ialah: mercury, venus, moon, mars, phobos, deimos, ceres, ganymede, callisto, io, europa, mimas, enceladus, tethys, dione, rhea, titan, hyperion, iapetus, phoebe, miranda, ariel, umbriel, titania, oberon, triton, and pluto.

Sampel
Subjek G Markup Hasil
Kawah Kittu ganymede {{coord|0.4|N|334.6|W|globe:ganymede}} 0°24′U 334°36′B / 0.4°U 334.6°B / 0.4; -334.6
Pendarat Viking 2 mars {{coord|48.269|N|225.990|W|globe:mars}} 48°16′08″U 225°59′24″B / 48.269°U 225.990°B / 48.269; -225.990
Kawah Mozart mercury {{coord|8|N|190.5|W|globe:mercury}} 8°00′U 190°30′B / 8°U 190.5°B / 8; -190.5
Pendarat Apollo 11 moon {{coord|0|40|26.69|N|23|28|22.69|E|globe:moon}} 0°40′26.69″U 23°28′22.69″T / 0.6740806°U 23.4729694°T / 0.6740806; 23.4729694
Kawah Ksa titan {{coord|14.0|N|65.4|W|globe:titan}} 14°00′U 65°24′B / 14.0°U 65.4°B / 14.0; -65.4
Pendarat Venera 13 venus {{coord|7.5|S|303|E|globe:venus}} 7°30′S 303°00′T / 7.5°S 303°T / -7.5; 303
Kawah Stickney phobos {{coord|1|N|49|W|globe:phobos}} 1°U 49°B / 1°U 49°B / 1; -49

Untuk glob selain Bumi, {{coord}} tidak menggunakan sistem rujukan tertentu (berbanding WGS84 di Bumi). Memandangkan templat ini melalai ke garis bujur timur, maka arah |W| mesti dinyatakan untuk glob yang mengukur garis bujur ke arah barat. Pada masa ini, pemetaan terhad disediakan untuk Marikh dan Bulan, dan tiada untuk jasad angkasa yang lain. Untuk koordinat samawi, gunakan {{Sky}}.

source:S

#REDIRECTen:Wikipedia:WikiProject Geographical coordinates/source:
Laman ini ialah sebuah lensop.

Per-user display customization

By default coordinates are displayed in the format in which they are specified.

To always display coordinates as DMS values, add this to your monobook.css:

.geo-default { display: inline }
.geo-nondefault { display: inline }
.geo-dec { display: none }
.geo-dms { display: inline }

To always display coordinates as decimal values, add this to your monobook.css:

.geo-default { display: inline }
.geo-nondefault { display: inline }
.geo-dec { display: inline }
.geo-dms { display: none }

To display coordinates in both formats, add this to your monobook.css:

.geo-default { display: inline }
.geo-nondefault { display: inline }
.geo-dec { display: inline }
.geo-dms { display: inline }
.geo-multi-punct { display: inline }

If CSS is disabled, or you have an old copy of MediaWiki:Common.css cached, you will see both formats. (You can either clear your cache or manually refresh this URL: [1].)

To disable display of the blue globe adjacent to coordinates, add this to your monobook.js

var wma_settings = {enabled:false}

Note that this will disable WikiMiniAtlas

See also Wikipedia:Manual of Style (dates and numbers)#Geographical coordinates.


Incorrect uses and maintenance category

The template has some input checks built in. Most errors display a bold, red message inline and categorize the article in the hidden maintenance category Coord template needing repair. There is/are currently 0 page(s) in that category. See the category description for further instructions.

A daily report of coordinates needing repair is at tools:~dispenser/view/File viewer#log:coord-enwiki.log.

See also: WT:GEO#To do

Dalaman

See Template:Coord/doc/internals and Category:Coord template.

Subtemplat

The following templates:

Template:Coord/input/dec (sunting|talk|pautan|sejarah|pantau|log)
Template:Coord/input/d (sunting|talk|pautan|sejarah|pantau|log)
Template:Coord/input/dm (sunting|talk|pautan|sejarah|pantau|log)
Template:Coord/input/dms (sunting|talk|pautan|sejarah|pantau|log)
Template:Coord/input/ERROR (sunting|talk|pautan|sejarah|pantau|log)
Template:Coord/display/inline (sunting|talk|pautan|sejarah|pantau|log)
Template:Coord/display/title (sunting|talk|pautan|sejarah|pantau|log)
Template:Coord/display/inline,title (sunting|talk|pautan|sejarah|pantau|log)

are "subroutines" of {{Coord}}. Separating them this way allows {{Coord}} to include only one of them instead of all of them, drastically reducing the pre-expand size. They shouldn't be used directly.

Koordinat-koordinat di dalam PDF

For generating PDF, printed books, and Open Office export format, two templates are substituted for the regular templates:

Samples are available at:

Class names

The class names geo, latitude and longitude are used to generate the microformat and MUST NOT be changed.