Changeset 2603
- Timestamp:
- 19/06/07 09:26:37 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TI05-delivery/ows_framework/trunk/ows_server/ows_server/lib/csml_util.py
r2599 r2603 39 39 40 40 41 def extractToNetCDF(feature, sel ):41 def extractToNetCDF(feature, sel, publish=False): 42 42 """ 43 43 performs the CSML subset and returns a filename of the netcdf extract 44 publish flag is used to indicate that the netcdf file should be made available to the webserver (for asynchronous delivery) 44 45 """ 45 46 # Get temporary extract dir … … 50 51 feature.subsetToGridSeries(ncname=os.path.basename(filename), 51 52 outputdir=os.path.dirname(filename) ,**sel) 53 54 #if publishing to download directory is required, do so and return publishable file name 55 #used e.g. in WCS when "STORE = true" 56 if publish !=False: 57 publish_dir=request.environ['paste.config']['app_conf']['publish_dir'] 58 #copy file from tmp_dir to publish directory 59 publishedName=publish_dir +'/'+os.path.basename(filename) 60 os.system ("cp %s %s" % (filename, publishedName)) 61 return publishedName 52 62 return filename 53 63
Note: See TracChangeset
for help on using the changeset viewer.