Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
artoa4argo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
argoTools
artoa4argo
Commits
c57ea724
Commit
c57ea724
authored
Nov 19, 2019
by
leprob001
Browse files
Options
Downloads
Patches
Plain Diff
Removed custom mercator projection functions.
parent
dc9d44d5
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/+artoa/+convert/+mercator/imerc.m
+0
-19
0 additions, 19 deletions
lib/+artoa/+convert/+mercator/imerc.m
lib/+artoa/+convert/+mercator/merc.m
+0
-15
0 additions, 15 deletions
lib/+artoa/+convert/+mercator/merc.m
lib/+artoa/+convert/axes2mercator.m
+0
-63
0 additions, 63 deletions
lib/+artoa/+convert/axes2mercator.m
with
0 additions
and
97 deletions
lib/+artoa/+convert/+mercator/imerc.m
deleted
100644 → 0
+
0
−
19
View file @
dc9d44d5
function
yo
=
imerc
(
y
);
%IMERC inverse mercator projection
%-----------
%yo = 2 * atan(exp(y)) - pi/2;
%yo = yo/pi*180;
%-----------
c1
=
0.19231594611859
;
c2
=
0.3773144885e-3
;
yo
=
2
*
atan
(
exp
(
y
))
-
pi
/
2
;
yo
=
yo
/
pi
*
180
;
yo
=
yo
+
sin
(
yo
/
90
*
pi
)
*
c1
+
sin
(
yo
/
45
*
pi
)
*
c2
;
This diff is collapsed.
Click to expand it.
lib/+artoa/+convert/+mercator/merc.m
deleted
100644 → 0
+
0
−
15
View file @
dc9d44d5
function
[
yo
]
=
merc
(
y
)
% MERC transfer coordinates according Mercator projection.
% Yo = MERC(Y) returns the mercator-transformed of Y.
a
=
6378137.000
;
b
=
6356752.314
;
e
=
sqrt
(
a
^
2
-
b
^
2
)/
a
;
rad
=
pi
/
180
;
s
=
e
*
sin
(
y
*
rad
);
yo
=
log
(
tan
(
pi
.
/
4
+
(
y
*
rad
)/
2
)
.*
(((
1
-
s
)
.
/(
1
+
s
))
.^
(
e
/
2
)
));
yo
=
real
(
yo
);
This diff is collapsed.
Click to expand it.
lib/+artoa/+convert/axes2mercator.m
deleted
100644 → 0
+
0
−
63
View file @
dc9d44d5
function
[]
=
axes2mercator
(
pAxesHandle
,
pInverse
)
%AXES2MERCATOR Converts the given axes and all its children to mercator projection.
% Detailed explanation goes here
%% Get required variables
children
=
pAxesHandle
.
Children
;
if
nargin
==
1
pInverse
=
false
;
end
%% Check if already converted
if
strcmp
(
pAxesHandle
.
UserData
,
'mercator'
)
warning
([
mfilename
': Given axes has already been converted to mercator! Skipping...'
]);
return
;
end
%% Set units
pAxesHandle
.
Units
=
'norm'
;
%% Convert every children
for
i
=
1
:
length
(
children
)
currentChild
=
children
(
i
);
% get position, depending on type
switch
(
currentChild
.
Type
)
case
'image'
disp
(
'Image discovered, skipping...'
);
continue
;
case
'text'
if
pInverse
currentChild
.
Position
(
2
)
=
artoa
.
convert
.
mercator
.
imerc
(
...
currentChild
.
Position
(
2
)
...
);
else
currentChild
.
Position
(
2
)
=
artoa
.
convert
.
mercator
.
merc
(
...
currentChild
.
Position
(
2
)
...
);
end
otherwise
if
pInverse
currentChild
.
YData
=
artoa
.
convert
.
mercator
.
imerc
(
...
currentChild
.
YData
...
);
else
currentChild
.
YData
=
artoa
.
convert
.
mercator
.
merc
(
...
currentChild
.
YData
...
);
end
end
end
%% Set corrected limits
if
pInverse
pAxesHandle
.
YLim
=
artoa
.
convert
.
mercator
.
imerc
(
pAxesHandle
.
YLim
);
else
pAxesHandle
.
YLim
=
artoa
.
convert
.
mercator
.
merc
([
pAxesHandle
.
YLim
(
1
)
-
1
,
pAxesHandle
.
YLim
(
2
)
+
1
]);
end
%% Save state to axes
pAxesHandle
.
UserData
=
'mercator'
;
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment