Templat:Coord

(Dilencongkan dari Templat:Koord)
Pendokumenan templat[lihat] [sunting] [sejarah] [nyahcache]

Panduan pantas

Panduan ringkas
Untuk membubuh 57°18′22.5″N 4°27′32.7″W / 57.306250°N 4.459083°W / 57.306250; -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″N 87°54′47″W / 44.112°N 87.913°W / 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 () 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″N 79°23′00″W / 43.651234°N 79.383333°W / 43.651234; -79.383333 Toronto – Fully decimal – N & W
{{coord|43.65|-79.38}} 43°39′N 79°23′W / 43.65°N 79.38°W / 43.65; -79.38 Toronto – less precise
{{coord|43.6500|-79.3800}} 43°39′00″N 79°22′48″W / 43.6500°N 79.3800°W / 43.6500; -79.3800 Toronto – medium precision with trailing zeroes
{{coord|43.651234|N|79.383333|W}} 43°39′04″N 79°23′00″W / 43.651234°N 79.383333°W / 43.651234; -79.383333 Toronto – decimal with Northing & Westing
{{coord|43|29|N|79|23|W}} 43°29′N 79°23′W / 43.483°N 79.383°W / 43.483; -79.383 Toronto – degrees & minutes
{{coord|43|29|4|N|79|23|0|W}} 43°29′4″N 79°23′0″W / 43.48444°N 79.38333°W / 43.48444; -79.38333 Toronto – degrees, minutes & seconds
{{coord|43|29|4.5|N|79|23|0.5|W}} 43°29′4.5″N 79°23′0.5″W / 43.484583°N 79.383472°W / 43.484583; -79.383472 Toronto – degrees, minutes, seconds & fractions of seconds
{{coord|55.752222|N|37.615556|E}} 55°45′08″N 37°36′56″E / 55.752222°N 37.615556°E / 55.752222; 37.615556 Moscow – N & E
{{coord|55.752222|N|37.615556|E|format=dms}} 55°45′08″N 37°36′56″E / 55.752222°N 37.615556°E / 55.752222; 37.615556 Convert to dms format
{{coord|39.098095|-94.587307|format=dms}} 39°05′53″N 94°35′14″W / 39.098095°N 94.587307°W / 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″N 37°36′56″E / 55.752222°N 37.615556°E / 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′E / 33.917°S 18.417°E / -33.917; 18.417 Cape Town – S & E
{{coord|35|00|N|105|00|E}} 35°00′N 105°00′E / 35.000°N 105.000°E / 35.000; 105.000 People's Republic of China
{{coord|22|54|30|S|43|14|37|W}} 22°54′30″S 43°14′37″W / 22.90833°S 43.24361°W / -22.90833; -43.24361 Rio – S & W
{{coord|22|S|43|W}} 22°S 43°W / 22°S 43°W / -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′N 1°55′W / 52.467°N 1.917°W / 52.467; -1.917[1]Koordinat: 52°28′N 1°55′W / 52.467°N 1.917°W / 52.467; -1.917[1] Birmingham – with display, notes, and parameter settings; note display also in title of this page.

Rujukan

  1. ^ "Birmingham".

Parameter koordinat

Parameter tidak bernama pertama selepas longitud ialah tali pilihan parameter koordinat, dipisahkan oleh garis bawah. Parameter tersebut membantu GeoHack memilih sumber peta yang sesuai, dan ianya akan menjadi lebih penting apabila Wikipeta berfungsi sepenuhnya.

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′N 7°58′E / 46.717°N 7.967°E / 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″N 0°07′29″W / 51.500611°N 0.124611°W / 51.500611; -0.124611
Istana Westminster 1:5,000 {{coord|51.5006|N|0.1246|W|scale:5000}} 51°30′02″N 0°07′29″W / 51.5006°N 0.1246°W / 51.5006; -0.1246
Kota Westminster 1:50,000 {{coord|51.501|N|0.125|W|scale:50000}} 51°30′04″N 0°07′30″W / 51.501°N 0.125°W / 51.501; -0.125
London Raya 1:500,000 {{coord|51.50|N|0.12|W|scale:500000}} 51°30′N 0°07′W / 51.50°N 0.12°W / 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°N 90°W / 0°N 90°W / 0; -90
Ohio 400 kilometer (250 bt) {{coord|40.5|-82.5|dim:400km}} 40°30′N 82°30′W / 40.5°N 82.5°W / 40.5; -82.5
Dresden 20,000 meter (12 bt) {{coord|51.033|13.73|dim:20000}} 51°01′59″N 13°43′48″E / 51.033°N 13.73°E / 51.033; 13.73
Patung Liberty 100 meter (330 ka) {{coord|40.6892|-74.0445|dim:100}} 40°41′21″N 74°02′40″W / 40.6892°N 74.0445°W / 40.6892; -74.0445
rantau: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″N 7°26′23″E / 46.9524°N 7.4396°E / 46.9524; 7.4396
Berlin, Jerman DE-BE  {{coord|52.5164|N|13.3775|E|region:DE-BE}}  52°30′59″N 13°22′39″E / 52.5164°N 13.3775°E / 52.5164; 13.3775
glob: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′N 334°36′W / 0.4°N 334.6°W / 0.4; -334.6
Pendarat Viking 2 mars {{coord|48.269|N|225.990|W|globe:mars}} 48°16′08″N 225°59′24″W / 48.269°N 225.990°W / 48.269; -225.990
Kawah Mozart mercury {{coord|8|N|190.5|W|globe:mercury}} 8°00′N 190°30′W / 8°N 190.5°W / 8; -190.5
Pendarat Apollo 11 moon {{coord|0|40|26.69|N|23|28|22.69|E|globe:moon}} 0°40′26.69″N 23°28′22.69″E / 0.6740806°N 23.4729694°E / 0.6740806; 23.4729694
Kawah Ksa titan {{coord|14.0|N|65.4|W|globe:titan}} 14°00′N 65°24′W / 14.0°N 65.4°W / 14.0; -65.4
Pendarat Venera 13 venus {{coord|7.5|S|303|E|globe:venus}} 7°30′S 303°00′E / 7.5°S 303°E / -7.5; 303
Kawah Stickney phobos {{coord|1|N|49|W|globe:phobos}} 1°N 49°W / 1°N 49°W / 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}}.

