def __init__(self, cfg, cfg_resources_file, workdir=None): # heritage init resources_block_name = "clipvectors" super(clipVectors, self).__init__(cfg, cfg_resources_file, resources_block_name) # step variables self.RAM = 1024.0 * get_RAM(self.resources["ram"]) self.workdir = workdir self.outputPath = SCF.serviceConfigFile(self.cfg).getParam( 'chain', 'outputPath') self.grasslib = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'grasslib') self.clipfile = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'clipfile') self.clipfield = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'clipfield') self.clipvalue = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'clipvalue') self.outprefix = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'outprefix') self.outmos = os.path.join(self.outputPath, 'final', 'simplification', 'mosaic') self.outfilevect = os.path.join(self.outputPath, 'final', 'simplification', 'vectors') self.grid = os.path.join(self.outputPath, 'final', 'simplification', 'grid.shp')
def __init__(self, cfg, cfg_resources_file, umc, nomenclature=None, stepname=None, workingDirectory=None): # heritage init resources_block_name = "regularisation" super(Regularization, self).__init__(cfg, cfg_resources_file, resources_block_name) # step variables if stepname: self.step_name = stepname self.RAM = 1024.0 * get_RAM(self.resources["ram"]) self.CPU = self.resources["cpu"] self.workingDirectory = workingDirectory self.outputPath = SCF.serviceConfigFile(self.cfg).getParam( 'chain', 'outputPath') self.rastclass = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'classification') self.seed = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'seed') self.umc = umc self.outtmpdir = os.path.join(self.outputPath, 'final', 'simplification', 'tmp') self.nomenclature = nomenclature
def __init__(self, cfg, cfg_resources_file, workingDirectory=None): # heritage init resources_block_name = "crownsearch" super(crownSearch, self).__init__(cfg, cfg_resources_file, resources_block_name) # step variables self.RAM = 1024.0 * get_RAM(self.resources["ram"]) self.CPU = self.resources["cpu"] self.workingDirectory = workingDirectory self.outputPath = SCF.serviceConfigFile(self.cfg).getParam('chain', 'outputPath') self.gridsize = SCF.serviceConfigFile(self.cfg).getParam('Simplification', 'gridsize')
def __init__(self, cfg, cfg_resources_file, workingDirectory=None): # heritage init resources_block_name = "SAROptConfusionMatrix" super(confusionSAROpt, self).__init__(cfg, cfg_resources_file, resources_block_name) # step variables self.workingDirectory = workingDirectory self.output_path = SCF.serviceConfigFile(self.cfg).getParam( 'chain', 'outputPath') self.data_field = SCF.serviceConfigFile(self.cfg).getParam( 'chain', 'dataField') self.sar_opt_conf_ram = 1024.0 * get_RAM(self.resources["ram"])
def __init__(self, cfg, cfg_resources_file, workingDirectory=None): # heritage init resources_block_name = "clump" super(Clump, self).__init__(cfg, cfg_resources_file, resources_block_name) # step variables self.RAM = 1024.0 * get_RAM(self.resources["ram"]) self.workingDirectory = workingDirectory self.outputPath = SCF.serviceConfigFile(self.cfg).getParam( 'chain', 'outputPath') self.lib64bit = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'lib64bit')
def __init__(self, cfg, cfg_resources_file, workingDirectory=None): # heritage init resources_block_name = "prodVectors" super(prodVectors, self).__init__(cfg, cfg_resources_file, resources_block_name) # step variables self.RAM = 1024.0 * get_RAM(self.resources["ram"]) self.workingDirectory = workingDirectory self.outputPath = SCF.serviceConfigFile(self.cfg).getParam( 'chain', 'outputPath') self.nomenclature = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'nomenclature')
def __init__(self, cfg: str, cfg_resources_file: str, workingDirectory: Optional[str] = None) -> None: """set up the step """ from Common.FileUtils import FileSearch_AND # heritage init resources_block_name = "superPixPos" super(superPixPos, self).__init__(cfg, cfg_resources_file, resources_block_name) # step variables self.workingDirectory = workingDirectory self.execution_dir = SCF.serviceConfigFile(self.cfg).getParam( 'chain', 'outputPath') self.superPix_field = "superpix" self.superPix_belong_field = "is_super_pix" self.region_field = SCF.serviceConfigFile(self.cfg).getParam( 'chain', 'regionField') self.data_field = SCF.serviceConfigFile(self.cfg).getParam( 'chain', 'dataField') self.ram = 1024.0 * get_RAM(self.resources["ram"]) self.sampling_labels_from_raster = {} if (SCF.serviceConfigFile(self.cfg).getParam('argTrain', 'cropMix') and SCF.serviceConfigFile(self.cfg).getParam( 'argTrain', 'samplesClassifMix')): source_dir = SCF.serviceConfigFile(self.cfg).getParam( 'argTrain', 'annualClassesExtractionSource') annual_labels = SCF.serviceConfigFile(self.cfg).getParam( 'argTrain', 'annualCrop') classification_raster = os.path.join(source_dir, "final", "Classif_Seed_0.tif") validity_raster = os.path.join(source_dir, "final", "PixelsValidity.tif") val_thresh = SCF.serviceConfigFile(self.cfg).getParam( 'argTrain', 'validityThreshold') region_mask_dir = os.path.join(self.execution_dir, "shapeRegion") self.sampling_labels_from_raster = { "annual_labels": annual_labels, "classification_raster": classification_raster, "validity_raster": validity_raster, "region_mask_directory": region_mask_dir, "val_threshold": val_thresh }
def __init__(self, cfg, cfg_resources_file, workingDirectory=None): # heritage init resources_block_name = "grid" super(Grid, self).__init__(cfg, cfg_resources_file, resources_block_name) # step variables self.RAM = 1024.0 * get_RAM(self.resources["ram"]) self.workingDirectory = workingDirectory self.outputPath = SCF.serviceConfigFile(self.cfg).getParam( 'chain', 'outputPath') self.gridsize = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'gridsize') self.epsg = int( SCF.serviceConfigFile(self.cfg).getParam('GlobChain', 'proj').split(":")[-1])
def __init__(self, cfg: str, cfg_resources_file: str, workingDirectory: Optional[str] = None) -> None: """set up the step """ # heritage init resources_block_name = "superPixSplit" super(superPixSplit, self).__init__(cfg, cfg_resources_file, resources_block_name) # step variables self.workingDirectory = workingDirectory self.execution_dir = SCF.serviceConfigFile(self.cfg).getParam('chain', 'outputPath') self.is_superPix_field = "is_super_pix" self.region_field = SCF.serviceConfigFile(self.cfg).getParam('chain', 'regionField') self.ram = 1024.0 * get_RAM(self.resources["ram"])
def __init__(self, cfg, cfg_resources_file, stepname=None, output=None, umc=None, resample=None, water=None, workingDirectory=None): # heritage init resources_block_name = "mergeregularisation" super(mergeRegularization, self).__init__(cfg, cfg_resources_file, resources_block_name) # step variables if stepname: self.step_name = stepname self.RAM = 1024.0 * get_RAM(self.resources["ram"]) self.CPU = self.resources["cpu"] self.workingDirectory = workingDirectory self.outputPath = SCF.serviceConfigFile(self.cfg).getParam('chain', 'outputPath') self.resample = resample self.water = water self.umc = umc self.output = output self.tmpdir = os.path.join(self.outputPath, 'final', 'simplification', 'tmp')
def __init__(self, cfg, cfg_resources_file, workingDirectory=None): # heritage init resources_block_name = "vectorisation" super(simplification, self).__init__(cfg, cfg_resources_file, resources_block_name) # step variables self.RAM = 1024.0 * get_RAM(self.resources["ram"]) self.workingDirectory = workingDirectory self.outputPath = SCF.serviceConfigFile(self.cfg).getParam( 'chain', 'outputPath') self.mmu = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'mmu') self.douglas = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'douglas') self.hermite = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'hermite') self.angle = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'angle') self.grasslib = SCF.serviceConfigFile(self.cfg).getParam( 'Simplification', 'grasslib')