Showing with 2,556 additions and 1,660 deletions.
  1. +0 −17 .project
  2. +0 −10 .pydevproject
  3. +1 −1 doc/AUTHORS
  4. +5 −0 python/plugins/sextante/CMakeLists.txt
  5. +36 −38 python/plugins/sextante/SextantePlugin.py
  6. +7 −2 python/plugins/sextante/__init__.py
  7. +41 −32 python/plugins/sextante/about/AboutDialog.py
  8. +6 −2 python/plugins/sextante/about/CMakeLists.txt
  9. +0 −24 python/plugins/sextante/about/about.htm
  10. +86 −0 python/plugins/sextante/about/aboutdialogbase.ui
  11. +2 −2 python/plugins/sextante/core/AlgorithmProvider.py
  12. +1 −1 python/plugins/sextante/core/SextanteVectorWriter.py
  13. +0 −190 python/plugins/sextante/ftools/BasicStatistics.py
  14. +186 −0 python/plugins/sextante/ftools/BasicStatisticsNumbers.py
  15. +165 −0 python/plugins/sextante/ftools/BasicStatisticsStrings.py
  16. +125 −115 python/plugins/sextante/ftools/Buffer.py
  17. +18 −11 python/plugins/sextante/ftools/Centroids.py
  18. +72 −49 python/plugins/sextante/ftools/Delaunay.py
  19. +133 −0 python/plugins/sextante/ftools/DensifyGeometries.py
  20. +126 −108 python/plugins/sextante/ftools/ExportGeometryInfo.py
  21. +162 −49 python/plugins/sextante/ftools/ExtentFromLayer.py
  22. +47 −29 python/plugins/sextante/ftools/ExtractNodes.py
  23. +10 −7 python/plugins/sextante/ftools/FToolsAlgorithmProvider.py
  24. +94 −0 python/plugins/sextante/ftools/FToolsUtils.py
  25. +31 −25 python/plugins/sextante/ftools/FixedDistanceBuffer.py
  26. +0 −74 python/plugins/sextante/ftools/LayerFromExtent.py
  27. +92 −73 python/plugins/sextante/ftools/LinesIntersection.py
  28. +58 −44 python/plugins/sextante/ftools/LinesToPolygons.py
  29. +67 −42 python/plugins/sextante/ftools/MeanCoords.py
  30. +68 −53 python/plugins/sextante/ftools/MultipartToSingleparts.py
  31. +81 −49 python/plugins/sextante/ftools/NearestNeighbourAnalysis.py
  32. +27 −28 python/plugins/sextante/ftools/PointDistance.py
  33. +73 −59 python/plugins/sextante/ftools/PointsInPolygon.py
  34. +57 −43 python/plugins/sextante/ftools/PolygonsToLines.py
  35. +37 −21 python/plugins/sextante/ftools/RandomSelection.py
  36. +70 −46 python/plugins/sextante/ftools/RandomSelectionWithinSubsets.py
  37. +51 −35 python/plugins/sextante/ftools/SelectByLocation.py
  38. +89 −76 python/plugins/sextante/ftools/SimplifyGeometries.py
  39. +132 −116 python/plugins/sextante/ftools/SinglePartsToMultiparts.py
  40. +77 −57 python/plugins/sextante/ftools/SumLines.py
  41. +13 −12 python/plugins/sextante/ftools/UniqueValues.py
  42. +32 −26 python/plugins/sextante/ftools/VariableDistanceBuffer.py
  43. +64 −41 python/plugins/sextante/ftools/VoronoiPolygons.py
  44. +35 −44 python/plugins/sextante/gui/SextanteToolbox.py
  45. BIN python/plugins/sextante/{about → images}/sextante_logo.png
  46. +4 −9 python/plugins/sextante/metadata.txt
  47. +21 −0 python/plugins/sextante/resources.qrc
  48. +17 −0 tests/src/python/test_qgsmemoryprovider.py
  49. +17 −0 tests/src/python/test_qgsrectangle.py
  50. +20 −0 tests/src/python/test_qgsspatialindex.py
