Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ags_grabber
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Larkin Heintzman
ags_grabber
Commits
bd908ae2
Commit
bd908ae2
authored
Oct 22, 2020
by
Larkin Heintzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating directory variables
parent
a167f3f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
15 deletions
+24
-15
.gitignore
.gitignore
+0
-1
feature_set.py
feature_set.py
+3
-3
importmap_py.m
importmap_py.m
+21
-11
No files found.
.gitignore
View file @
bd908ae2
/matlab_data/
/matlab_data_10km/
/matlab_data_10km/
/matlab_data_hiker_10km/
/matlab_data_hiker_10km/
/matlab_data_locale/
/matlab_data_locale/
...
...
feature_set.py
View file @
bd908ae2
...
@@ -253,16 +253,16 @@ if __name__ == "__main__":
...
@@ -253,16 +253,16 @@ if __name__ == "__main__":
[
-
78.46993
,
38.44706
,
'DevilsDitch'
],
[
-
78.46993
,
38.44706
,
'DevilsDitch'
],
[
-
79.33887
,
37.67752
,
'Punchbowl'
],
[
-
79.33887
,
37.67752
,
'Punchbowl'
],
[
-
78.52798
,
37.99092
,
'BiscuitRun'
]]
[
-
78.52798
,
37.99092
,
'BiscuitRun'
]]
base_dir
=
'C:/Users/Larkin/ags_grabber'
eng
=
matlab
.
engine
.
start_matlab
()
# engine for running matlab
eng
=
matlab
.
engine
.
start_matlab
()
# engine for running matlab
for
i
,
ics_pt
in
enumerate
(
ics
):
for
i
,
ics_pt
in
enumerate
(
ics
):
anchor_point
=
[
float
(
ics_pt
[
0
]),
float
(
ics_pt
[
1
])]
anchor_point
=
[
float
(
ics_pt
[
0
]),
float
(
ics_pt
[
1
])]
extent
=
20
e3
extent
=
15
e3
save_flag
=
True
save_flag
=
True
plot_flag
=
False
plot_flag
=
False
# file_id = str(anchor_point) + "_" + str(extent/1000) + "km"
file_extension
=
'temp'
file_extension
=
'temp'
sample_dist
=
int
(
extent
/
100
)
sample_dist
=
int
(
extent
/
100
)
...
@@ -273,7 +273,7 @@ if __name__ == "__main__":
...
@@ -273,7 +273,7 @@ if __name__ == "__main__":
time
.
sleep
(
1
)
# wait for... files to settle?
time
.
sleep
(
1
)
# wait for... files to settle?
# run matlab
# run matlab
res
=
eng
.
importmap_py
(
str
(
ics_pt
[
2
]))
res
=
eng
.
importmap_py
(
str
(
ics_pt
[
2
])
,
base_dir
)
print
(
"------- total time = {} seconds, iteration {}/{} ------"
.
format
(
time
.
time
()
-
start_time
,
i
,
len
(
ics
)))
print
(
"------- total time = {} seconds, iteration {}/{} ------"
.
format
(
time
.
time
()
-
start_time
,
i
,
len
(
ics
)))
eng
.
quit
()
eng
.
quit
()
\ No newline at end of file
importmap_py.m
View file @
bd908ae2
function
result
=
importmap_py
(
save_filename
)
function
result
=
importmap_py
(
save_filename
,
basedir
)
% import map layers from pycharm generated code
% import map layers from pycharm generated code
...
@@ -17,15 +17,25 @@ function result = importmap_py(save_filename)
...
@@ -17,15 +17,25 @@ function result = importmap_py(save_filename)
% fnamelin = '/Users/ah/PycharmProjects/ags_grabber/map_layers/lakes_inac_data_[37.474015, -80.868333]_10.0km.csv';
% fnamelin = '/Users/ah/PycharmProjects/ags_grabber/map_layers/lakes_inac_data_[37.474015, -80.868333]_10.0km.csv';
% temp file names to read from
% temp file names to read from
fnameelev
=
'C:\\Users\\Larkin\\ags_grabber\\map_layers\\elv_data_temp.csv'
;
% fnameelev = 'C:\\Users\\Larkin\\ags_grabber\\map_layers\\elv_data_temp.csv';
fnameriv
=
'C:\\Users\\Larkin\\ags_grabber\\map_layers\\rivers_data_temp.csv'
;
% fnameriv = 'C:\\Users\\Larkin\\ags_grabber\\map_layers\\rivers_data_temp.csv';
fnamerivbd
=
'C:\\Users\\Larkin\\ags_grabber\\map_layers\\rivers_bdd_data_temp.csv'
;
% fnamerivbd = 'C:\\Users\\Larkin\\ags_grabber\\map_layers\\rivers_bdd_data_temp.csv';
fnamerivin
=
'C:\\Users\\Larkin\\ags_grabber\\map_layers\\rivers_bdd_inac_data_temp.csv'
;
% fnamerivin = 'C:\\Users\\Larkin\\ags_grabber\\map_layers\\rivers_bdd_inac_data_temp.csv';
fnameroad
=
'C:\\Users\\Larkin\\ags_grabber\\map_layers\\roads_data_temp.csv'
;
% fnameroad = 'C:\\Users\\Larkin\\ags_grabber\\map_layers\\roads_data_temp.csv';
fnamerr
=
'C:\\Users\\Larkin\\ags_grabber\\map_layers\\railroads_data_temp.csv'
;
% fnamerr = 'C:\\Users\\Larkin\\ags_grabber\\map_layers\\railroads_data_temp.csv';
fnamep
=
'C:\\Users\\Larkin\\ags_grabber\\map_layers\\powerlines_data_temp.csv'
;
% fnamep = 'C:\\Users\\Larkin\\ags_grabber\\map_layers\\powerlines_data_temp.csv';
fnamelbd
=
'C:\\Users\\Larkin\\ags_grabber\\map_layers\\lakes_data_temp.csv'
;
% fnamelbd = 'C:\\Users\\Larkin\\ags_grabber\\map_layers\\lakes_data_temp.csv';
fnamelin
=
'C:\\Users\\Larkin\\ags_grabber\\map_layers\\lakes_inac_data_temp.csv'
;
% fnamelin = 'C:\\Users\\Larkin\\ags_grabber\\map_layers\\lakes_inac_data_temp.csv';
fnameelev
=
strjoin
({
basedir
,
'/map_layers/elv_data_temp.csv'
},
''
);
fnameriv
=
strjoin
({
basedir
,
'/map_layers/rivers_data_temp.csv'
},
''
);
fnamerivbd
=
strjoin
({
basedir
,
'/map_layers/rivers_bdd_data_temp.csv'
},
''
);
fnamerivin
=
strjoin
({
basedir
,
'/map_layers/rivers_bdd_inac_data_temp.csv'
},
''
);
fnameroad
=
strjoin
({
basedir
,
'/map_layers/roads_data_temp.csv'
},
''
);
fnamerr
=
strjoin
({
basedir
,
'/map_layers/railroads_data_temp.csv'
},
''
);
fnamep
=
strjoin
({
basedir
,
'/map_layers/powerlines_data_temp.csv'
},
''
);
fnamelbd
=
strjoin
({
basedir
,
'/map_layers/lakes_data_temp.csv'
},
''
);
fnamelin
=
strjoin
({
basedir
,
'/map_layers/lakes_inac_data_temp.csv'
},
''
);
Zelev
=
load
(
fnameelev
);
Zelev
=
load
(
fnameelev
);
BWriver
=
load
(
fnameriv
);
BWriver
=
load
(
fnameriv
);
...
@@ -55,7 +65,7 @@ BWInac = BWriverInac + BWlakeInac;
...
@@ -55,7 +65,7 @@ BWInac = BWriverInac + BWlakeInac;
BWLF
(
BWLF
~=
0
)
=
1
;
BWLF
(
BWLF
~=
0
)
=
1
;
BWInac
(
BWInac
~=
0
)
=
1
;
BWInac
(
BWInac
~=
0
)
=
1
;
file_path
=
'C:\\Users\\Larkin\\ags_grabber\\matlab_data\\'
;
% define your own path here!
file_path
=
strjoin
({
basedir
,
'/matlab_data/'
},
''
)
;
% define your own path here!
% save_filename is just the ics point in question
% save_filename is just the ics point in question
save
(
strjoin
({
file_path
,
'BW_LFandInac_Zelev_'
,
save_filename
,
'.mat'
},
''
),
'BWLF'
,
'BWInac'
,
'sZelev'
)
save
(
strjoin
({
file_path
,
'BW_LFandInac_Zelev_'
,
save_filename
,
'.mat'
},
''
),
'BWLF'
,
'BWInac'
,
'sZelev'
)
...
...
Write
Preview
Markdown
is supported
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