Changeset 2922 for production


Ignore:
Timestamp:
May 19, 2006, 2:47:30 PM (19 years ago)
Author:
sexton
Message:

trying to include location of indigeneous communities (need to check projection)

Location:
production
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • production/onslow_2006/damage.tex

    r2870 r2922  
    11
    22this will be a discussion of the damage modelling
     3
     4need to talk about potential impact on indigeneous
     5communities here
     6
     7
     8\begin{figure}[hbt]
     9
     10  \centerline{ \includegraphics[width=100mm, height=75mm]{onslow_communities.png}}
     11
     12  \caption{Location of indigeneous communities in study area.}
     13  \label{fig:communities}
     14\end{figure}
  • production/onslow_2006/plot_data_extent.py

    r2920 r2922  
    1111ion()
    1212
    13 plot_data = True
     13plot_data = False
    1414plot_with_poly = True
     15
     16def read_community_file(filename1, filename2, polygon):
     17    from coordinate_transforms.redfearn import redfearn
     18    from utilities.polygon import inside_polygon
     19    fid1 = open(filename1)
     20    lines = fid1.readlines()
     21    fid1.close()
     22    xlocs = []
     23    ylocs = []
     24    community = []
     25    population = []
     26    line1 = lines[0]
     27    line11 = line1.split(',')
     28    fid2 = open(filename2,'w')
     29    s = 'Easting, Northing, Community, Population\n'
     30    fid2.write(s)
     31    for i in range(len(line11)):
     32        if line11[i].strip('\n').strip(' ') == 'LATITUDE': lat_index = i
     33        if line11[i].strip('\n').strip(' ') == 'LONGITUDE': lon_index = i
     34        if line11[i].strip('\n').strip(' ') == 'COMMUNITY': name_index = i
     35        if line11[i].strip('\n').strip(' ') == 'POPULATION': pop_index = i
     36    for line in lines[1:]:
     37        fields = line.split(',')
     38        lat = float(fields[lat_index])
     39        lon = float(fields[lon_index])
     40        z, easting, northing = redfearn(lat,lon)
     41        v = inside_polygon([easting,northing],polygon)
     42        if v == True:
     43            xlocs.append(easting)
     44            ylocs.append(northing)
     45            community = fields[name_index]
     46            population = fields[pop_index]
     47            s = '%f, %f, %s, %s\n' %(easting, northing, community, population)
     48            fid2.write(s)
     49            print community, easting, northing
     50   
     51    return xlocs, ylocs, community, population
     52
     53def read_file(filename1):
     54    fid1 = open(filename1)
     55    lines = fid1.readlines()
     56    fid1.close()
     57    x = []
     58    y = []
     59    line1 = lines[0]
     60    for line in lines[1:]:
     61        fields = line.split(',')
     62        x.append(float(fields[0]))
     63        y.append(float(fields[1]))
     64   
     65    return x, y
    1566
    1667if plot_data == True:
     
    52103                        figname,
    53104                        verbose = True)
     105    figure(4)
     106    x1, y1 = poly_xy(project.polyAll)
     107    figname = 'onslow_communities'
     108    x, y, community, population= \
     109           read_community_file(project.community_filename, \
     110                               project.community_scenario, project.polyAll)
     111    #coastx, coasty = read_file(project.coast_filename)
     112    #plot(x1,y1,'r-',x,y,'r+', coastx,coasty,'g.')
     113    plot(x1,y1,'r-',x,y,'r+')
     114    xlabel('Eastings')
     115    ylabel('Northings')
     116    savefig(figname)
    54117
    55118close('all')
  • production/onslow_2006/project.py

    r2902 r2922  
    5656#for MOST
    5757gauge_filename = gaugedir + 'onslow_gauges1.xya'
    58 
    59 
     58buildings_filename = gaugedir + 'all_bld_ind.csv'
     59community_filename = gaugedir + 'CHINS_v2.csv'
     60community_scenario = gaugedir + 'community_onslow.csv'
    6061gaugetimeseries = gaugedir + 'onslow'
    6162
  • production/pt_hedland_2006/damage.tex

    r2870 r2922  
    11
    22this will be a discussion of the damage modelling
     3
     4need to talk about potential impact on indigeneous
     5communities here
     6
     7
     8\begin{figure}[hbt]
     9
     10  \centerline{ \includegraphics[width=100mm, height=75mm]{pt_hedland_communities.png}}
     11
     12  \caption{Location of indigeneous communities in study area.}
     13  \label{fig:communities}
     14\end{figure}
  • production/pt_hedland_2006/project.py

    r2902 r2922  
    2121offshore_name2 = 'pt_hedland_offshore_points_fairsheet'
    2222# coastline developed from 30m DTED
    23 coast_name = 'pt_hedland_coastline_points'
     23coast_name = 'pt_hedland_coastline_points.xya'
    2424
    2525boundary_basename = 'SU-AU_clip'
     
    6161#for MOST
    6262gauge_filename = gaugedir + 'pt_hedland_gauges.xya'
    63 
     63community_filename = gaugedir + 'CHINS_v2.csv'
     64community_scenario = gaugedir + 'community_pt_hedland.csv'
    6465tidal_filename = tidedir + 'pt_hedland_tide.txt'
     66coast_filename = datadir + coast_name
    6567
    6668# boundary source data
  • production/pt_hedland_2006/results.tex

    r2920 r2922  
    1212\begin{figure}[hbt]
    1313
    14   \centerline{ \includegraphics[width=75mm, height=75mm]{pt_hedland_data_poly.png}}
     14  \centerline{ \includegraphics[width=100mm, height=75mm]{pt_hedland_data_poly.png}}
    1515
    1616  \caption{Study area for Pt Hedland scenario}
     
    2121\begin{figure}[hbt]
    2222
    23   %\centerline{ \includegraphics[width=75mm, height=75mm]{}}
     23  %\centerline{ \includegraphics[width=100mm, height=75mm]{}}
    2424
    2525  \caption{Computational mesh for Pt Hedland study area}
Note: See TracChangeset for help on using the changeset viewer.