本文整理汇总了Python中sextante.core.AlgorithmProvider.AlgorithmProvider类的典型用法代码示例。如果您正苦于以下问题:Python AlgorithmProvider类的具体用法?Python AlgorithmProvider怎么用?Python AlgorithmProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AlgorithmProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: initializeSettings
def initializeSettings(self):
AlgorithmProvider.initializeSettings(self)
if SextanteUtils.isWindows() or SextanteUtils.isMac():
SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_FOLDER, "GRASS folder", GrassUtils.grassPath()))
SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_WIN_SHELL, "Msys folder", GrassUtils.grassWinShell()))
SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_LOG_COMMANDS, "Log execution commands", False))
SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_LOG_CONSOLE, "Log console output", False))
示例2: unload
def unload(self):
AlgorithmProvider.unload(self)
if SextanteUtils.isWindows() or SextanteUtils.isMac():
SextanteConfig.removeSetting(GrassUtils.GRASS_FOLDER)
SextanteConfig.removeSetting(GrassUtils.GRASS_WIN_SHELL)
SextanteConfig.removeSetting(GrassUtils.GRASS_LOG_COMMANDS)
SextanteConfig.removeSetting(GrassUtils.GRASS_LOG_CONSOLE)
示例3: __init__
def __init__(self):
AlgorithmProvider.__init__(self)
self.alglist = [AddTableField(), FieldsCalculator(), SaveSelectedFeatures(), JoinAttributes(),
AutoincrementalField(), Explode(), FieldsPyculator(), EquivalentNumField(),
SumLines(), PointsInPolygon(), PointsInPolygonWeighted(), PointsInPolygonUnique(),
BasicStatisticsStrings(), BasicStatisticsNumbers(), NearestNeighbourAnalysis(),
MeanCoords(), LinesIntersection(), UniqueValues(), PointDistance(), PointsLayerFromTable(),
StatisticsByCategories(),ReprojectLayer(),
ExportGeometryInfo(), Centroids(), Delaunay(), VoronoiPolygons(),
SimplifyGeometries(), DensifyGeometries(), DensifyGeometriesInterval(),
MultipartToSingleparts(), SinglePartsToMultiparts(), PolygonsToLines(),
LinesToPolygons(), ExtractNodes(),
ConvexHull(), FixedDistanceBuffer(), VariableDistanceBuffer(),
Dissolve(), Difference(), Intersection(), Union(), Clip(),
ExtentFromLayer(), RandomSelection(), RandomSelectionWithinSubsets(),
SelectByLocation(),
#MMQGISX
mmqgisx_delete_columns_algorithm(),
mmqgisx_delete_duplicate_geometries_algorithm(),
mmqgisx_geometry_convert_algorithm(),
mmqgisx_grid_algorithm(),
mmqgisx_gridify_algorithm(),
mmqgisx_hub_distance_algorithm(),
mmqgisx_hub_lines_algorithm(),
mmqgisx_merge_algorithm(),
mmqgisx_select_algorithm(),
mmqgisx_text_to_float_algorithm(),
#raster
CreateConstantRaster(), RasterLayerStatistics()
#graphics
#VectorLayerHistogram(), VectorLayerScatterplot(), RasterLayerHistogram(),
#MeanAndStdDevPlot(), BarPlot(), PolarPlot()
]
示例4: initializeSettings
def initializeSettings(self):
AlgorithmProvider.initializeSettings(self)
if SextanteUtils.isWindows():
SextanteConfig.addSetting(
Setting(self.getDescription(), SagaUtils.SAGA_FOLDER, "SAGA folder", SagaUtils.sagaPath())
)
SextanteConfig.addSetting(
Setting(
self.getDescription(),
SagaUtils.SAGA_AUTO_RESAMPLING,
"Use min covering grid system for resampling",
True,
)
)
SextanteConfig.addSetting(
Setting(self.getDescription(), SagaUtils.SAGA_LOG_COMMANDS, "Log execution commands", False)
)
SextanteConfig.addSetting(
Setting(self.getDescription(), SagaUtils.SAGA_LOG_CONSOLE, "Log console output", False)
)
SextanteConfig.addSetting(
Setting(self.getDescription(), SagaUtils.SAGA_RESAMPLING_REGION_XMIN, "Resampling region min x", 0)
)
SextanteConfig.addSetting(
Setting(self.getDescription(), SagaUtils.SAGA_RESAMPLING_REGION_YMIN, "Resampling region min y", 0)
)
SextanteConfig.addSetting(
Setting(self.getDescription(), SagaUtils.SAGA_RESAMPLING_REGION_XMAX, "Resampling region max x", 1000)
)
SextanteConfig.addSetting(
Setting(self.getDescription(), SagaUtils.SAGA_RESAMPLING_REGION_YMAX, "Resampling region max y", 1000)
)
SextanteConfig.addSetting(
Setting(self.getDescription(), SagaUtils.SAGA_RESAMPLING_REGION_CELLSIZE, "Resampling region cellsize", 1)
)
示例5: __init__
def __init__(self):
AlgorithmProvider.__init__(self)
#=======================================================================
# self.actions.append(DefineGrassRegionAction())
# self.actions.append(DefineGrassRegionFromLayerAction())
#=======================================================================
self.createAlgsList() #preloading algorithms to speed up
示例6: unload
def unload(self):
'''Setting should be removed here, so they do not appear anymore
when the plugin is unloaded'''
AlgorithmProvider.unload(self)
SextanteConfig.removeSetting(IliUtils.JAVA_EXEC)
SextanteConfig.removeSetting(IliUtils.ILI2C_JAR)
SextanteConfig.removeSetting(IliUtils.ILI2PG_JAR)
示例7: initializeSettings
def initializeSettings(self):
'''In this method we add settings needed to configure our provider.
Do not forget to call the parent method, since it takes care or
automatically adding a setting for activating or deactivating the
algorithms in the provider'''
AlgorithmProvider.initializeSettings(self)
SextanteConfig.addSetting(Setting("Example algorithms", ExampleAlgorithmProvider.MY_DUMMY_SETTING, "Example setting", "Default value"))
'''To get the parameter of a setting parameter, use SextanteConfig.getSetting(name_of_parameter)'''
示例8: __init__
def __init__(self):
AlgorithmProvider.__init__(self)
# deactivate provider by default
self.activate = False
# load algorithms
self.alglist = [ExampleAlgorithm()]
for alg in self.alglist:
alg.provider = self
示例9: initializeSettings
def initializeSettings(self):
'''add settings needed to configure our provider.'''
# call the parent method which takes care of adding a setting for
# activating or deactivating the algorithms in the provider
AlgorithmProvider.initializeSettings(self)
# add settings
SextanteConfig.addSetting(Setting("LWGEOM algorithms", LwgeomAlgorithmProvider.LWGEOM_PATH_SETTING, "Path to liblwgeom", ""))
示例10: initializeSettings
def initializeSettings(self):
AlgorithmProvider.initializeSettings(self)
SextanteConfig.addSetting(
Setting(self.getDescription(), RUtils.RSCRIPTS_FOLDER, "R Scripts folder", RUtils.RScriptsFolder())
)
if SextanteUtils.isWindows():
SextanteConfig.addSetting(Setting(self.getDescription(), RUtils.R_FOLDER, "R folder", RUtils.RFolder()))
SextanteConfig.addSetting(Setting(self.getDescription(), RUtils.R_USE64, "Use 64 bit version", False))
示例11: __init__
def __init__(self):
AlgorithmProvider.__init__(self)
self.alglist = [ImportVectorIntoGeoServer(), ImportRasterIntoGeoServer(),
CreateWorkspace(), DeleteWorkspace(), DeleteDatastore(),
CreateStyleGeoServer()]
try:
self.alglist.append(ImportIntoPostGIS())
self.alglist.append(PostGISExecuteSQL())
except:
pass
示例12: unload
def unload(self):
AlgorithmProvider.unload(self)
if SextanteUtils.isWindows():
SextanteConfig.removeSetting(SagaUtils.SAGA_FOLDER)
SextanteConfig.removeSetting(SagaUtils.SAGA_AUTO_RESAMPLING)
SextanteConfig.removeSetting(SagaUtils.SAGA_RESAMPLING_REGION_XMIN)
SextanteConfig.removeSetting(SagaUtils.SAGA_RESAMPLING_REGION_YMIN)
SextanteConfig.removeSetting(SagaUtils.SAGA_RESAMPLING_REGION_XMAX)
SextanteConfig.removeSetting(SagaUtils.SAGA_RESAMPLING_REGION_YMAX)
SextanteConfig.removeSetting(SagaUtils.SAGA_RESAMPLING_REGION_CELLSIZE)
SextanteConfig.removeSetting(SagaUtils.SAGA_LOG_CONSOLE)
SextanteConfig.removeSetting(SagaUtils.SAGA_LOG_COMMANDS)
示例13: __init__
def __init__(self):
AlgorithmProvider.__init__(self)
self.alglist = [
ImportVectorIntoGeoServer(),
ImportRasterIntoGeoServer(),
CreateWorkspace(),
DeleteWorkspace(),
DeleteDatastore(),
CreateStyleGeoServer(),
ImportIntoPostGIS(),
PostGISExecuteSQL(),
] # , TruncateSeedGWC()]
示例14: initializeSettings
def initializeSettings(self):
'''In this method we add settings needed to configure our provider.
Do not forget to call the parent method, since it takes care or
automatically adding a setting for activating or deactivating the
algorithms in the provider'''
AlgorithmProvider.initializeSettings(self)
SextanteConfig.addSetting(Setting(self.getDescription(
), IliUtils.JAVA_EXEC, "Java executable", IliUtils.java_exec_default()))
SextanteConfig.addSetting(
Setting(self.getDescription(), IliUtils.ILI2C_JAR, "ili2c.jar path", "ili2c.jar"))
SextanteConfig.addSetting(Setting(
self.getDescription(), IliUtils.ILI2PG_JAR, "ili2pg.jar path", "ili2pg.jar"))
SextanteConfig.addSetting(Setting(
self.getDescription(), IliUtils.CREATEDB_EXEC, "createdb path", "createdb"))
示例15: unload
def unload(self):
AlgorithmProvider.unload(self)
if SextanteUtils.isWindows() or SextanteUtils.isMac():
SextanteConfig.removeSetting(GrassUtils.GRASS_FOLDER)
SextanteConfig.removeSetting(GrassUtils.GRASS_WIN_SHELL)
#SextanteConfig.removeSetting(GrassUtils.GRASS_AUTO_REGION)
SextanteConfig.removeSetting(GrassUtils.GRASS_LATLON)
#=======================================================================
# SextanteConfig.removeSetting(GrassUtils.GRASS_REGION_XMIN)
# SextanteConfig.removeSetting(GrassUtils.GRASS_REGION_YMIN)
# SextanteConfig.removeSetting(GrassUtils.GRASS_REGION_XMAX)
# SextanteConfig.removeSetting(GrassUtils.GRASS_REGION_YMAX)
# SextanteConfig.removeSetting(GrassUtils.GRASS_REGION_CELLSIZE)
#=======================================================================
SextanteConfig.removeSetting(GrassUtils.GRASS_HELP_FOLDER)
SextanteConfig.removeSetting(GrassUtils.GRASS_LOG_COMMANDS)
SextanteConfig.removeSetting(GrassUtils.GRASS_LOG_CONSOLE)