Last change
on this file since 7244 was
5780,
checked in by ole, 16 years ago
|
Added contributed code from Petar Milevski
|
File size:
650 bytes
|
Line | |
---|
1 | """ Converts Points Data in csv format to NETCDF DEM |
---|
2 | for use in Anuga 2D model |
---|
3 | |
---|
4 | """ |
---|
5 | |
---|
6 | |
---|
7 | import os |
---|
8 | import time |
---|
9 | import sys |
---|
10 | from anuga.geospatial_data.geospatial_data import Geospatial_data |
---|
11 | |
---|
12 | basename = 'csv' #input file name |
---|
13 | elevation_file = 'csv' #input file name |
---|
14 | meshname = 'csv.msh' |
---|
15 | |
---|
16 | # Create pts file |
---|
17 | print 'Reading and Converting', elevation_file |
---|
18 | print '... This might take a minute or so depending on file size.....' |
---|
19 | print '... STILL WORKING....' |
---|
20 | G = Geospatial_data(elevation_file+'.csv') |
---|
21 | G.export_points_file(basename+'.pts') |
---|
22 | print 'Creating', meshname |
---|
23 | |
---|
24 | print 'New Files Created OK:' |
---|
25 | key= raw_input('Hit Any Key to End') |
---|
Note: See
TracBrowser
for help on using the repository browser.