sumber:S

#REDIRECT[[::en:Wikipedia:WikiProject Geographical coordinates/source:|:en:Wikipedia:WikiProject Geographical coordinates/source:]]
Laman ini ialah sebuah lensop.

Per-user display customization

Secara tersedia koordinat dipaparkan dalam format di mana ia ditentukan.

Untuk sentiasa memaparkan koordinat sebagai nilai DMS, tambahkan ini kepada monobook.css anda:

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

Untuk sentiasa memaparkan koordinat sebagai nilai perpuluhan, tambahkan ini kepada monobook.css anda:

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

Untuk memaparkan koordinat dalam kedua-dua format, tambahkan ini kepada monobook.css anda:

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

Jika CSS dinyahdayakan, atau anda mempunyai salinan lama MediaWiki:Common.css yang dicachekan, anda akan melihat kedua-dua format. (Anda boleh memadam cache anda atau menyegarka secara manual URL ini: [1].)

Untuk menyahdayakan paparan dunia biru bersebelahan dengan koordinat, tambahkan ini kepada monobook.js anda

var wma_settings = {enabled:false}

Ambil perhatian bahawa ini akan menyahdayakan WikiMiniAtlas.

Lihat juga Wikipedia:Manual Gaya (tarikh dan nombor)#Koordinat geografi.


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

Lihat Templat:Koord/doc/dalaman dan Kategori:Templat koord.

Subtemplat

Templat berikut adalah "subrutin" {{Koord}}. Memisahkannya mengurangkan secara drastic saiz pra-pengembangan {{Koord}}. Ianya tidak sepatutnya digunakan secara langsung.

nama fungsi
{{Koord/paparan/dalam baris}} memaparkan koordinat dalam baris
{{Koord/paparan/dalam baris,tajuk}} memaparkan koordinat dalam baris dan di atas rencana
{{Koord/paparan/tajuk}} memaparkan koordinat di atas rencana (umumnya di sebelah kanan tajuk rencana)
{{Koord/pautan}} menjana microformat dan pautan ke GeoHack
{{Koord/input/perpuluhan}} membaca koordinat dalam darjah perpuluhan {{Koord|12|-12}}
{{Koord/input/d}} membaca koordinat dalam darjah perpuluhan dengan huruf arah kompas {{Koord|12|N|12|W}}
{{Koord/input/dm}} membaca koordinat dalam format darjah/minit {{Koord|12|12|N|12|12|W}}
{{Koord/input/dms}} membaca koordinat dalam format darjah/minit/saat {{Koord|12|12|12|N|12|12|12|W}}
{{Koord/input/RALAT}} menjana pesanan ralat jika input tidak sepadan dengan mana-mana format di atas
{{Koord/input/ralat2}} menjana pesanan ralat untuk semakan julat dan sebagainya
{{Koord/input/tiadalat}} menjana mesej ralat untuk latitud yang hilang
{{Koord/bubuhnegsifar}} membubuh nombor positif dengan seretan sifar sehingga ia sepadan dengan ketepatan nombor negatif
{{Koord/perpuluhan tepat}} memilih format untuk menukar darjah perpuluhan, berdasarkan ketepatan input


Koordinat-koordinat di dalam PDF

Untuk menjana PDF, buku cetak, dan format eksport Open Office, dua templat digantikan untuk templat tetap:

Contoh boleh didapati di:

Nama kelas

Nama-nama kelas geo, latitud dan longitud digunakan untuk menjana mikroformat dan TIDAH BOLEH SAMA SEKALI diubah.