-
Notifications
You must be signed in to change notification settings - Fork 7
Batch Import Options
The batch import functionality in Vortex includes optional geoprocessing and writing options. Using Java, the options are passed to the BatchImporter
builder as a map. Using Jython, the options are passed to the BatchImporter
builder as a dictionary. Both the key and value should be of type String
.
An example script that uses both geoprocessing and write options is shown below:
from mil.army.usace.hec.vortex.io import BatchImporter
from mil.army.usace.hec.vortex.geo import WktFactory
from glob import glob
in_files = glob(r'C:/Temp/Test_Data/*.tif')
destination = 'C:/Temp/import.dss'
geo_options = {
'targetCellSize': '2000',
'targetEpsg': '32633'
}
write_options = {
'partA': 'UTM33N',
'partB': 'Sachsen_Kemnitz',
'partC': 'PRECIPITATION',
'partF': 'RADOLAN',
'dataType': 'PER-CUM',
'units': 'MM'
}
myImport = BatchImporter.builder() \
.inFiles(in_files) \
.destination(destination) \
.geoOptions(geo_options) \
.writeOptions(write_options) \
.build()
myImport.process()
pathToShp
* - Path to a valid shapefile. The shapefile extent will be used to clip the grids on import.
minX
* - The minimum X coordinate for a clipping envelope.
maxX
* - The maximum X coordinate for a clipping envelope.
minY
* - The minimum Y coordinate for a clipping envelope.
maxY
* - The maximum Y coordinate for a clipping envelope.
envWkt
* - The well-known-text projection representation for a clipping envelope.
resamplingMethod
- The resampling method. Options include near
for nearest neighbor, bilinear
for bilinear, and average
for weighted average. If no method is provided, near
will be used. bilinear
is a good option for the continuous data commonly encountered in hydrology.
targetWkt
** - The target well-known-text projection representation that the imported data will be projected into.
targetEpsg
** - The target EPSG code that the imported data will be projected into. For the Standard Hydrologic Grid (SHG), use 5070
. UTM North projections start with "326" and are followed by the zone number. For example the EPSG code for UTM zone 33 North is 32633. UTM South projections start with "327" and are followed by the zone number. For example the EPSG code for UTM zone 56 South is 32756.
targetCellSize
- The target cell size that the imported grids will be resampled into. The units of the cell size will correspond with the horizontal units of the target coordinate system. For example, if the target coordinate system is SHG with horizontal units of meters, and "2000" is specified for the target cell size, the resolution of the imported grid will be 2000 meters.
* For clipping, there are options to specify a shapefile, or an envelope. These are intended to be mutually exclusive. If arguments for both are provided, the shapefile will prevail.
** For reprojecting, there are options to specify a target WKT or EPSG code. These are intended to be mutually exclusive. If arguments for both are provided, the EPSG code will prevail.
partA
- The A-Part for the DSS record.
partB
- The B-Part for the DSS record.
partC
- The C-Part for the DSS record.
partD
- The D-Part for the DSS record.
partE
- The E-Part for the DSS record.
partF
- The F-Part for the DSS record.
units
- The units for the DSS record. For example "IN" for inches.
dataType
- The DSS data type. Valid entries: INST-VAL
, PER-AVER
, PER-CUM
, and INST-CUM
.