Extension:MapSources
![]() リリースの状態: 安定 |
|
---|---|
実装 | パーサー関数 , タグ |
説明 | Gives access to several data and mapping sources. |
作者 | Roland Unger |
最新バージョン | 1.8.0 |
MediaWiki | 1.27+ |
PHP | 5.4+ |
データベースの変更 | いいえ |
ライセンス | GNU 一般公衆利用許諾書 2.0 以降 |
ダウンロード | |
Quarterly downloads | 3 (Ranked 171st) |
translatewiki.net で翻訳を利用できる場合は、MapSources 拡張機能の翻訳にご協力ください | |
問題点 | 未解決のタスク · バグを報告 |
The MapSources extension gives access to several data and mapping sources. It is of the Wikivoyage extensions.
インストール
- ダウンロードして、ファイルを
extensions/
フォルダー内のMapSources
という名前のディレクトリ内に配置します。 - 以下のコードを
LocalSettings.php
の末尾に追加します:wfLoadExtension( 'MapSources' );
完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
MediaWiki 1.26以前を稼働させている利用者へ:
上記の手順では、wfLoadExtension()
を使用してこの拡張機能をインストールする新しい方法を記載しています。
この拡張機能をこれらの過去のバージョン (MediaWiki 1.26以前) にインストールする必要がある場合は、wfLoadExtension( 'MapSources' );
の代わりに以下を使用する必要があります:
require_once "$IP/extensions/MapSources/MapSources.php";
特別ページ
カスタマイズ
The Map Sources special page uses project:map sources as a form of template for the Special:MapSources page output. This project page uses place holders as described below. The base name of this project page is taken from the mapsources message string (MediaWiki:Mapsources) of the content language.
- English wikis: Project:Map sources
- French wikis: Project:Sources de cartes
- German wikis: Project:Karten- und Datenquellen
- Italian wikis: Project:Fonte della mappa
- Polish wikis: Project:Mapy
- Japanese wikis : Project:地図情報源
- Chinese wikis : Project:地图来源
- and in Russia, Project:Источники карт maps you.
The text language will not be changed by the user language, it depends only on the content language. Therefore, you must have only one project page per wiki. If the project page does not exist, the extension will fail with an error:
エラー メッセージ:
- No project page Источники карт available
URL and search parameters
Two different types of input parameter sets are accepted:
- The Wikipedia Georeference code like
51.5_N_0.125_W_scale:10000_region:UK
- A comma- or semicolon-separated list of latitude, langitude, and parameters. Latitude and langitude can be written in decimal or sexagesimal forms, ie
deg[°] [min['] [sec['']]] [N|S|E|W]
. The parameters must be separated by spaces or underscores. The parameter name and its value are separated by a colon “:” or an equal sign “=”. Example:51.5,-0.125,scale:10000 region=UK
パラメーター
scale:N
Sets the desired map scale as 1:N. This will override the default scale 1:100.000 or the type.
type:T
Sets the type of this location, which will be used for the reverse mapping of the points. Will also set the default map scale. Types are:
Type | Description | Scale |
---|---|---|
country | (e.g. "type:country") | 1:10,000,000 |
state | Where applicable | 1:3,000,000 |
adm1st | Administrative unit of country, 1st level (province, county) | 1:1,000,000 |
adm2nd | Administrative unit of country, 2nd level | 1:300,000 |
city | City, town or village, unspecified population. Will be treated as a minor city. | 1:100,000 |
mountain | peaks, mountain passes | 1:100,000 |
isle | 1:100,000 | |
waterbody | Bays, fjords, lakes, glaciers, inland seas... | 1:100,000 |
airport | 1:30,000 | |
landmark | Cultural landmark, building of special interest, tourist attraction and other points of interest. | 1:10,000 |
dim:D
Specifies the size of a location by meters. Not yet supported.
region:R
Sets the preferred map region of coverage, used in selecting appropriate map resources for the area. The region should be supplied as either a two character ISO 3166-1 alpha-2 country code, or an ISO 3166-2 region code. Examples:
- US
- DE
- DE-BB (Brandenburg state in Germany)
globe:G
Specifies other worlds than earth. Such as Moon or other planets.
precision:P
Specifies the number of valid decimal places of the coordinate. Default value is 6.
Placeholders
Type | Description |
---|---|
{latdegdec} | Decimal value of the latitude like -0.125 or 51.5. |
{latdegabs} | Unsigned value of the latitude like 0.125 or 51.5. |
{latdegint} | Integer value of the latitude like 0 or 51. |
{latmindec} | Decimal value of the latitude's minute like 30.0 or 7.5. |
{latminint} | Integer value of the latitude's minute like 30 or 7. |
{latsecdec} | Decimal value of the latitude's second like 30.0 or 7.5. |
{latsecint} | Integer value of the latitude's second like 30 or 7. |
{latNS} | Latitude direction N or S. |
{londegdec} | Decimal value of the longitude like -0.125 or 51.5. |
{londegabs} | Unsigned value of the longitude like 0.125 or 51.5. |
{londegneg} | Negative decimal value of the longitude like 0.125 or -51.5. |
{londegint} | Integer value of the longitude like 0 or 51. |
{lonmindec} | Decimal value of the longitude's minute like 30.0 or 7.5. |
{lonminint} | Integer value of the longitude's minute like 30 or 7. |
{lonsecdec} | Decimal value of the longitude's second like 30.0 or 7.5. |
{lonsecint} | Integer value of the longitude's second like 30 or 7. |
{lonEW} | Longitude direction E or W |
{scale} | Scale |
{mmscale} | Multimap fixed scales |
{altitude} | MSN altitude = scale * 143/1000000 |
{zoom} | Mapquest zoom 0 ... 9, 9 is approximately 1:6,000, 5 (default) is approximately 1:333,000, 2 is approximately 1:8,570,000 |
{span} | Google and Tiger span = scale/1000000 |
{osmzoom} | OSM zoom 0 ... 18, osmzoom = round (ld (5E8 / scale)) |
{osmzoommap} | osmzoom - 1 |
{type} | Location type (see above) |
{region} | Region code (see above) |
{globe} | Globe type (see above) |
{params} | Wikipedia Georeference parameter, for instance used by Geohack |
{utmzone} | Universal Transverse Mercator coordinate system using the WGS84 ellipsoid UTM zone |
{utmnorthing} | UTM northing |
{utmeasting} | UTM easting |
{utmerror} | UTM out-of-range error message |
{utm33northing} | UTM for zone 33 UTM northing |
{utm33easting} | UTM easting |
{utm33error} | UTM out-of-range error message |
{osgb36ref} | OSGB36, British national grid reference system using the Airy 1830 ellipsoid UK Ordnance Survey reference |
{osgb36northing} | OSGB36 northing |
{osgb36easting} | OSGB36 easting |
{osgb36error} | OSGB36 out-of-range error message |
{ch1903northing} | CH1903, Swiss coordinate system (Swiss grid) using the 1841 Bessel ellipsoid CH1903 northing |
{ch1903easting} | CH1903 easting |
{ch1903error} | CH1903 out-of-range error message |
{nztmnorthing} | New Zealand NZTM2000, New Zealand coordinate system using the WGS84 ellipsoid NZTM2000 northing |
{nztmeasting} | NZTM2000 easting |
{nztmerror} | NZTM2000 out-of-range error message |
Approximation of the Universal Transverse Mercator conversion
This program uses Redfearn’s formulae to convert a given latitude and longitude into the equivalent Transverse Mercator (TM) coordinates.
Meridian Distance
The Meridian Distance m from the equator is given approximately by:
where are
- r - the size of the major semi axis
- e - the eccentricity of the reference ellipsoid
- φ - the latitude in radian
Calculation of Northing and Easting
パーサー関数
使用法
dd2dms
- dd2dms converts degrees to degree-minute-second format. It uses the required coordinate and the optional plus, minus and precision values.
- Application:
{{#dd2dms: 14.5|plus=String for the positive cardinal direction|minus=String for the negative cardinal direction|precision=decimal places}}
- Example:
{{#dd2dms: 14.58|precision=4}}
gives {{#dd2dms: 14.58|precision=4}} - Example:
{{#dd2dms: 14.58|precision=2}}
gives {{#dd2dms: 14.58|precision=2}}
- Application:
Degree values can be both sexagesimal and decimal.
Strings for the cardial directions will be added to the dms value. They can be empty, single letters or strings and will be added at the end of the conversion result. If the original value is graeter or equal zero, the plus string is added, otherwise the minus string is used.
deg2dd
- deg2dd converts degrees to decimal-degree format.
- Application:
{{#deg2dd: 14° 23' 45''|precision=decimal places}}
- Example:
{{#deg2dd: 14° 23' 45'' S|precision=3}}
gives {{#deg2dd: 14° 23' 45'' S|precision=3}}
- Application:
Sexagesimal coordinate format
You can enter coordinates in the sexagesimal system in the following way:
deg[°] [min['] [sec['']]] [N|S|E|W]
deg, min, sec mean the degree, minute and second values, respectively. The designations can be omitted, but the succession must be kept.
There are alternative characters for the designations in the following way:
Meaning | Characters |
---|---|
Degree | ° |
Minute | ' ‘ ’ ′ |
Second | " '' “ ” |
Minus | - − |
Weblinks
References
- Redfearn’s formulae
Redfearn, J.C.B. : Transverse Mercator Formulae. In: Empire Survey Review <London> 9,69 (July 1948), pp. 318 ‒ 322.
- Approximation using power series
Hofmann-Wellenhof, Bernhard ; Lichtenegger, Herbert ; Collins, James : Global positioning system : theory and practice. – Wien [u.a.] : Springer, 2001.
![]() | この拡張機能は 1 つ以上のウィキメディアのプロジェクトで使用されています。 これはおそらく、この拡張機能が安定していて高いトラフィックのウェブサイトでも十分に動作することを意味します。 この拡張機能がインストールされている場所を確認するには、ウィキメディアの設定ファイル CommonSettings.php および InitialiseSettings.php 内で、この拡張機能の名前を探してください。 特定のウィキにインストールされている拡張機能の完全な一覧は、そのウィキの Special:Version ページにあります。 |