source: production/onslow_2006/plot_data_extent.py @ 2863

Last change on this file since 2863 was 2860, checked in by sexton, 19 years ago

updates for reports

File size: 1.5 KB
Line 
1from pylab import *
2from geospatial_data import *
3from pmesh.create_mesh import convert_points_from_latlon_to_utm
4from coordinate_transforms.redfearn import degminsec2decimal_degrees
5from os import sep
6from utilities.polygon import inside_polygon
7import project
8
9
10datadir = project.datadir
11ion()
12hold(False)
13   
14file1 = datadir+'onslow_onshore_30m_dted.pts'
15file2 = datadir+'onslow_offshore_points.xya'
16
17G1 = Geospatial_data(file_name = file1)
18G2 = Geospatial_data(file_name = file2)
19
20pts1 = G1.get_data_points(absolute = True)
21pts2 = G2.get_data_points(absolute = True)
22z1 = G1.get_attributes()
23z2 = G2.get_attributes()
24
25minz1 = min(z1)
26maxz1 = max(z1)
27minz2 = min(z2)
28maxz2 = max(z2)
29
30print ''
31print 'Offshore elevation in range [%.2f %.2f]   ' %(minz1, maxz1)
32print 'Onshore elevation in range [%.2f %.2f]   ' %(minz2, maxz2)
33print ''
34
35minelev = min(minz1,minz2)
36maxelev = max(maxz1,maxz2)
37
38# bounding polygon for Onslow scenario
39polygon_bound = project.polyAll
40
41x_bound = []
42y_bound = []
43n = len(polygon_bound)
44for i in range(n+1):
45    if i == n:
46        thispt = polygon_bound[0]
47    else:
48        thispt = polygon_bound[i]
49    x_bound.append(thispt[0])
50    y_bound.append(thispt[1])
51
52# interior regions
53figure(1)
54plot(pts1[:,0],pts1[:,1],'g.',
55     pts2[:,0],pts2[:,1],'b.',
56     x_bound,y_bound,'r-')
57#title('Offhore (g) and onshore (b) data: Onslow scenario. \n Elevation in range [%.2f %.2f]' %(minelev, maxelev))
58xlabel('x')
59ylabel('y')
60savefig('onslow_data_extent')
61
62
Note: See TracBrowser for help on using the repository browser.