17 changes: 0 additions & 17 deletions .project

This file was deleted.

10 changes: 0 additions & 10 deletions .pydevproject

This file was deleted.

2 changes: 1 addition & 1 deletion doc/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ Sergey Yakushev <yakushevs at gmail.com >
René-Luc D'Hont <rldhont at gmail.com>
Etienne Tourigny <etourigny.dev at gmail.com>
Larry Shaffer <larrys at dakotacarto.com>
Victor Olaya <volayaf at gmail.com>
Victor Olaya <volayaf at gmail.com>
5 changes: 5 additions & 0 deletions python/plugins/sextante/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,10 @@ ADD_SUBDIRECTORY(script)
FILE(GLOB OTHER_FILES metadata.txt)
FILE(GLOB PY_FILES *.py)

PYQT4_ADD_RESOURCES(PYRC_FILES resources.qrc)

ADD_CUSTOM_TARGET(sextante ALL DEPENDS ${PYRC_FILES})

INSTALL(FILES ${PY_FILES} DESTINATION ${SEXTANTE_PLUGIN_DIR})
INSTALL(FILES ${OTHER_FILES} DESTINATION ${SEXTANTE_PLUGIN_DIR})
INSTALL(FILES ${PYRC_FILES} DESTINATION ${SEXTANTE_PLUGIN_DIR})
74 changes: 36 additions & 38 deletions python/plugins/sextante/SextantePlugin.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
import os, sys
import inspect

from PyQt4.QtCore import *
from PyQt4.QtGui import *

from qgis.core import *
import os, sys
import inspect

from sextante.core.Sextante import Sextante
from sextante.gui.SextanteToolbox import SextanteToolbox
from sextante.core.QGisLayers import QGisLayers
from sextante.gui.HistoryDialog import HistoryDialog
from sextante.core.SextanteUtils import SextanteUtils

from sextante.gui.SextanteToolbox import SextanteToolbox
from sextante.gui.HistoryDialog import HistoryDialog
from sextante.gui.ConfigDialog import ConfigDialog
from sextante.modeler.ModelerDialog import ModelerDialog
from sextante.gui.ResultsDialog import ResultsDialog

from sextante.modeler.ModelerDialog import ModelerDialog

from sextante.about.AboutDialog import AboutDialog
import subprocess

import resources_rc

cmd_folder = os.path.split(inspect.getfile( inspect.currentframe() ))[0]
if cmd_folder not in sys.path:
Expand All @@ -32,47 +39,47 @@ def initGui(self):
Sextante.addAlgListListener(self.toolbox)

self.menu = QMenu(self.iface.mainWindow())
self.menu.setTitle("Analysis")
self.menu.setTitle(QCoreApplication.translate("SEXTANTE", "Analysis"))

icon = QIcon(os.path.dirname(__file__) + "/images/toolbox.png")
self.toolboxAction = QAction(icon, \
"&SEXTANTE Toolbox", self.iface.mainWindow())
self.toolboxAction = QAction(QIcon(":/sextante/images/toolbox.png"),
QCoreApplication.translate("SEXTANTE", "&SEXTANTE Toolbox"),
self.iface.mainWindow())
QObject.connect(self.toolboxAction, SIGNAL("triggered()"), self.openToolbox)
self.menu.addAction(self.toolboxAction)

icon = QIcon(os.path.dirname(__file__) + "/images/model.png")
self.modelerAction = QAction(icon, \
"&SEXTANTE Modeler", self.iface.mainWindow())
self.modelerAction = QAction(QIcon(":/sextante/images/model.png"),
QCoreApplication.translate("SEXTANTE", "&SEXTANTE Modeler"),
self.iface.mainWindow())
QObject.connect(self.modelerAction, SIGNAL("triggered()"), self.openModeler)
self.menu.addAction(self.modelerAction)

