mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-12 09:11:37 -04:00
spelling: coordinate
This commit is contained in:
parent
22d3caed6e
commit
25e9835496
7 changed files with 64 additions and 64 deletions
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Convert co-ordinate format tests
|
||||
* Convert coordinate format tests
|
||||
*
|
||||
* @author j433866
|
||||
*
|
||||
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* TEST CO-ORDINATES
|
||||
* TEST COORDINATES
|
||||
* DD: 51.504°,-0.126°,
|
||||
* DDM: 51° 30.24',-0° 7.56',
|
||||
* DMS: 51° 30' 14.4",-0° 7' 33.6",
|
||||
|
@ -22,188 +22,188 @@ import TestRegister from "../../lib/TestRegister.mjs";
|
|||
|
||||
TestRegister.addTests([
|
||||
{
|
||||
name: "Co-ordinates: From Decimal Degrees to Degrees Minutes Seconds",
|
||||
name: "Coordinates: From Decimal Degrees to Degrees Minutes Seconds",
|
||||
input: "51.504°,-0.126°,",
|
||||
expectedOutput: "51° 30' 14.4\",-0° 7' 33.6\",",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Decimal Degrees", "Comma", "Degrees Minutes Seconds", "Comma", "None", 1]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: From Degrees Minutes Seconds to Decimal Degrees",
|
||||
name: "Coordinates: From Degrees Minutes Seconds to Decimal Degrees",
|
||||
input: "51° 30' 14.4\",-0° 7' 33.6\",",
|
||||
expectedOutput: "51.504°,-0.126°,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Degrees Minutes Seconds", "Comma", "Decimal Degrees", "Comma", "None", 3]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: From Decimal Degrees to Degrees Decimal Minutes",
|
||||
name: "Coordinates: From Decimal Degrees to Degrees Decimal Minutes",
|
||||
input: "51.504°,-0.126°,",
|
||||
expectedOutput: "51° 30.24',-0° 7.56',",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Decimal Degrees", "Comma", "Degrees Decimal Minutes", "Comma", "None", 2]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: From Degrees Decimal Minutes to Decimal Degrees",
|
||||
name: "Coordinates: From Degrees Decimal Minutes to Decimal Degrees",
|
||||
input: "51° 30.24',-0° 7.56',",
|
||||
expectedOutput: "51.504°,-0.126°,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Degrees Decimal Minutes", "Comma", "Decimal Degrees", "Comma", "None", 3]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: From Decimal Degrees to Decimal Degrees",
|
||||
name: "Coordinates: From Decimal Degrees to Decimal Degrees",
|
||||
input: "51.504°,-0.126°,",
|
||||
expectedOutput: "51.504°,-0.126°,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Decimal Degrees", "Comma", "Decimal Degrees", "Comma", "None", 3]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: From Decimal Degrees to Geohash",
|
||||
name: "Coordinates: From Decimal Degrees to Geohash",
|
||||
input: "51.504°,-0.126°,",
|
||||
expectedOutput: "gcpvj0h0x,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Decimal Degrees", "Comma", "Geohash", "Comma", "None", 9]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: From Geohash to Decimal Degrees",
|
||||
name: "Coordinates: From Geohash to Decimal Degrees",
|
||||
input: "gcpvj0h0x,",
|
||||
expectedOutput: "51.504°,-0.126°,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Geohash", "Comma", "Decimal Degrees", "Comma", "None", 3]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: From Decimal Degrees to MGRS",
|
||||
name: "Coordinates: From Decimal Degrees to MGRS",
|
||||
input: "51.504°,-0.126°,",
|
||||
expectedOutput: "30U XC 99455 09790,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Decimal Degrees", "Comma", "Military Grid Reference System", "Comma", "None", 10]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: From MGRS to Decimal Degrees",
|
||||
name: "Coordinates: From MGRS to Decimal Degrees",
|
||||
input: "30U XC 99455 09790,",
|
||||
expectedOutput: "51.504°,-0.126°,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Military Grid Reference System", "Comma", "Decimal Degrees", "Comma", "None", 3]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: From Decimal Degrees to OSNG",
|
||||
name: "Coordinates: From Decimal Degrees to OSNG",
|
||||
input: "51.504°,-0.126°,",
|
||||
expectedOutput: "TQ 30163 80005,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Decimal Degrees", "Comma", "Ordnance Survey National Grid", "Comma", "None", 10]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: From OSNG to Decimal Degrees",
|
||||
name: "Coordinates: From OSNG to Decimal Degrees",
|
||||
input: "TQ 30163 80005,",
|
||||
expectedOutput: "51.504°,-0.126°,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Ordnance Survey National Grid", "Comma", "Decimal Degrees", "Comma", "None", 3]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: From Decimal Degrees to UTM",
|
||||
name: "Coordinates: From Decimal Degrees to UTM",
|
||||
input: "51.504°,-0.126°,",
|
||||
expectedOutput: "30 N 699456 5709791,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Decimal Degrees", "Comma", "Universal Transverse Mercator", "Comma", "None", 0]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: From UTM to Decimal Degrees",
|
||||
name: "Coordinates: From UTM to Decimal Degrees",
|
||||
input: "30 N 699456 5709791,",
|
||||
expectedOutput: "51.504°,-0.126°,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Universal Transverse Mercator", "Comma", "Decimal Degrees", "Comma", "None", 3]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: Directions in input, not output",
|
||||
name: "Coordinates: Directions in input, not output",
|
||||
input: "N51.504°,W0.126°,",
|
||||
expectedOutput: "51.504°,-0.126°,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Decimal Degrees", "Comma", "Decimal Degrees", "Comma", "None", 3]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: Directions in input and output",
|
||||
name: "Coordinates: Directions in input and output",
|
||||
input: "N51.504°,W0.126°,",
|
||||
expectedOutput: "N 51.504°,W 0.126°,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Decimal Degrees", "Comma", "Decimal Degrees", "Comma", "Before", 3]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: Directions not in input, in output",
|
||||
name: "Coordinates: Directions not in input, in output",
|
||||
input: "51.504°,-0.126°,",
|
||||
expectedOutput: "N 51.504°,W 0.126°,",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Decimal Degrees", "Comma", "Decimal Degrees", "Comma", "Before", 3]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Co-ordinates: Directions not in input, in converted output",
|
||||
name: "Coordinates: Directions not in input, in converted output",
|
||||
input: "51.504°,-0.126°,",
|
||||
expectedOutput: "N 51° 30' 14.4\",W 0° 7' 33.6\",",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Convert co-ordinate format",
|
||||
op: "Convert coordinate format",
|
||||
args: ["Decimal Degrees", "Comma", "Degrees Minutes Seconds", "Comma", "Before", 3]
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue