|
From: Fei L. <Fe...@NJ...> - 2019-07-19 15:40:48
|
Hi Group, I have made some progress, I found out gdal can convert the USGS data into USGSDEM or just plain ASCII file which is a point cloud with each row representing each point x y elevation. How do I import such files into anuga. I guess my question really is how do I define domain (boundary condition) using external bathemetry data. It must be doable, but I haven't found anything in the user manual yet. Thanks, - Fei On 07/17/2019 03:03 PM, Fei Liu wrote: > > Hi, > > 1) I have an ADF file downloaded from USGS website: > > https://viewer.nationalmap.gov/basic/#productSearch > > https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/ArcGrid/USGS_NED_1_n43w084_ArcGrid.zip > > 2) After unzipping this file, the topography file is this 55MB adf > data file > > file grdn43w084_1/w001001.adf > grdn43w084_1/w001001.adf: ESRI Shapefile version 0 length 27774971 > type Null Shape > > ls -la grdn43w084_1/w001001.adf > -rw-r--r-- 1 feiliu feiliu 55549942 Apr 12 13:52 grdn43w084_1/w001001.adf > > 3) In your example you can convert > > import zipfile as zf > if project.verbose: print 'Reading ASC from cairns.zip' > zf.ZipFile(project.name_stem+'.zip').extract(project.name_stem+'.asc') > > # Create DEM from asc data > anuga.asc2dem(project.name_stem+'.asc', use_cache=project.cache, > verbose=project.verbose) > > # Create pts file for onshore DEM > anuga.dem2pts(project.name_stem+'.dem', use_cache=project.cache, > verbose=project.verbose) > > 4) My initial reading of the user manual only found reference about > arcgis file on page 45. > > .import_ungenerate_file(ofile, tag=None, region tag=None) Module: > pmesh.mesh This method is used to import a polygon file in the > ungenerate format, which is used by arcGIS. The polygons from the file > are converted to vertices and segments. ofile is the name of the > polygon file. tag is the tag given to all the polygon’s segments. If > tag is not supplied then the segment will not effect the water flow, > it will only effect the mesh generation. region_tag is the tag given > to all the polygon’s segments. If it is a string the tag will be > assigned to all regions. If it is a list the first value in the list > will be applied to the first polygon etc. This function can be used to > import building footprints. > > 5) I am not sure how I could convert the elevation (topography) ADF > file from USGS to DEM file. Any help would be appreciated. Thanks, > > - Fei > > > > > > > _______________________________________________ > Anuga-user mailing list > Anu...@li... > https://lists.sourceforge.net/lists/listinfo/anuga-user |