icon = QIcon(os.path.dirname(__file__) + "/images/history.gif")
self.historyAction = QAction(icon, \
"&SEXTANTE History and log", self.iface.mainWindow())
self.historyAction = QAction(QIcon(":/sextante/images/history.gif"),
QCoreApplication.translate("SEXTANTE", "&SEXTANTE History and log"),
self.iface.mainWindow())
QObject.connect(self.historyAction, SIGNAL("triggered()"), self.openHistory)
self.menu.addAction(self.historyAction)

icon = QIcon(os.path.dirname(__file__) + "/images/config.png")
self.configAction = QAction(icon, \
"&SEXTANTE options and configuration", self.iface.mainWindow())
self.configAction = QAction(QIcon(":/sextante/images/config.png"),
QCoreApplication.translate("SEXTANTE", "&SEXTANTE options and configuration"),
self.iface.mainWindow())
QObject.connect(self.configAction, SIGNAL("triggered()"), self.openConfig)
self.menu.addAction(self.configAction)

icon = QIcon(os.path.dirname(__file__) + "/images/results.png")
self.resultsAction = QAction(icon, \
"&SEXTANTE results viewer", self.iface.mainWindow())
self.resultsAction = QAction(QIcon(":/sextante/images/results.png"),
QCoreApplication.translate("SEXTANTE", "&SEXTANTE results viewer"),
self.iface.mainWindow())
QObject.connect(self.resultsAction, SIGNAL("triggered()"), self.openResults)
self.menu.addAction(self.resultsAction)

icon = QIcon(os.path.dirname(__file__) + "/images/help.png")
self.helpAction = QAction(icon, \
"&SEXTANTE help", self.iface.mainWindow())
self.helpAction = QAction(QIcon(":/sextante/images/help.png"),
QCoreApplication.translate("SEXTANTE", "&SEXTANTE help"),
self.iface.mainWindow())
QObject.connect(self.helpAction, SIGNAL("triggered()"), self.openHelp)
self.menu.addAction(self.helpAction)

icon = QIcon(os.path.dirname(__file__) + "/images/info.png")
self.aboutAction = QAction(icon, \
"&About SEXTANTE", self.iface.mainWindow())
self.aboutAction = QAction(QIcon(":/sextante/images/info.png"),
QCoreApplication.translate("SEXTANTE", "&About SEXTANTE"),
self.iface.mainWindow())
QObject.connect(self.aboutAction, SIGNAL("triggered()"), self.openAbout)
self.menu.addAction(self.aboutAction)

Expand All @@ -92,7 +99,6 @@ def unload(self):
#leave files that could not be deleted
pass


def openToolbox(self):
self.toolbox.setVisible(True)

Expand All @@ -119,12 +125,4 @@ def openAbout(self):
dlg.exec_()

def openHelp(self):
filename = os.path.dirname(__file__) + "/help/index.html"
if os.name == "nt":
os.startfile(filename)
elif sys.platform == "darwin":
subprocess.Popen(('open', filename))
else:
subprocess.call(('xdg-open', filename))


QDesktopServices.openUrl(QUrl(os.path.dirname(__file__) + "/help/index.html"))
9 changes: 7 additions & 2 deletions python/plugins/sextante/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
def name():
return "SEXTANTE"

def description():
return "SEXTANTE Geoprocessing Platform for QGIS"

def version():
return "Version 1.0.7"
return "1.0.8"

def icon():
return "icon.png"
return "images/toolbox.png"

def qgisMinimumVersion():
return "1.0"

def classFactory(iface):
from sextante.SextantePlugin import SextantePlugin
return SextantePlugin(iface)
73 changes: 41 additions & 32 deletions python/plugins/sextante/about/AboutDialog.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,46 @@
from PyQt4 import QtCore, QtGui, QtWebKit
import os

from PyQt4.QtCore import *
from PyQt4.QtGui import *
import os

class AboutDialog(QtGui.QDialog):
from sextante.__init__ import version
from ui_aboutdialogbase import Ui_DlgAbout

import sextante.resources_rc

