1 | """Common filenames and locations for topographic data, meshes and outputs. |
---|
2 | Also includes origin for slump scenario. |
---|
3 | """ |
---|
4 | |
---|
5 | from os import sep, environ |
---|
6 | from os.path import expanduser |
---|
7 | from anuga.utilities.polygon import read_polygon |
---|
8 | import sys |
---|
9 | |
---|
10 | from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees, convert_from_latlon_to_utm |
---|
11 | |
---|
12 | |
---|
13 | #Making assumptions about the location of scenario data |
---|
14 | state = 'new_south_wales' |
---|
15 | scenario_dir_name = 'sydney_tsunami_scenario_2006' |
---|
16 | # revised 100m data |
---|
17 | coarsename = 'bathyland100' # get from Neil/Ingo (DEM or topo data) |
---|
18 | # revised 25m data |
---|
19 | finename = 'bathy_dem25' # get from Neil/Ingo (DEM or topo data) Wed 25 Jan |
---|
20 | |
---|
21 | # creating easting and northing max and min for fine data - region of interest |
---|
22 | eastingmin = 332090 |
---|
23 | eastingmax = 347500 |
---|
24 | northingmin = 6246250 |
---|
25 | northingmax = 6264100 |
---|
26 | |
---|
27 | # creating easting and northing max and min for export viz purposes |
---|
28 | eminviz = 318000 |
---|
29 | emaxviz = 351000 |
---|
30 | nminviz = 6231000 |
---|
31 | nmaxviz = 6283000 |
---|
32 | |
---|
33 | basename = 'slump_duncan' |
---|
34 | basename2 = 'slump_1000res_1min' |
---|
35 | basename4 = 'slump_poly_ingo_test' |
---|
36 | |
---|
37 | if sys.platform == 'win32': |
---|
38 | home = environ['INUNDATIONHOME'] #Sandpit's parent dir |
---|
39 | else: |
---|
40 | home = expanduser('~') |
---|
41 | |
---|
42 | # INUNDATIONHOME is the inundation directory, not the data directory. |
---|
43 | home += sep +'data' |
---|
44 | |
---|
45 | #Derive subdirectories and filenames |
---|
46 | meshdir = home+sep+state+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep |
---|
47 | datadir = home+sep+state+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep |
---|
48 | outputdir = home+sep+state+scenario_dir_name+sep+'anuga'+sep+'output'+sep |
---|
49 | polygondir = home+sep+state+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep |
---|
50 | gaugedir = home+sep+state+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep |
---|
51 | #reportdir = home+sep+state+scenario_dir_name+sep+'reports'+sep |
---|
52 | |
---|
53 | meshname = meshdir + basename |
---|
54 | meshelevname = meshdir + 'test_elev.tsh' |
---|
55 | meshname4 = meshdir + basename4 |
---|
56 | coarsedemname = datadir + coarsename |
---|
57 | finedemname = datadir + finename |
---|
58 | combineddemname = datadir + 'sydneytopo' |
---|
59 | outputname = outputdir + basename #Used by post processing |
---|
60 | outputname2 = outputdir+sep+'Coast_Polygons'+sep+'res1000'+sep+basename2 #Used by post processing |
---|
61 | |
---|
62 | #csv file of coastline 50m epsilon belt |
---|
63 | #manly_polygonname = polygondir + 'manly_polygon_UTM56_coarse' |
---|
64 | #manly_polygon = read_polygon(manly_polygonname + '.csv') |
---|
65 | #print manly_polygon |
---|
66 | |
---|
67 | gauge_filename = gaugedir + 'sydney_gauges.xya' |
---|
68 | buildings_filename = gaugedir + 'all_bld_ind.csv' |
---|
69 | #gauge_filename = gaugedir + 'sydney_gauges_test.xya' |
---|
70 | gauge_outname = gaugedir + 'gauges_max_output.xya' |
---|
71 | #gauge_filename = gaugedir + 'nest_gauges_Manly.xya' |
---|
72 | #gauge_filename = gaugedir + 'west_of_quay_yprofile.xya' |
---|
73 | #gauge_filename = gaugedir + 'GA_gauge.csv' # from Benfield |
---|
74 | #gauge_outname = gaugedir + 'gauges_max_output_next.xya' |
---|
75 | gaugetimeseries = gaugedir + 'gauges_time_series' |
---|
76 | polygonptsfile = polygondir + 'poly' |
---|
77 | integraltimeseries = outputdir + 'integral_time_series' |
---|
78 | integraltimeseries2 = outputdir + 'integral_time_series_move_origin' |
---|
79 | |
---|
80 | |
---|
81 | #Georeferencing |
---|
82 | from anuga.coordinate_transforms.redfearn import degminsec2decimal_degrees |
---|
83 | |
---|
84 | # define clipping polygon |
---|
85 | south = degminsec2decimal_degrees(-34,05,0) |
---|
86 | north = degminsec2decimal_degrees(-33,33,0) |
---|
87 | west = degminsec2decimal_degrees(151,1,0) |
---|
88 | east = degminsec2decimal_degrees(151,30,0) |
---|
89 | p0 = [south, west] |
---|
90 | p1 = [south, east] |
---|
91 | p2 = [north, east] |
---|
92 | p3 = [north, west] |
---|
93 | |
---|
94 | polygonall, zone = convert_from_latlon_to_utm([p0, p1, p2, p3]) |
---|
95 | refzone = zone |
---|
96 | |
---|
97 | print 'Got refzone', refzone |
---|
98 | |
---|
99 | # original clipping |
---|
100 | dsouth = degminsec2decimal_degrees(-34,05,0) |
---|
101 | dsouth2 = degminsec2decimal_degrees(-34,01,0) |
---|
102 | dnorth = degminsec2decimal_degrees(-33,33,0) |
---|
103 | dnorth1 = degminsec2decimal_degrees(-33,40,0) |
---|
104 | dnorth2 = degminsec2decimal_degrees(-33,58,30) |
---|
105 | dnorth3 = degminsec2decimal_degrees(-33,46,0) |
---|
106 | dwest = degminsec2decimal_degrees(151,1,0) |
---|
107 | deast1 = degminsec2decimal_degrees(151,20,0) |
---|
108 | deast2 = degminsec2decimal_degrees(151,48,0) |
---|
109 | deast3 = degminsec2decimal_degrees(151,10,0) |
---|
110 | deast4 = degminsec2decimal_degrees(151,9,0) |
---|
111 | |
---|
112 | dp0 = [dsouth, dwest] |
---|
113 | dp1 = [dsouth, deast1] |
---|
114 | dp2 = [dnorth2, deast2] |
---|
115 | dp3 = [dnorth1, deast2] |
---|
116 | dp4 = [dnorth, deast1] |
---|
117 | dp5 = [dnorth, deast4] |
---|
118 | dp6 = [dnorth3, deast3] |
---|
119 | dp7 = [dnorth3, dwest] |
---|
120 | dp8 = [dnorth, dwest] |
---|
121 | |
---|
122 | dp12 = [dsouth2, deast2] |
---|
123 | dp34 = [dnorth, deast2] |
---|
124 | diffpolygonall, zone = convert_from_latlon_to_utm([dp0, dp1, dp2, dp3, dp4, dp5, dp6, dp7]) |
---|
125 | # used for new tests 4 April 2006 (ensure slump contained in domain) |
---|
126 | diffpolygonall2, zone = convert_from_latlon_to_utm([dp0, dp1, dp12, dp34, dp4, dp5, dp6, dp7]) |
---|
127 | |
---|
128 | # clipping used for look at increasingly finer resolution |
---|
129 | j0 = [338000, 6243000] |
---|
130 | j1 = [365000, 6243000] |
---|
131 | j2 = [365000, 6273000] |
---|
132 | j3 = [338000, 6273000] |
---|
133 | |
---|
134 | diffpolygonall_test = [j0, j1, j2, j3] |
---|
135 | # clipping used for further investigation of black screen of death |
---|
136 | j0 = [328000, 6255000] |
---|
137 | j1 = [355000, 6255000] |
---|
138 | j2 = [355000, 6270000] |
---|
139 | j3 = [328000, 6270000] |
---|
140 | |
---|
141 | diffpolygonall_test2 = [j0, j1, j2, j3] |
---|
142 | |
---|
143 | # clipping used for demo purposes to fit around poly3 and poly4 (Ingo's files) |
---|
144 | #j0 = [318000, 6249000] |
---|
145 | #j1 = [387000, 6249000] |
---|
146 | #j2 = [387000, 6270000] |
---|
147 | #j3 = [318000, 6270000] |
---|
148 | |
---|
149 | #demopoly = [j0, j1, j2, j3] |
---|
150 | |
---|
151 | # second demo poly which isn't rectangular |
---|
152 | j0 = [385000, 6280000] |
---|
153 | j1 = [360000, 6272500] |
---|
154 | j2 = [335000, 6272500] |
---|
155 | j3 = [330000, 6265000] |
---|
156 | j31 = [325000, 6260000] |
---|
157 | j4 = [316000, 6260000] |
---|
158 | j5 = [316000, 6247000] |
---|
159 | j6 = [350000, 6247000] |
---|
160 | j7 = [385000, 6238000] |
---|
161 | |
---|
162 | demopoly = [j0, j1, j2, j3, j31, j4, j5, j6, j7] |
---|
163 | |
---|
164 | # to put chunk back in |
---|
165 | #diffpolygonall = [dp0, dp1, dp2, dp3, dp4, dp8] |
---|
166 | |
---|
167 | # testing new interior regions 15 Feb 06 |
---|
168 | # these worked OK it seemed, no warnings and resulting mesh looked fine. |
---|
169 | pp0 = [343965, 6273229] |
---|
170 | pp1 = [342984, 6270664] |
---|
171 | pp2 = [343950, 6270005] |
---|
172 | pp3 = [343853, 6270399] |
---|
173 | pp4 = [343383, 6270925] |
---|
174 | pp5 = [343756, 6271926] |
---|
175 | pp6 = [344037, 6272401] |
---|
176 | pp7 = [344405, 6272503] |
---|
177 | pp8 = [344226, 6273244] |
---|
178 | |
---|
179 | poly1 = [pp0, pp1, pp2, pp3, pp4, pp5, pp6, pp7, pp8] |
---|
180 | |
---|
181 | qp0 = [343494.0, 6270650.0] |
---|
182 | qp1 = [343337.0, 6270303.0] |
---|
183 | qp2 = [343466.0, 6270228.0] |
---|
184 | qp3 = [343139.0, 6269901.0] |
---|
185 | qp4 = [342472.0, 6268573.0] |
---|
186 | qp5 = [342111.0, 6267115.0] |
---|
187 | qp6 = [342479.0, 6266121.0] |
---|
188 | qp7 = [342860.0, 6266386.0] |
---|
189 | qp8 = [342635.0, 6267438.0] |
---|
190 | qp9 = [343105.0, 6269070.0] |
---|
191 | qp10 = [343548.0, 6269567.0] |
---|
192 | qp11 = [343487.0, 6269928.0] |
---|
193 | qp12 = [343991.0, 6270269.0] |
---|
194 | |
---|
195 | poly2 = [qp0, qp1, qp2, qp3, qp4, qp5, qp6, qp7, qp8, qp9, qp10, qp11, qp12] |
---|
196 | #poly2 = [qp5, qp6, qp7, qp8, qp9, qp10] |
---|
197 | |
---|
198 | # test from Jane drawing |
---|
199 | # north |
---|
200 | np1 = [318200, 6253000] |
---|
201 | np2 = [327000, 6250500] |
---|
202 | np2east = [327200, 6250500] |
---|
203 | np2west = [326800, 6250500] |
---|
204 | np3 = [333000, 6249000] |
---|
205 | np4 = [342000, 6249000] |
---|
206 | np5 = [342000, 6255000] |
---|
207 | np6 = [343000, 6256000] |
---|
208 | np7 = [344000, 6258000] |
---|
209 | np8 = [343000, 6260300] |
---|
210 | #np8 = [343000, 6260000] |
---|
211 | np9 = [343000, 6264000] |
---|
212 | np10 = [345000, 6265000] |
---|
213 | np10_2 = [344500, 6265000] |
---|
214 | np10_3 = [344200, 6265000] |
---|
215 | np11 = [343000, 6266000] |
---|
216 | np12 = [344000, 6269000] |
---|
217 | np13 = [344000, 6272000] |
---|
218 | np14 = [342000, 6272000] |
---|
219 | np15 = [339000, 6269000] |
---|
220 | np16 = [339000, 6264000] |
---|
221 | #np17 = [332000, 6264000] |
---|
222 | np17 = [332500, 6262000] |
---|
223 | np18 = [334000, 6254000] |
---|
224 | np19 = [329000, 6257000] |
---|
225 | np20 = [330000, 6259000] |
---|
226 | #np21 = [327000, 6262000] |
---|
227 | np21 = [327000, 6259000] |
---|
228 | np22 = [327000, 6257000] |
---|
229 | np23 = [318200, 6257000] |
---|
230 | np24 = [335000, 6261000] |
---|
231 | np25 = [336000, 6262000] |
---|
232 | np26 = [338000, 6262000] |
---|
233 | np27 = [340000, 6264000] |
---|
234 | np28 = [334000, 6250000] |
---|
235 | np29 = [336000, 6250000] |
---|
236 | np30 = [341500, 6250000] |
---|
237 | np31 = [327000, 6254000] |
---|
238 | np32 = [323000, 6257000] |
---|
239 | np33 = [335000, 6255000] |
---|
240 | np34 = [337000, 6256000] |
---|
241 | np35 = [338000, 6255000] |
---|
242 | np36 = [320000, 6254000] |
---|
243 | np37 = [322000, 6252000] |
---|
244 | np38 = [324000, 6253000] |
---|
245 | np39 = [325000, 6251000] |
---|
246 | nptest = [339000, 6266000] |
---|
247 | nptest2 = [344000, 6265000] |
---|
248 | |
---|
249 | #testpoly1 = [np1, \ |
---|
250 | # np36, np37, np38, np39, \ |
---|
251 | # np2, np3, \ |
---|
252 | # np28, np29, np30, \ |
---|
253 | # np5, np6, np7, np8, np9, np10, \ |
---|
254 | # np11, np12, np13, np14, np15, \ |
---|
255 | # np27, np26, np25, np24, \ |
---|
256 | # np17, \ |
---|
257 | # np33, np34, np35, \ |
---|
258 | # np18, np19, np20, \ |
---|
259 | # np21, np22, \ |
---|
260 | # np31, np32, \ |
---|
261 | # np23] |
---|
262 | |
---|
263 | # reduce this polygon for black screen of death testing 24/04/06 |
---|
264 | #newpoly1_refine = [nptest, np27, np16] # worked |
---|
265 | #newpoly1_refine = [np9, np10, np11] # worked |
---|
266 | #newpoly1_refine = [np9, np10, np11, nptest2] # worked |
---|
267 | #newpoly1_refine = [np9, np10_2, np11, nptest2] # worked |
---|
268 | newpoly1_refine = [np9, np10_3, np11, nptest2] # worked |
---|
269 | |
---|
270 | # used for refined interior regions and fine mesh |
---|
271 | newpoly1 = [np28, np29, np30, \ |
---|
272 | np5, np6, np7, np8, np9, np10, \ |
---|
273 | np11, np12, np13, np14, np15, \ |
---|
274 | np27, np26, np25, np24, np17, \ |
---|
275 | np33, \ |
---|
276 | np19, np20, np21, np22, np31, np32, \ |
---|
277 | np36, np37, np38, np39, np2, np3] |
---|
278 | |
---|
279 | # last two lines for second run |
---|
280 | |
---|
281 | north1 = [np2, np3, np30, np5, np24, np17, np33, np19, np20, np21, \ |
---|
282 | np31, np32, np37, np38, np39] |
---|
283 | north2 = [np8, np9, np19, np11, np12, np13, np14, np15, np27, np27, np25] |
---|
284 | npinsert = [332000, 6255000] |
---|
285 | parrariver = [np3, np18, npinsert, np19, np32, np36, np38, np39, np2] #first run |
---|
286 | #parrariver = [np32, np36, np37, np38, np39, np2west, np31] #second run |
---|
287 | |
---|
288 | # south |
---|
289 | sp1 = [ 328000, 6231000] |
---|
290 | sp2 = [335000, 6231000] |
---|
291 | sp3 = [338000, 6235000] |
---|
292 | sp4 = [340000, 6240000] |
---|
293 | sp5 = [340000, 6244000] |
---|
294 | sp6 = [342000, 6248800] |
---|
295 | sp7 = [340000, 6248800] |
---|
296 | sp8 = [338000, 6244000] |
---|
297 | sp9 = [338000, 6237000] |
---|
298 | sp10 = [334000, 6242000] |
---|
299 | sp11 = [331000, 6245000] |
---|
300 | sp12 = [326000, 6247000] |
---|
301 | sp13 = [325000, 6246000] |
---|
302 | sp14 = [329000, 6243000] |
---|
303 | sp15 = [328000, 6237000] |
---|
304 | sp16 = [337000, 6236000] |
---|
305 | sp17 = [330000, 6237000] |
---|
306 | sp18 = [330000, 6239000] |
---|
307 | sp19 = [332000, 6239000] |
---|
308 | sp20 = [334000, 6240000] |
---|
309 | sp21 = [334000, 6238000] |
---|
310 | sp22 = [337000, 6236500] |
---|
311 | sp23 = [339000, 6236000] |
---|
312 | |
---|
313 | #original |
---|
314 | south1 = [sp1, sp2, sp3, \ |
---|
315 | sp16, sp17, sp18, sp19, sp20, sp21, sp22, sp23, \ |
---|
316 | sp4, sp5, sp6, sp7, sp8, sp9, sp10, \ |
---|
317 | sp11, sp12, sp13, sp14, sp15] |
---|
318 | |
---|
319 | m1 = [340000, 6256000] |
---|
320 | m2 = [342800, 6256000] |
---|
321 | m3 = [342800, 6261000] |
---|
322 | m4 = [340000, 6260000] |
---|
323 | |
---|
324 | finepolymanly = [m1, m2, m3, m4] |
---|
325 | |
---|
326 | q1 = [333000, 6250000] |
---|
327 | q2 = [340000, 6250000] |
---|
328 | q3 = [340000, 6254000] |
---|
329 | q4 = [333000, 6255000] |
---|
330 | |
---|
331 | finepolyquay = [q1, q2, q3, q4] |
---|
332 | |
---|
333 | # refined 13/03/06 to look at effect of finer resolution on no IC scenario |
---|
334 | q2south = [340000, 6249000] |
---|
335 | newpoly1 = [np28, np29, q2south, sp7, sp8, sp5, sp6, np30, \ |
---|
336 | np5, np6, np7, np8, np9, np10, \ |
---|
337 | np11, np12, np13, np14, np15, \ |
---|
338 | np27, np26, np25, np24, np17, \ |
---|
339 | np33, \ |
---|
340 | np19, np20, np21, np22, np31, np32, \ |
---|
341 | np36, np37, np38, np39, np2, np3] |
---|
342 | |
---|
343 | #Interior regions - the Harbour |
---|
344 | harbour_1x = degminsec2decimal_degrees(-33,51,0) |
---|
345 | harbour_1y = degminsec2decimal_degrees(151,2,30) |
---|
346 | harbour_12x = degminsec2decimal_degrees(-33,51,0) |
---|
347 | harbour_12y = degminsec2decimal_degrees(151,5,0) |
---|
348 | harbour_13x = degminsec2decimal_degrees(-33,52,15) |
---|
349 | harbour_13y = degminsec2decimal_degrees(151,5,0) |
---|
350 | harbour_2x = degminsec2decimal_degrees(-33,53,0) |
---|
351 | harbour_2y = degminsec2decimal_degrees(151,17,20) |
---|
352 | harbour_3x = degminsec2decimal_degrees(-33,47,0) |
---|
353 | harbour_3y = degminsec2decimal_degrees(151,20,30) |
---|
354 | harbour_4x = degminsec2decimal_degrees(-33,47,50) |
---|
355 | harbour_4y = degminsec2decimal_degrees(151,8,10) |
---|
356 | harbour_5x = degminsec2decimal_degrees(-33,48,10) |
---|
357 | harbour_5y = degminsec2decimal_degrees(151,8,0) |
---|
358 | harbour_6x = degminsec2decimal_degrees(-33,49,0) |
---|
359 | harbour_6y = degminsec2decimal_degrees(151,2,30) |
---|
360 | harbour_7x = degminsec2decimal_degrees(-33,34,30) |
---|
361 | harbour_7y = degminsec2decimal_degrees(151,20,20) |
---|
362 | harbour_8x = degminsec2decimal_degrees(-33,33,30) |
---|
363 | harbour_8y = degminsec2decimal_degrees(151,17,0) |
---|
364 | harbour_9x = degminsec2decimal_degrees(-33,45,30) |
---|
365 | harbour_9y = degminsec2decimal_degrees(151,17,0) |
---|
366 | harbour_10x = degminsec2decimal_degrees(-33,45,10) |
---|
367 | harbour_10y = degminsec2decimal_degrees(151,11,40) |
---|
368 | harbour_11x = degminsec2decimal_degrees(-33,45,10) |
---|
369 | harbour_11y = degminsec2decimal_degrees(151,11,40) |
---|
370 | harbour_14x = degminsec2decimal_degrees(-33,49,10) |
---|
371 | harbour_14y = degminsec2decimal_degrees(151,11,40) |
---|
372 | harbour_15x = degminsec2decimal_degrees(-33,48,55) |
---|
373 | harbour_15y = degminsec2decimal_degrees(151,2,30) |
---|
374 | |
---|
375 | k02 = [harbour_1x, harbour_1y] |
---|
376 | k12 = [harbour_2x, harbour_2y] |
---|
377 | k22 = [harbour_3x, harbour_3y] |
---|
378 | k32 = [harbour_4x, harbour_4y] |
---|
379 | k42 = [harbour_5x, harbour_5y] |
---|
380 | k52 = [harbour_6x, harbour_6y] |
---|
381 | k62 = [harbour_7x, harbour_7y] |
---|
382 | k72 = [harbour_8x, harbour_8y] |
---|
383 | k82 = [harbour_9x, harbour_9y] |
---|
384 | k92 = [harbour_10x, harbour_10y] |
---|
385 | k102 = [harbour_11x, harbour_11y] |
---|
386 | k112 = [harbour_12x, harbour_12y] |
---|
387 | k122 = [harbour_13x, harbour_13y] |
---|
388 | k132 = [harbour_14x, harbour_14y] |
---|
389 | k142 = [harbour_15x, harbour_15y] |
---|
390 | |
---|
391 | harbour_polygon_2, zone = convert_from_latlon_to_utm([k02, k112, k122, k12, k22, k62, k72, k82, k102, k42, k52]) #worked |
---|
392 | assert zone == refzone |
---|
393 | |
---|
394 | |
---|
395 | #Interior region - Botany Bay |
---|
396 | bb_1x = degminsec2decimal_degrees(-34,3,0) |
---|
397 | bb_1y = degminsec2decimal_degrees(151,2,30) |
---|
398 | bb_10x = degminsec2decimal_degrees(-34,3,0) |
---|
399 | bb_10y = degminsec2decimal_degrees(151,8,0) |
---|
400 | bb_2x = degminsec2decimal_degrees(-34,3,0) |
---|
401 | bb_2y = degminsec2decimal_degrees(151,14,0) |
---|
402 | bb_3x = degminsec2decimal_degrees(-33,53,30) |
---|
403 | bb_3y = degminsec2decimal_degrees(151,17,20) |
---|
404 | bb_4x = degminsec2decimal_degrees(-33,53,0) |
---|
405 | bb_4y = degminsec2decimal_degrees(151,8,0) |
---|
406 | bb_5x = degminsec2decimal_degrees(-33,57,30) |
---|
407 | bb_5y = degminsec2decimal_degrees(151,8,0) |
---|
408 | bb_6x = degminsec2decimal_degrees(-33,57,30) |
---|
409 | bb_6y = degminsec2decimal_degrees(151,2,30) |
---|
410 | bb_7x = degminsec2decimal_degrees(-33,53,30) |
---|
411 | bb_7y = degminsec2decimal_degrees(151,12,30) |
---|
412 | bb_8x = degminsec2decimal_degrees(-33,55,20) |
---|
413 | bb_8y = degminsec2decimal_degrees(151,8,0) |
---|
414 | bb_9x = degminsec2decimal_degrees(-33,55,20) |
---|
415 | bb_9y = degminsec2decimal_degrees(151,12,30) |
---|
416 | |
---|
417 | j02 = [bb_1x, bb_1y] |
---|
418 | j12 = [bb_2x, bb_2y] |
---|
419 | j22 = [bb_3x, bb_3y] |
---|
420 | j32 = [bb_4x, bb_4y] |
---|
421 | j42 = [bb_5x, bb_5y] |
---|
422 | j52 = [bb_6x, bb_6y] |
---|
423 | j62 = [bb_7x, bb_7y] |
---|
424 | j72 = [bb_8x, bb_8y] |
---|
425 | j82 = [bb_9x, bb_9y] |
---|
426 | j92 = [bb_10x, bb_10y] |
---|
427 | |
---|
428 | botanybay_polygon_2, zone = convert_from_latlon_to_utm([j92, j12, j22, j62, j82, j72, j42]) # worked |
---|
429 | |
---|
430 | |
---|
431 | # close to botany bay opening (340000,6236000) |
---|
432 | # x0 = 25964 |
---|
433 | # y0 = 11049 |
---|
434 | # around 10km from botany bay opening (350000,6236000) |
---|
435 | # x0 = 35964 |
---|
436 | # y0 = 11049 |
---|
437 | # around 21km from botany bay opening (361000,6236000) |
---|
438 | #x0 = 46964 |
---|
439 | #y0 = 11049 |
---|
440 | |
---|
441 | # not used for sydney scenario, original interior regions listed though |
---|
442 | # setting up problem area for doing just around the harbour |
---|
443 | hsouth = degminsec2decimal_degrees(-33,54,0) |
---|
444 | hnorth = degminsec2decimal_degrees(-33,48,0) |
---|
445 | hwest = degminsec2decimal_degrees(151,0,0) |
---|
446 | heast = degminsec2decimal_degrees(151,30,0) |
---|
447 | |
---|
448 | hp0 = [hsouth, hwest] |
---|
449 | hp1 = [hsouth, heast] |
---|
450 | hp2 = [hnorth, heast] |
---|
451 | hp3 = [hnorth, hwest] |
---|
452 | polygon_h, zone = convert_from_latlon_to_utm([hp0, hp1, hp2, hp3]) |
---|
453 | |
---|
454 | #Interior regions - the Harbour - take 1 |
---|
455 | harbour_south = degminsec2decimal_degrees(-33,53,0) |
---|
456 | harbour_north = degminsec2decimal_degrees(-33,47,0) |
---|
457 | harbour_west = degminsec2decimal_degrees(151,5,0) |
---|
458 | harbour_east = degminsec2decimal_degrees(151,19,0) |
---|
459 | |
---|
460 | #harbour_south1 = degminsec2decimal_degrees(-33,53,0) |
---|
461 | #harbour_south2 = degminsec2decimal_degrees(-33,52,0) |
---|
462 | #harbour_north1 = degminsec2decimal_degrees(-33,45,0) |
---|
463 | #harbour_north2 = degminsec2decimal_degrees(-33,48,0) |
---|
464 | #harbour_west = degminsec2decimal_degrees(151,5,0) |
---|
465 | #harbour_east = degminsec2decimal_degrees(151,19,0) |
---|
466 | |
---|
467 | k0 = [harbour_south, harbour_west] |
---|
468 | k1 = [harbour_south, harbour_east] |
---|
469 | k2 = [harbour_north, harbour_east] |
---|
470 | k3 = [harbour_north, harbour_west] |
---|
471 | |
---|
472 | harbour_polygon, zone = convert_from_latlon_to_utm([k0, k1, k2, k3]) |
---|
473 | |
---|
474 | # setting up problem area for doing just around Botany Bay |
---|
475 | bsouth = degminsec2decimal_degrees(-33,56,0) |
---|
476 | bnorth = degminsec2decimal_degrees(-34,3,0) |
---|
477 | bwest = degminsec2decimal_degrees(151,0,0) |
---|
478 | beast = degminsec2decimal_degrees(151,30,0) |
---|
479 | |
---|
480 | bp0 = [bsouth, bwest] |
---|
481 | bp1 = [bsouth, beast] |
---|
482 | bp2 = [bnorth, beast] |
---|
483 | bp3 = [bnorth, bwest] |
---|
484 | polygon_bb, zone = convert_from_latlon_to_utm([bp0, bp1, bp2, bp3]) |
---|
485 | |
---|
486 | #Interior region - Botany Bay - take 1 |
---|
487 | botanybay_south = degminsec2decimal_degrees(-33,58,0) |
---|
488 | botanybay_north = degminsec2decimal_degrees(-34,1,0) |
---|
489 | botanybay_west = degminsec2decimal_degrees(151,5,0) |
---|
490 | botanybay_east = degminsec2decimal_degrees(151,18,0) |
---|
491 | |
---|
492 | j0 = [botanybay_south, botanybay_west] |
---|
493 | j1 = [botanybay_south, botanybay_east] |
---|
494 | j2 = [botanybay_north, botanybay_east] |
---|
495 | j3 = [botanybay_north, botanybay_west] |
---|
496 | |
---|
497 | botanybay_polygon, zone = convert_from_latlon_to_utm([j0, j1, j2, j3]) |
---|
498 | assert zone == refzone |
---|
499 | |
---|
500 | #x0 = 28964 + 42000 |
---|
501 | #y0 = 30049 |
---|
502 | #slump_origin = [x0+314036.58727982, y0+6224951.2960092] #Absolute UTM |
---|
503 | slump_origin = [385000.0, 6255000.0] #Absolute UTM |
---|
504 | # move 10km west |
---|
505 | slump_origin2 = [375000.0, 6255000.0] #Absolute UTM |
---|
506 | |
---|
507 | a = [340000, 6255000] |
---|
508 | b = [340000, 6270000] |
---|
509 | c = [318000, 6255000] |
---|
510 | d = [318000, 6270000] |
---|
511 | e = [316000, 6255000] |
---|
512 | f = [395000, 6255000] |
---|
513 | g = [355000, 6280000] |
---|
514 | h = [355000, 6224000] |
---|
515 | test_pts = [a, b, c, d, e, f, g, h] |
---|
516 | test_elev = [1.0, 4.0, 3.0, 0.1, 5, -10.0, -20, -15] |
---|