Commit 7ccb785e authored by Larkin Heintzman's avatar Larkin Heintzman

small file organization fixes

parent 35708bd0
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
/matlab_data_hiker_10km/ /matlab_data_hiker_10km/
/matlab_data_locale/ /matlab_data_locale/
/matlab_data_va_20km/ /matlab_data_va_20km/
/map_layers/punchbowl_tmp/ /map_layers/punchbowl/
/map_layers/devilsditch_tmp/ /map_layers/devilsditch/
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -27,16 +27,29 @@ function result = importmap_py(save_filename, basedir) ...@@ -27,16 +27,29 @@ function result = importmap_py(save_filename, basedir)
% 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'},''); %fnameelev = strjoin({basedir, '/map_layers/',save_filename,'/elv_data_.csv'},'');
fnameriv = strjoin({basedir, '/map_layers/rivers_data_temp.csv'},''); %fnameriv = strjoin({basedir, '/map_layers/',save_filename,'/rivers_data_.csv'},'');
fnamerivbd = strjoin({basedir, '/map_layers/rivers_bdd_data_temp.csv'},''); %fnamerivbd = strjoin({basedir, '/map_layers/',save_filename,'/rivers_bdd_data_.csv'},'');
fnamerivin = strjoin({basedir, '/map_layers/rivers_bdd_inac_data_temp.csv'},''); %fnamerivin = strjoin({basedir, '/map_layers/',save_filename,'/rivers_bdd_inac_data_.csv'},'');
fnameroad = strjoin({basedir, '/map_layers/roads_data_temp.csv'},''); %fnameroad = strjoin({basedir, '/map_layers/',save_filename,'/roads_data_.csv'},'');
fnamerr = strjoin({basedir, '/map_layers/railroads_data_temp.csv'},''); %fnamerr = strjoin({basedir, '/map_layers/',save_filename,'/railroads_data_.csv'},'');
fnamep = strjoin({basedir, '/map_layers/powerlines_data_temp.csv'},''); %fnamep = strjoin({basedir, '/map_layers/',save_filename,'/powerlines_data_.csv'},'');
fnamelbd = strjoin({basedir, '/map_layers/lakes_data_temp.csv'},''); %fnamelbd = strjoin({basedir, '/map_layers/',save_filename,'/lakes_data_.csv'},'');
fnamelin = strjoin({basedir, '/map_layers/lakes_inac_data_temp.csv'},''); %fnamelin = strjoin({basedir, '/map_layers/',save_filename,'/lakes_inac_data_.csv'},'');
fnametr = strjoin({basedir, '/map_layers/trails_data_temp.csv'},''); %fnametr = strjoin({basedir, '/map_layers/',save_filename,'/trails_data_.csv'},'');
fnameelev = strjoin({basedir, '/map_layers','/elv_data_.csv'},'');
fnameriv = strjoin({basedir, '/map_layers','/rivers_data_.csv'},'');
fnamerivbd = strjoin({basedir, '/map_layers','/rivers_bdd_data_.csv'},'');
fnamerivin = strjoin({basedir, '/map_layers','/rivers_bdd_inac_data_.csv'},'');
fnameroad = strjoin({basedir, '/map_layers','/roads_data_.csv'},'');
fnamerr = strjoin({basedir, '/map_layers','/railroads_data_.csv'},'');
fnamep = strjoin({basedir, '/map_layers','/powerlines_data_.csv'},'');
fnamelbd = strjoin({basedir, '/map_layers','/lakes_data_.csv'},'');
fnamelin = strjoin({basedir, '/map_layers','/lakes_inac_data_.csv'},'');
fnametr = strjoin({basedir, '/map_layers','/trails_data_.csv'},'');
Zelev = load(fnameelev); Zelev = load(fnameelev);
BWriver = load(fnameriv); BWriver = load(fnameriv);
......
lat lon points at the cornerns of each map, points are listed starting with the lower left-hand corner and wrapping around the square in the ccw direction
punchbowl
(37.60638757329171, -79.42870152841193)
(37.60638757329171, -79.24903847158804)
(37.74858429321619, -79.24903847158804)
(37.74858429321619, -79.42870152841193)
-----------------
brownmountain
(38.22234117764744, -78.74831152841195)
(38.22234117764744, -78.56864847158805)
(38.36335032216281, -78.56864847158805)
(38.36335032216281, -78.74831152841195)
-----------------
devilsditch
(38.37667118597197, -78.55976152841195)
(38.37667118597197, -78.38009847158806)
(38.51738022690628, -78.38009847158806)
(38.51738022690628, -78.55976152841195)
-----------------
biscuitrun
(37.920088870781036, -78.61781152841195)
(37.920088870781036, -78.43814847158804)
(38.06168280503042, -78.43814847158804)
(38.06168280503042, -78.61781152841195)
-----------------
priest
(37.75420928537992, -79.17174152841194)
(37.75420928537992, -78.99207847158804)
(37.89612249025089, -78.99207847158804)
(37.89612249025089, -79.17174152841194)
-----------------
sanbernardino
(34.05311557052717, -117.02230152841194)
(34.05311557052717, -116.84263847158803)
(34.20183901911491, -116.84263847158803)
(34.20183901911491, -117.02230152841194)
-----------------
\ No newline at end of file
This diff is collapsed.
...@@ -4,38 +4,46 @@ import csv ...@@ -4,38 +4,46 @@ import csv
import numpy as np import numpy as np
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
with open("C:\\Users\\Larkin\\ags_grabber\\DevilsDitch_hikers.csv") as f: # params = [37.67752, -79.33887, 'punchbowl']
reader = csv.reader(f, delimiter=',') # # params = [38.29288, -78.65848, 'brownmountain']
headers = next(reader) # # params = [38.44706, -78.46993, 'devilsditch']
data = list(reader) # # params = [37.99092, -78.52798, 'biscuitrun']
# # params = [37.82520, -79.081910, 'priest']
# plot each track based on order column # # params = [34.12751, -116.93247, 'sanbernardino']
done = False #
last_idx = 0 # with open("C:\\Users\\Larkin\\ags_grabber\\track_temp.csv") as f:
start_idx = 0 # reader = csv.reader(f, delimiter=',')
# data = []
ap = [38.44706, -78.46993] # for row in reader:
ap_meters = lat_lon2meters(ap[0], ap[1]) # if any(x.strip() for x in row):
# data.append(row)
# track = np.array(data).astype(np.float)
#
# ap_meters = lat_lon2meters(params[0], params[1])
extent = 20e3 extent = 20e3
scale_factor = 3/20 # factor to get 6.66667m mapping from 1m mapping (1/6.6667) scale_factor = 3/20 # factor to get 6.66667m mapping from 1m mapping (1/6.6667)
#
order = [np.int(d[0]) for d in data] # order column # xy = lat_lon2meters(track[:,1], track[:,0])
lat_lon = np.array([[np.float(d[1]), np.float(d[2])] for d in data]) #
# x_pts = (np.array(xy[0]) - (ap_meters[0] - (extent/2)))*scale_factor # reduces number of interpolants
for i in range(order.count(1)): # y_pts = (np.array(xy[1]) - (ap_meters[1] - (extent/2)))*scale_factor
if i == order.count(1)-1: # last iterations #
xy = lat_lon2meters(lat_lon[start_idx:,0], lat_lon[start_idx:,1]) # np.savetxt(params[2] + '_track_meters.csv',np.array([x_pts, y_pts]),delimiter=",", fmt='%f')
plt.plot(xy[0],xy[1]) # plt.plot(x_pts, y_pts)
# plt.show()
x_pts = (np.array(xy[0]) - (ap_meters[0] - (extent/2)))*scale_factor # reduces number of interpolants
y_pts = (np.array(xy[1]) - (ap_meters[1] - (extent/2)))*scale_factor points = [[37.67752, -79.33887, 'punchbowl'],
[38.29288, -78.65848, 'brownmountain'],
np.savetxt('devilsditch_track_meters.csv',np.array([x_pts, y_pts]),delimiter=",", fmt='%f') [38.44706, -78.46993, 'devilsditch'],
else: [37.99092, -78.52798, 'biscuitrun'],
last_idx = order.index(1,last_idx+1) [37.82520, -79.081910, 'priest'],
xy = lat_lon2meters(lat_lon[start_idx:last_idx,0], lat_lon[start_idx:last_idx,1]) [34.12751, -116.93247, 'sanbernardino']]
plt.plot(xy[0],xy[1])
start_idx = last_idx for pt in points:
# plt.show() pt_meters = lat_lon2meters(pt[0], pt[1])
# print(len(xy[0])) print(pt[2])
print(meters2lat_lon(pt_meters[0] - extent/2, pt_meters[1] - extent/2))
print(meters2lat_lon(pt_meters[0] + extent/2, pt_meters[1] - extent/2))
print(meters2lat_lon(pt_meters[0] + extent/2, pt_meters[1] + extent/2))
print(meters2lat_lon(pt_meters[0] - extent/2, pt_meters[1] + extent/2))
print("-----------------")
\ No newline at end of file
-116.93247,34.12751
-116.93226,34.12758
-116.93204,34.12769
-116.93179,34.12769
-116.93153,34.12776
-116.93131,34.12773
-116.93106,34.12769
-116.9308,34.12769
-116.93054,34.12769
-116.93028,34.12769
-116.93003,34.12769
-116.92977,34.12773
-116.92951,34.12776
-116.9293,34.12769
-116.92913,34.12758
-116.92891,34.12751
-116.92878,34.12741
-116.92861,34.12733
-116.92848,34.12723
-116.92831,34.12716
-116.92818,34.12705
-116.9281,34.12691
-116.92792,34.12676
-116.92797,34.12691
-116.92797,34.12712
-116.92784,34.12701
-116.92771,34.12691
-116.92754,34.12676
-116.92737,34.12669
-116.92728,34.12651
-116.92715,34.12641
-116.92707,34.12626
-116.92689,34.12616
-116.92681,34.12601
-116.92664,34.12594
-116.92655,34.1258
-116.92634,34.12576
-116.92621,34.12566
-116.92604,34.12559
-116.92586,34.12544
-116.92569,34.12534
-116.92548,34.12526
-116.92522,34.12519
-116.92496,34.12519
-116.92492,34.12501
-116.92471,34.12494
-116.92449,34.12491
-116.92428,34.12484
-116.9241,34.12476
-116.92389,34.12484
-116.92385,34.12509
-116.9238,34.12534
-116.92376,34.12559
-116.92372,34.12584
-116.92368,34.12609
-116.92359,34.1263
-116.92355,34.12655
-116.92342,34.12676
-116.92333,34.12698
-116.9232,34.12716
-116.92312,34.12737
-116.92299,34.12755
-116.92282,34.12769
-116.92269,34.12791
-116.92256,34.12808
-116.92243,34.12826
-116.92226,34.12848
-116.92213,34.12869
-116.92217,34.12887
-116.92209,34.12908
-116.92196,34.12926
-116.92183,34.12944
-116.9217,34.12962
-116.92157,34.1298
-116.92144,34.12998
-116.92132,34.13015
-116.92114,34.13033
-116.92101,34.13051
-116.92089,34.13076
-116.92076,34.13101
-116.92071,34.13126
-116.92054,34.1314
-116.92037,34.13155
-116.92024,34.1318
-116.92016,34.13201
-116.92003,34.13222
-116.92003,34.13251
-116.91994,34.13276
-116.91977,34.13294
-116.91964,34.13312
-116.91951,34.13337
-116.91943,34.13358
-116.91943,34.13387
-116.91938,34.13412
-116.91934,34.13437
-116.91921,34.13454
-116.91908,34.13476
-116.91904,34.13501
-116.91904,34.13529
-116.91908,34.13554
-116.91917,34.13576
-116.9193,34.13594
-116.91926,34.13619
-116.91938,34.1364
-116.91951,34.13661
-116.9196,34.13683
-116.91973,34.13704
-116.91977,34.13729
-116.91977,34.13758
-116.91964,34.13776
-116.91947,34.1379
-116.91934,34.13808
-116.91921,34.13825
-116.91908,34.13843
-116.91891,34.13858
-116.9187,34.13868
-116.91853,34.13858
-116.91844,34.13843
-116.91831,34.13829
-116.91814,34.13818
-116.91801,34.13808
-116.91788,34.13797
-116.9178,34.13783
-116.91767,34.13772
-116.91754,34.13761
-116.91745,34.13747
-116.91732,34.13736
-116.9172,34.13722
-116.91707,34.13708
-116.91694,34.13693
-116.91681,34.13683
-116.91659,34.13676
-116.91634,34.13676
-116.91612,34.13672
-116.91629,34.13686
-116.91647,34.13701
-116.91668,34.13711
-116.91694,34.13722
-116.91711,34.1374
-116.91728,34.13754
-116.91745,34.13768
-116.91767,34.13783
-116.91775,34.13804
-116.91784,34.13818
-116.9181,34.13825
-116.91831,34.13836
-116.91848,34.1384
-116.91865,34.13843
-116.9187,34.13825
-116.9187,34.13804
-116.9187,34.13783
-116.91865,34.13761
-116.91857,34.13747
-116.91861,34.13772
-116.9187,34.13793
-116.91874,34.13818
-116.91874,34.13847
-116.91878,34.13872
-116.91883,34.13886
-116.91891,34.13908
-116.91895,34.13922
-116.91908,34.1394
-116.91921,34.13958
-116.91943,34.13972
-116.9196,34.13986
-116.91977,34.14004
-116.91994,34.14022
-116.92007,34.14043
-116.92024,34.14061
-116.92041,34.14075
-116.9205,34.14093
-116.92063,34.14111
-116.92084,34.14125
-116.92101,34.14139
-116.92119,34.14154
-116.9214,34.14168
-116.92166,34.14175
-116.92179,34.14193
-116.92196,34.14207
-116.92217,34.14222
-116.92239,34.14239
-116.92247,34.14261
-116.92247,34.14275
-116.92247,34.14289
-116.92256,34.14311
-116.92269,34.14332
-116.92269,34.14346
-116.92273,34.14361
-116.92273,34.14375
-116.92286,34.14393
-116.92295,34.14414
-116.92303,34.14436
-116.92307,34.14461
-116.92312,34.14486
-116.9232,34.14507
-116.92325,34.14521
-116.92342,34.14536
-116.92359,34.14557
-116.92372,34.14571
-116.92385,34.14593
-116.92402,34.1461
-116.92423,34.14628
-116.92445,34.14643
-116.92462,34.1466
-116.92479,34.14678
-116.92496,34.14696
-116.92513,34.1471
-116.92535,34.14728
-116.92552,34.14743
-116.92565,34.14764
-116.92569,34.14789
-116.92569,34.14817
-116.92556,34.14839
-116.92565,34.14853
-116.92586,34.14867
-116.92591,34.14892
-116.92595,34.14917
-116.92604,34.14939
-116.92616,34.14957
-116.92642,34.14964
-116.92655,34.14953
-116.92659,34.14935
-116.92668,34.14921
-116.92677,34.14907
-116.92689,34.14896
-116.92711,34.14892
-116.92737,34.14892
-116.92754,34.1491
-116.92762,34.14932
-116.92771,34.14953
-116.9278,34.14974
-116.9278,34.15003
-116.9278,34.15032
-116.92784,34.15056
-116.92792,34.15081
-116.92805,34.15103
-116.92818,34.15121
-116.92835,34.15135
-116.92827,34.15156
-116.92822,34.15181
-116.92822,34.15199
-116.92818,34.15224
-116.92801,34.15246
-116.92792,34.15267
-116.92792,34.15296
-116.92788,34.1531
-116.92771,34.15328
-116.92758,34.15345
-116.92754,34.1537
-116.92758,34.15385
-116.92767,34.15406
-116.92788,34.1542
-116.92792,34.15435
-116.92801,34.15456
-116.92827,34.15463
-116.92852,34.1547
-116.92874,34.15481
-116.929,34.15492
-116.92921,34.15506
-116.92938,34.15513
-116.9296,34.15524
-116.92981,34.15535
-116.92998,34.15552
-116.9302,34.15567
-116.93028,34.15588
-116.9302,34.1561
-116.93003,34.15624
-116.93003,34.15652
-116.93003,34.15681
-116.93007,34.15706
-116.9302,34.15724
-116.9305,34.15724
-116.9308,34.15727
-116.93106,34.15731
-116.93127,34.15745
-116.93136,34.15763
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment