Module talk:Coordinates/sandbox/testcases

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
local

{{location/sandbox|34.09232214779039|-116.15681916475296|heading:E}}

Camera location34° 05′ 32.36″ N, 116° 09′ 24.55″ W  Heading=90° Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
local + wikidata

{{Object location/sandbox|49.709093|8.631821|Wikidata=Q315328}}

Object location49° 42′ 32.73″ N, 8° 37′ 54.56″ E Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
local + wikidata

{{Object location/sandbox|49.709093|9.631821|Wikidata=Q315328}}

Object location49° 42′ 32.73″ N, 9° 37′ 54.56″ E Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
local + wikidata

{{Object location/sandbox|-49.709093|9.631821|Wikidata=Q1}}

Object location49° 42′ 32.73″ S, 9° 37′ 54.56″ E Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
local + wikidata

{{Object location/sandbox|-49.709093|9.631821|Wikidata=Q937}}

Object location49° 42′ 32.73″ S, 9° 37′ 54.56″ E Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
local one parameter in DMS format

{{Location/sandbox|45° 11′ 20.5″ N, 4° 38′ 06.8″ E }}

Camera location45° 11′ 20.5″ N, 4° 38′ 06.8″ E Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
local two numbered parameters in DMS format

{{Location/sandbox|45° 11′ 20.5″ N|4° 38′ 06.8″ E }}

Camera location45° 11′ 20.5″ N, 4° 38′ 06.8″ E Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
local two named parameters in DMS format

{{Location/sandbox|lat=45° 11′ 20.5″ N|lon=4° 38′ 06.8″ E }}

Camera location45° 11′ 20.5″ N, 4° 38′ 06.8″ E Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
wikidata

{{Object location/sandbox|Wikidata=Q315328}}

Object location0° 00′ 00″ N, 0° 00′ 00″ E Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
wikidata

{{Object location/sandbox|||region:IT-RM_dim:150m_heading:267|wikidata=Q29117604}}

Object location0° 00′ 00″ N, 0° 00′ 00″ E Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo

7 tests failed.

