source: production/onslow_2006/plot_data_extent.py @ 2917

Last change on this file since 2917 was 2914, checked in by sexton, 18 years ago

tidying up

File size: 1.6 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
8from pyvolution.util import plot_polygons
9
10datadir = project.datadir
11ion()
12
13plot_data = True
14plot_with_poly = False
15
16if plot_data == True:
17    file1 = datadir+'onslow_onshore_30m_dted.pts'
18    file2 = datadir+'onslow_offshore_points.xya'
19
20    G1 = Geospatial_data(file_name = file1)
21    G2 = Geospatial_data(file_name = file2)
22
23    pts1 = G1.get_data_points(absolute = True)
24    pts2 = G2.get_data_points(absolute = True)
25
26    if plot_with_poly == True:
27        figname = 'onslow_data_poly'
28        figure(1)
29        plot(pts1[:,0],pts1[:,1],'g.',
30             pts2[:,0],pts2[:,1],'b.')
31        vec = plot_polygons(project.polyAll,
32                            [project.poly_onslow, project.poly_coast, project.poly_region],
33                            figname,
34                            verbose = True)
35        axis([])
36        savefig(figname)
37    else:
38        figure(2)
39        plot(pts1[:,0],pts1[:,1],'g.',
40             pts2[:,0],pts2[:,1],'b.')
41        xlabel('x')
42        ylabel('y')
43        savefig('onslow_data_extent')
44else:
45   
46    figure(3)
47    figname = 'onslow_polys'
48    vec = plot_polygons(project.polyAll,
49                        [project.poly_onslow, project.poly_coast, project.poly_region],
50                        figname,
51                        verbose = True)
52
53close('all')
Note: See TracBrowser for help on using the repository browser.