Ticket #80 (closed Defect: fixed)
In batch tools, the default Python expressions for naming outputs do not handle . in directory names
| Reported by: | jjr8 | Owned by: | jjr8 |
|---|---|---|---|
| Priority: | Medium | Milestone: | 0.3 |
| Component: | Tools - Data Management | Version: | 0.2 |
| Keywords: | Cc: |
Description
For example, the HDF.FindAndConvertToArcGISRasters method (called "Find HDFs and Extract SDSes To ArcGIS Rasters" in the ArcGIS toolbox) has the following default expression for the Python expression for naming the output rasters:
os.path.join(outputWorkspace, inputFile.split(u'.')[0][len(directoryToSearch)+1:len(directoryToSearch)+14])
For the files:
C:\Documents and Settings\widecast.ML\My Documents\MODIS\MODIS_DSST_9k_HDF\A20021822002212.L3m_MO_SST_9.bz2 C:\Documents and Settings\widecast.ML\My Documents\MODIS\MODIS_DSST_9k_HDF\A20022132002243.L3m_MO_SST_9.bz2
it produces the same output path:
C:\Documents and Settings\widecast.ML\My Documents\MODIS\MODIS_DSST_rasters
The following expression should be used instead:
os.path.join(outputWorkspace, os.path.dirname(inputFile[len(directoryToSearch)+1:]), os.path.basename(inputFile).split(u'.')[0][:13])
which would produce these unique paths:
C:\Documents and Settings\widecast.ML\My Documents\MODIS\MODIS_DSST_rasters\A200218220022 C:\Documents and Settings\widecast.ML\My Documents\MODIS\MODIS_DSST_rasters\A200221320022
The default Python expressions for all of the existing batch tools should be examined and corrected.
Change History
Note: See
TracTickets for help on using
tickets.
