Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonny Schäfer
radolan
Commits
e2d15b37
Commit
e2d15b37
authored
Nov 14, 2017
by
Jonny Schäfer
Browse files
Use outer edges for national PG grid
parent
dd9ce6a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
translate.go
View file @
e2d15b37
...
...
@@ -29,8 +29,8 @@ var errNoProjection = newError("cornerPoints", "warning: unable to identify grid
func
(
c
*
Composite
)
cornerPoints
()
(
originTop
,
originLeft
,
edgeBottom
,
edgeRight
float64
,
err
error
)
{
// national grid (pg) values described in [4]
if
c
.
Product
==
"PG"
{
originTop
,
originLeft
=
54.6
547
,
0
1.9
178
// N, E
edgeBottom
,
edgeRight
=
46.98
94
,
14.7218
// N, E
originTop
,
originLeft
=
54.6
6218275
,
1.9
00684377
// N, E
edgeBottom
,
edgeRight
=
46.98
044293
,
14.73300934
// N, E
return
}
...
...
translate_test.go
View file @
e2d15b37
...
...
@@ -52,11 +52,11 @@ func TestResolution(t *testing.T) {
func
TestTranslate
(
t
*
testing
.
T
)
{
nationalGridPG
:=
[][]
float64
{
[]
float64
{
54.6
547
,
0
1.9
178
,
0
,
0
},
[]
float64
{
54.81
10
,
15.8706
,
460
,
0
},
[]
float64
{
51.0000
,
09.0000
,
230
,
230
},
[]
float64
{
46.86
95
,
0
3.4
921
,
0
,
460
},
[]
float64
{
46.98
94
,
14.7218
,
460
,
460
},
[]
float64
{
54.6
6218275
,
1.9
00684377
,
0
,
0
},
[]
float64
{
54.81
884457
,
15.88724008
,
460
,
0
},
[]
float64
{
51.0000
0000
,
09.0000
0000
,
230
,
230
},
[]
float64
{
46.86
029310
,
3.4
81345126
,
0
,
460
},
[]
float64
{
46.98
044293
,
14.73300934
,
460
,
460
},
}
nationalGridHalf
:=
[][]
float64
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment