Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[processing] code formatting, make sources more pep8 compliant
- Loading branch information
Showing
358 changed files
with
16,621 additions
and
12,307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 58 additions & 61 deletions
119
python/plugins/processing/admintools/CreateMosaicDatastore.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,58 @@ | ||
#=============================================================================== | ||
# # -*- coding: utf-8 -*- | ||
# | ||
# """ | ||
# *************************************************************************** | ||
# CreateMosaicDatastore.py | ||
# --------------------- | ||
# Date : October 2012 | ||
# Copyright : (C) 2012 by Victor Olaya | ||
# Email : volayaf at gmail dot com | ||
# *************************************************************************** | ||
# * * | ||
# * This program is free software; you can redistribute it and/or modify * | ||
# * it under the terms of the GNU General Public License as published by * | ||
# * the Free Software Foundation; either version 2 of the License, or * | ||
# * (at your option) any later version. * | ||
# * * | ||
# *************************************************************************** | ||
# """ | ||
# from processing.tools import dataobjects | ||
# from processing.parameters.ParameterString import ParameterString | ||
# from processing.servertools.GeoServerToolsAlgorithm import GeoServerToolsAlgorithm | ||
# | ||
# __author__ = 'Victor Olaya' | ||
# __date__ = 'October 2012' | ||
# __copyright__ = '(C) 2012, Victor Olaya' | ||
# # This will get replaced with a git SHA1 when you do a git archive | ||
# __revision__ = '$Format:%H$' | ||
# | ||
# from qgis.core import * | ||
# from processing.parameters.ParameterVector import ParameterVector | ||
# from processing.tools import dataobjects | ||
# import os | ||
# | ||
# class CreateMosaicDatastore(GeoServerToolsAlgorithm): | ||
# | ||
# INPUT = "INPUT" | ||
# WORKSPACE = "WORKSPACE" | ||
# | ||
# def processAlgorithm(self, progress): | ||
# self.createCatalog() | ||
# input = self.getParameterValue(self.INPUT) | ||
# workspaceName = self.getParameterValue(self.WORKSPACE) | ||
# connection = { | ||
# 'shp': basepathname + '.shp', | ||
# 'shx': basepathname + '.shx', | ||
# 'dbf': basepathname + '.dbf', | ||
# 'prj': basepathname + '.prj' | ||
# } | ||
# | ||
# workspace = self.catalog.get_workspace(workspaceName) | ||
# self.catalog.create_featurestore(basefilename, connection, workspace) | ||
# | ||
# | ||
# def defineCharacteristics(self): | ||
# self.addcaddBaseParameters() | ||
# self.name = "Import into GeoServer" | ||
# self.group = "GeoServer management tools" | ||
# self.addParameter(ParameterVector(self.INPUT, "Layer to import", [ParameterVector.VECTOR_TYPE_ANY])) | ||
# self.addParameter(ParameterString(self.WORKSPACE, "Workspace")) | ||
#=============================================================================== | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
*************************************************************************** | ||
CreateMosaicDatastore.py | ||
--------------------- | ||
Date : October 2012 | ||
Copyright : (C) 2012 by Victor Olaya | ||
Email : volayaf at gmail dot com | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
*************************************************************************** | ||
""" | ||
|
||
__author__ = 'Victor Olaya' | ||
__date__ = 'October 2012' | ||
__copyright__ = '(C) 2012, Victor Olaya' | ||
# This will get replaced with a git SHA1 when you do a git archive | ||
__revision__ = '$Format:%H$' | ||
|
||
import os | ||
from qgis.core import * | ||
from processing.admintools.GeoServerToolsAlgorithm import \ | ||
GeoServerToolsAlgorithm | ||
from processing.parameters.ParameterVector import ParameterVector | ||
from processing.parameters.ParameterString import ParameterString | ||
from processing.tools import dataobjects | ||
|
||
|
||
class CreateMosaicDatastore(GeoServerToolsAlgorithm): | ||
|
||
INPUT = "INPUT" | ||
WORKSPACE = "WORKSPACE" | ||
|
||
def processAlgorithm(self, progress): | ||
self.createCatalog() | ||
input = self.getParameterValue(self.INPUT) | ||
workspaceName = self.getParameterValue(self.WORKSPACE) | ||
connection = { | ||
'shp': basepathname + '.shp', | ||
'shx': basepathname + '.shx', | ||
'dbf': basepathname + '.dbf', | ||
'prj': basepathname + '.prj'} | ||
workspace = self.catalog.get_workspace(workspaceName) | ||
self.catalog.create_featurestore(basefilename, connection, workspace) | ||
|
||
def defineCharacteristics(self): | ||
self.addcaddBaseParameters() | ||
self.name = "Import into GeoServer" | ||
self.group = "GeoServer management tools" | ||
self.addParameter(ParameterVector(self.INPUT, "Layer to import", | ||
[ParameterVector.VECTOR_TYPE_ANY])) | ||
self.addParameter(ParameterString(self.WORKSPACE, "Workspace")) |
Oops, something went wrong.