Test 1: getHeading
Text Expected Actual
✓[OK] {{#invoke:Coordinates/sandbox|getHeading |heading:NE}} 45 45
✓[OK] {{#invoke:Coordinates/sandbox|getHeading |heading:NWbW}} 303.75 303.75
✓[OK] {{#invoke:Coordinates/sandbox|getHeading |heading:100}} 100 100
✓[OK] {{#invoke:Coordinates/sandbox|getHeading |heading:-400}} 320 320
✓[OK] {{#invoke:Coordinates/sandbox|getHeading |heading:100_elevation:1000}} 100 100
✓[OK] {{#invoke:Coordinates/sandbox|getHeading |elevation:1000_heading:100}} 100 100
✓[OK] {{#invoke:Coordinates/sandbox|getHeading |elevation:1000_heading:33.33}} 33.33 33.33
✓[OK] {{#invoke:Coordinates/sandbox|getHeading |heading:john}}
✓[OK] {{#invoke:Coordinates/sandbox|getHeading |elevation:1000}}
Test 2: parseAttribute
Text Expected Actual
✓[OK] {{#invoke:Coordinates/sandbox|parseAttribute |heading:100_elevation:1000|heading}} 100 100
✓[OK] {{#invoke:Coordinates/sandbox|parseAttribute |heading:100_elevation:1000|elevation}} 1000 1000
Test 3: deg2dms
Text Expected Actual
✓[OK] {{#invoke:Coordinates/sandbox|deg2dms|199.99|lang=en}} 199° 59′ 24″ 199° 59′ 24″
✓[OK] {{#invoke:Coordinates/sandbox|deg2dms|199.999|lang=en}} 199° 59′ 56.4″ 199° 59′ 56.4″
✓[OK] {{#invoke:Coordinates/sandbox|deg2dms|199.9999|lang=en}} 199° 59′ 59.64″ 199° 59′ 59.64″
✘[No] {{#invoke:Coordinates/sandbox|deg2dms|199.99999|lang=en}} 199° 59′ 59.964″ 199° 59′ 59.96″
✘[No] {{#invoke:Coordinates/sandbox|deg2dms|199.999999|lang=en}} 199° 59′ 59.996″ 200° 00′ 00″
✘[No] {{#invoke:Coordinates/sandbox|deg2dms|199.9999995|lang=en}} 199° 59′ 59.998″ 200° 00′ 00″
✓[OK] {{#invoke:Coordinates/sandbox|deg2dms|199.9999999|lang=en}} 200° 00′ 00″ 200° 00′ 00″
✓[OK] {{#invoke:Coordinates/sandbox|deg2dms|200.0000001|lang=en}} 200° 00′ 00″ 200° 00′ 00″
✘[No] {{#invoke:Coordinates/sandbox|deg2dms|200.0000005|lang=en}} 200° 00′ 00.002″ 200° 00′ 00″
✓[OK] {{#invoke:Coordinates/sandbox|deg2dms|-90|lang=en}} 270° 00′ 00″ 270° 00′ 00″
✓[OK] {{#invoke:Coordinates/sandbox|deg2dms|180.5|lang=en}} 180° 30′ 00″ 180° 30′ 00″
✓[OK] {{#invoke:Coordinates/sandbox|deg2dms|{{#expr:123.0+45.0/60.0+12.34/3600.0}}|lang=en}} 123° 45′ 12.34″ 123° 45′ 12.34″
✓[OK] {{#invoke:Coordinates/sandbox|deg2dms|{{#expr:123.0+45.0/60.0+12.34/3600.0}}|lang=pl}} 123° 45′ 12,34″ 123° 45′ 12,34″
✓[OK] {{#invoke:Coordinates/sandbox|deg2dms|48.8566667|lang=fr}} 48° 51′ 24″ 48° 51′ 24″
✓[OK] {{#invoke:Coordinates/sandbox|deg2dms|48.8566667|lang=fa}} ۴۸° ۵۱′ ۲۴″ ۴۸° ۵۱′ ۲۴″
✓[OK] {{#invoke:Coordinates/sandbox|deg2dms|40°|lang=en}} 40° 40°
Test 4: lat_lon
Text Expected Actual
✓[OK] {{#invoke:Coordinates/sandbox|lat_lon |lat=51.48 |lon=0 |lang=en }} 51° 28′ 48″ N, 0° 00′ 00″ E 51° 28′ 48″ N, 0° 00′ 00″ E
✓[OK] {{#invoke:Coordinates/sandbox|lat_lon |lat=51.48 |lon=0 |lang=ru }} 51° 28′ 48″ с. ш., 0° 00′ 00″ в. д. 51° 28′ 48″ с. ш., 0° 00′ 00″ в. д.
✓[OK] {{#invoke:Coordinates/sandbox|lat_lon |lat=51.48 |lon=0 |lang=ab }} 51° 28′ 48″ с. ш., 0° 00′ 00″ в. д. 51° 28′ 48″ с. ш., 0° 00′ 00″ в. д.
✓[OK] {{#invoke:Coordinates/sandbox|lat_lon |lat=51.48 |lon=0 |lang=th }} 51° 28′ 48″ เหนือ, 0° 00′ 00″ ตะวันออก 51° 28′ 48″ เหนือ, 0° 00′ 00″ ตะวันออก
✓[OK] {{#invoke:Coordinates/sandbox|lat_lon |lat=51.48 |lon=0 |lang=ml }} 51° 28′ 48″ വ, 0° 00′ 00″ കി 51° 28′ 48″ വ, 0° 00′ 00″ കി
✓[OK] {{#invoke:Coordinates/sandbox|lat_lon |lat=51.48 |lon=0 |lang=xx }} 51° 28′ 48″ N, 0° 00′ 00″ E 51° 28′ 48″ N, 0° 00′ 00″ E
✓[OK] {{#invoke:Coordinates/sandbox|lat_lon |lat=51.48 |lon=0 |lang=be-tarask }} 51° 28′ 48″ пн. ш., 0° 00′ 00″ з. д. 51° 28′ 48″ пн. ш., 0° 00′ 00″ з. д.
✓[OK] {{#invoke:Coordinates/sandbox|lat_lon |lat= |lon= |lang=en }} latitude, longitude latitude, longitude
Test 6: GeoHack_link
Text Expected Actual
✘[No] {{#invoke:Coordinates/sandbox|GeoHack_link |lat=51.48 |lon=0 }} <span class="plainlinksneverexpand">[//geohack.toolforge.org/geohack.php?pagename=Module_talk:Coordinates/sandbox/testcases&params=51.48_N_0_E_globe:Earth_&language=fr 51°&nbsp;28′&nbsp;48″&nbsp;N, 0°&nbsp;00′&nbsp;00″&nbsp;E]</span> <span class="plainlinksneverexpand">[https://geohack.toolforge.org/geohack.php?pagename=Module_talk:Coordinates/sandbox/testcases&params=51.48_N_0_E_globe:Earth_&language=en 51°&nbsp;28′&nbsp;48″&nbsp;N, 0°&nbsp;00′&nbsp;00″&nbsp;E]</span>
✘[No] {{#invoke:Coordinates/sandbox|GeoHack_link |lat=51.48 |lon=0 |lang=en }} <span class="plainlinksneverexpand">[//geohack.toolforge.org/geohack.php?pagename=Module_talk:Coordinates/sandbox/testcases&params=51.48_N_0_E_globe:Earth_&language=en 51°&nbsp;28′&nbsp;48″&nbsp;N, 0°&nbsp;00′&nbsp;00″&nbsp;E]</span> <span class="plainlinksneverexpand">[https://geohack.toolforge.org/geohack.php?pagename=Module_talk:Coordinates/sandbox/testcases&params=51.48_N_0_E_globe:Earth_&language=en 51°&nbsp;28′&nbsp;48″&nbsp;N, 0°&nbsp;00′&nbsp;00″&nbsp;E]</span>
✘[No] {{#invoke:Coordinates/sandbox|GeoHack_link |lat=51.48 |lon=0 |lang=ru }} <span class="plainlinksneverexpand">[//geohack.toolforge.org/geohack.php?pagename=Module_talk:Coordinates/sandbox/testcases&params=51.48_N_0_E_globe:Earth_&language=ru 51°&nbsp;28′&nbsp;48″&nbsp;с.&nbsp;ш., 0°&nbsp;00′&nbsp;00″&nbsp;в.&nbsp;д.]</span> <span class="plainlinksneverexpand">[https://geohack.toolforge.org/geohack.php?pagename=Module_talk:Coordinates/sandbox/testcases&params=51.48_N_0_E_globe:Earth_&language=ru 51°&nbsp;28′&nbsp;48″&nbsp;с.&nbsp;ш., 0°&nbsp;00′&nbsp;00″&nbsp;в.&nbsp;д.]</span>
✓[OK] {{#invoke:Coordinates/sandbox|GeoHack_link |lat= |lon=0 |lang=ru }} latitude, longitude latitude, longitude

Start a discussion about Module:Coordinates/sandbox/testcases

Start a discussion