1 | # -*- coding: cp1252 -*- |
---|
2 | """Common filenames and locations for topographic data, meshes and outputs. |
---|
3 | """ |
---|
4 | |
---|
5 | from os import sep, environ, getenv, getcwd |
---|
6 | from os.path import expanduser |
---|
7 | import sys |
---|
8 | from time import localtime, strftime, gmtime |
---|
9 | from anuga.utilities.polygon import read_polygon, plot_polygons_points, polygon_area, is_inside_polygon |
---|
10 | |
---|
11 | #Making assumptions about the location of scenario data |
---|
12 | |
---|
13 | dem_name = 'kembla' |
---|
14 | basename = 'source' |
---|
15 | meshname = 'mesh_' + basename |
---|
16 | combined_dem_name = 'kembla_elevation' |
---|
17 | |
---|
18 | ############################### |
---|
19 | # Domain definitions |
---|
20 | ############################### |
---|
21 | |
---|
22 | # bounding polygon for study area |
---|
23 | polyAll = read_polygon('kembla_domain.csv') |
---|
24 | |
---|
25 | ############################### |
---|
26 | # Interior region definitions |
---|
27 | ############################### |
---|
28 | |
---|
29 | # areaA digitized polygons |
---|
30 | poly_bay = read_polygon('bay.csv') |
---|
31 | |
---|
32 | print 'Area of bay polygon', polygon_area(poly_bay)/1000000.0 |
---|
33 | |
---|
34 | ################################################################### |
---|
35 | # Clipping regions for export to asc and regions for clipping data |
---|
36 | ################################################################### |
---|
37 | |
---|
38 | # exporting asc grid |
---|
39 | eastingmin = 305500 |
---|
40 | eastingmax = 309500 |
---|
41 | northingmin = 6181500 |
---|
42 | northingmax = 6185500 |
---|