class AboutDialog(QDialog, Ui_DlgAbout):

def __init__(self):
QtGui.QDialog.__init__(self)
self.setModal(True)
self.setupUi()

def setupUi(self):
self.resize(600, 500)
self.webView = QtWebKit.QWebView()
self.setWindowTitle("About SEXTANTE")
self.verticalLayout= QtGui.QVBoxLayout()
self.verticalLayout.setSpacing(2)
self.verticalLayout.setMargin(0)
self.verticalLayout.addWidget(self.webView)
self.closeButton = QtGui.QPushButton()
self.closeButton.setText("Close")
self.closeButton.setMaximumWidth(150)
self.horizontalLayout= QtGui.QHBoxLayout()
self.horizontalLayout.setSpacing(2)
self.horizontalLayout.setMargin(0)
self.horizontalLayout.addStretch(1000)
self.horizontalLayout.addWidget(self.closeButton)
QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), self.closeWindow)
self.verticalLayout.addLayout(self.horizontalLayout)
self.setLayout(self.verticalLayout)
filename = os.path.dirname(__file__) + "/about.htm"
url = QtCore.QUrl(filename)
self.webView.load(url)

def closeWindow(self):
self.close()
QDialog.__init__(self)
self.setupUi(self)

self.buttonBox.helpRequested.connect(self.openHelp)

self.setAboutText()

def setAboutText(self):
strAbout = self.tr("""
<img src="qrc:/sextante/images/sextante_logo.png" />
<h2>SEXTANTE for QGIS</h2>
<p>SEXTANTE, a geoprocessing platform for QGIS</p>
<p>A development by Victor Olaya (volayaf@gmail.com).</p>
<p>Portions of this software contributed by:
<ul>
<li>Alexander Bruy</li>
<li>Carson Farmer (fTools algorithms)</li>
<li>Julien Malik (Orfeo Toolbox connectors)</li>
<li>Evgeniy Nikulin (Original Field Pyculator code)</li>
<li>Michael Nimm (mmqgis algorithms)</li>
<li>Camilo Polymeris (Threading). Developed as part of Google
Summer of Code 2012</li>
</ul>
</p>
<p>You are currently using SEXTANTE v%1</p>
<p>This software is distributed under the terms of the GNU GPL License v2.
<p>For more information, please visit our website at
<a href="http://sextantegis.com">http://sextantegis.com</a></p>
""").arg(version())
self.webView.setHtml(strAbout)

def openHelp(self):
QDesktopServices.openUrl(QUrl(os.path.join(os.path.dirname(__file__), os.path.pardir) + "/help/index.html"))
8 changes: 6 additions & 2 deletions python/plugins/sextante/about/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
FILE(GLOB PY_FILES *.py)
FILE(GLOB OTHER_FILES *.htm *.png)

FILE(GLOB UI_FILES *.ui)
PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES})

ADD_CUSTOM_TARGET(sextante_about ALL DEPENDS ${PYUI_FILES})

INSTALL(FILES ${PY_FILES} DESTINATION ${SEXTANTE_PLUGIN_DIR}/about)
INSTALL(FILES ${OTHER_FILES} DESTINATION ${SEXTANTE_PLUGIN_DIR}/about)
INSTALL(FILES ${PYUI_FILES} DESTINATION ${SEXTANTE_PLUGIN_DIR}/about)
24 changes: 0 additions & 24 deletions python/plugins/sextante/about/about.htm

This file was deleted.

86 changes: 86 additions & 0 deletions python/plugins/sextante/about/aboutdialogbase.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DlgAbout</class>
<widget class="QDialog" name="DlgAbout">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>492</width>
<height>401</height>
</rect>
</property>
<property name="windowTitle">
<string>About SEXTANTE</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>2</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QWebView" name="webView">
<property name="url">
<url>
<string>about:blank</string>
</url>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QWebView</class>
<extends>QWidget</extends>
<header>QtWebKit/QWebView</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>DlgAbout</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DlgAbout</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
Loading