-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1839553
commit 115bdf2
Showing
9 changed files
with
73 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
------------------- | ||
begin : 2011-10-25 | ||
version : 2017-06-18 (1.2.1), QGIS 2.0 compatible | ||
copyright : (C) 2011-2017 by Mauro Alberti - www.malg.eu | ||
copyright : (C) 2011-2018 by Mauro Alberti | ||
email : [email protected] | ||
***************************************************************************/ | ||
|
@@ -20,18 +20,25 @@ | |
***************************************************************************/ | ||
""" | ||
|
||
from __future__ import absolute_import | ||
|
||
|
||
from builtins import str | ||
from builtins import object | ||
|
||
from qgis.PyQt.QtCore import * | ||
from qgis.PyQt.QtGui import * | ||
from qgis.PyQt.QtWidgets import * | ||
|
||
from PyQt4.QtCore import * | ||
from PyQt4.QtGui import * | ||
from qgis.core import * | ||
|
||
import resources | ||
from . import resources | ||
|
||
from .DirectionalSlope_dialog import DirectionalSlopeDialog | ||
from .DirectionalSlope_classes import * | ||
|
||
|
||
class DirectionalSlope: | ||
class DirectionalSlope(object): | ||
|
||
|
||
def __init__(self, iface): | ||
|
@@ -73,9 +80,9 @@ def run(self): | |
|
||
# append loaded raster layers to combo boxes | ||
|
||
self.layermap = QgsMapLayerRegistry.instance().mapLayers() | ||
self.layermap = QgsProject.instance().mapLayers() | ||
|
||
for (name,layer) in self.layermap.iteritems(): | ||
for (name,layer) in list(self.layermap.items()): | ||
if layer.type() == QgsMapLayer.RasterLayer: | ||
dlg.InputDem_combobox.addItem(layer.name()) | ||
dlg.VariableOrientations_raster_cb.addItem(layer.name()) | ||
|
@@ -150,7 +157,7 @@ def run(self): | |
# define Input DEM file | ||
|
||
dem_layer = None | ||
for (name,layer) in self.layermap.iteritems(): | ||
for (name,layer) in list(self.layermap.items()): | ||
if layer.name() == dem_name: | ||
dem_layer = layer | ||
break | ||
|
@@ -215,7 +222,7 @@ def run(self): | |
"Variable directional analysis", | ||
"No raster provided") | ||
return | ||
for (name,layer) in self.layermap.iteritems(): | ||
for (name,layer) in list(self.layermap.items()): | ||
if layer.name() == vardirectgrid_name: | ||
vardirectgrid_layer = layer | ||
break | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from PyQt4.QtCore import * | ||
from PyQt4.QtGui import * | ||
from qgis.PyQt.QtCore import * | ||
from qgis.PyQt.QtGui import * | ||
from qgis.PyQt.QtWidgets import * | ||
|
||
|
||
class DirectionalSlopeDialog(QDialog): | ||
|
@@ -254,7 +255,7 @@ def setupAboutTab(self): | |
"</style></head><body style=\" font-weight:400; font-style:normal;\">\n" | ||
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p>\n" | ||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Directional Slope </span></p>\n" | ||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span> Vers. 1.2.0 - October, 24, 2013.</span></p>\n" | ||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span> Vers. 1.3 - July, 20, 2018.</span></p>\n" | ||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span> Created by Mauro Alberti - </span><a href=\"mailto:[email protected]\"><span style=\" text-decoration: underline; color:#0000ff;\">[email protected]</span></a></p>\n" | ||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span> License: GPL vers. 3.</span></p>\n" | ||
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p>\n" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,3 +106,4 @@ ENV/ | |
*/.directory | ||
*.pyc | ||
.idea/ | ||
*.bak |
File renamed without changes
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 |
---|---|---|
|
@@ -3,9 +3,9 @@ name=DirectionalSlope | |
description=Calculates directional slope along given and variable orientations | ||
about=This plugin allows to calculate directional slope along uniform or spatially-variable orientations, from a source DEM | ||
category=Plugins | ||
version=1.2.1 | ||
version=1.3 | ||
experimental=False | ||
qgisMinimumVersion=2.0 | ||
qgisMinimumVersion=3.0 | ||
author=Mauro Alberti | ||
[email protected] | ||
icon=./icon.png | ||
|
@@ -16,7 +16,8 @@ repository=https://github.com/mauroalberti/directionalslope | |
changelog= | ||
1.2.0: version compatible with QGis 2.0 | ||
1.2.1: corrected erroneous concept in Help; minor code reformatting | ||
|
||
1.3 : ported to QGIS3 | ||
|
||
; tags are in comma separated value format, spaces are allowed | ||
tags=directional slope,dem,geomorphology | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<RCC> | ||
<qresource prefix="/plugins/DirectionalSlope" > | ||
<file>icon.png</file> | ||
<file>icons/icon.png</file> | ||
</qresource> | ||
</RCC> |