Changeset 2407 for inundation/pyvolution/data_manager.py
- Timestamp:
- Feb 14, 2006, 5:19:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/data_manager.py
r2344 r2407 1074 1074 1075 1075 1076 def dem2pts(basename_in, basename_out=None, verbose=False,1076 def dem2pts(basename_in, basename_out=None, 1077 1077 easting_min=None, easting_max=None, 1078 northing_min=None, northing_max=None): 1078 northing_min=None, northing_max=None, 1079 use_cache=False, verbose=False,): 1079 1080 """Read Digitial Elevation model from the following NetCDF format (.dem) 1080 1081 … … 1093 1094 points: (Nx2) Float array 1094 1095 elevation: N Float array 1096 """ 1097 1098 1099 1100 kwargs = {'basename_out': basename_out, 1101 'easting_min': easting_min, 1102 'easting_max': easting_max, 1103 'northing_min': northing_min, 1104 'northing_max': northing_max, 1105 'verbose': verbose} 1106 1107 if use_cache is True: 1108 from caching import cache 1109 result = cache(_dem2pts, basename_in, kwargs, 1110 dependencies = [basename_in + '.dem'], 1111 verbose = verbose) 1112 1113 else: 1114 result = apply(_dem2pts, [basename_in], kwargs) 1115 1116 return result 1117 1118 1119 def _dem2pts(basename_in, basename_out=None, verbose=False, 1120 easting_min=None, easting_max=None, 1121 northing_min=None, northing_max=None): 1122 """Read Digitial Elevation model from the following NetCDF format (.dem) 1123 1124 Internal function. See public function dem2pts for details. 1095 1125 """ 1096 1126 … … 1831 1861 1832 1862 1833 1834 1863 def convert_dem_from_ascii2netcdf(basename_in, basename_out = None, 1835 verbose=False): 1836 """Read Digitial Elevation model from the following ASCII format (.asc) 1864 use_cache = False, 1865 verbose = False): 1866 """Read Digitial Elevation model from the following ASCII format (.asc) 1837 1867 1838 1868 Example: … … 1864 1894 Yshift 10000000.0000000000 1865 1895 Parameters 1896 """ 1897 1898 1899 1900 kwargs = {'basename_out': basename_out, 'verbose': verbose} 1901 1902 if use_cache is True: 1903 from caching import cache 1904 result = cache(_convert_dem_from_ascii2netcdf, basename_in, kwargs, 1905 dependencies = [basename_in + '.asc'], 1906 verbose = verbose) 1907 1908 else: 1909 result = apply(_convert_dem_from_ascii2netcdf, [basename_in], kwargs) 1910 1911 return result 1912 1913 1914 1915 1916 1917 1918 def _convert_dem_from_ascii2netcdf(basename_in, basename_out = None, 1919 verbose = False): 1920 """Read Digitial Elevation model from the following ASCII format (.asc) 1921 1922 Internal function. See public function convert_dem_from_ascii2netcdf for details. 1866 1923 """ 1867 1924
Note: See TracChangeset
for help on using the changeset viewer.