-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from ar-siddiqui/feature/aoi_info
Version 2.2.2
- Loading branch information
Showing
8 changed files
with
65 additions
and
16 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 @@ | |
name=Curve Number Generator | ||
qgisMinimumVersion=3.18 | ||
description=Curve Number Generator plugin has multiple algorithms to generate the curve number layer for any area of interest using different datasets. | ||
version=2.2.1 | ||
version=2.2.2 | ||
author=Abdul Raheem Siddiqui | ||
[email protected] | ||
|
||
|
@@ -43,13 +43,13 @@ changelog=Version 2.2.1 - 2024-07-21 | |
|
||
|
||
# Tags are comma separated with spaces allowed | ||
tags=curve number, CN, NLCD Land Cover, SSURGO, Soil, Hydrologic Soil Group, HSG, Hydrology, SCS, Impervious Surface | ||
tags=curve number, CN, NLCD Land Cover, SSURGO, Soil, Hydrologic Soil Group, HSG, Hydrology, SCS, Impervious Surface, ESA, Oak Ridge National Laboratory, ORNL, ESA, European Space Agency, WorldCover | ||
|
||
homepage=https://github.com/ar-siddiqui/curve_number_generator | ||
category=Analysis | ||
icon=icon.png | ||
# experimental flag | ||
experimental=True | ||
experimental=False | ||
|
||
# deprecated flag (applies to the whole plugin, not just a single version) | ||
deprecated=False | ||
|
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
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 |
---|---|---|
|
@@ -25,11 +25,14 @@ | |
import os | ||
import sys | ||
|
||
import requests | ||
from qgis.core import QgsApplication, QgsProcessingAlgorithm | ||
from qgis.PyQt.QtCore import QCoreApplication | ||
from qgis.PyQt.QtGui import QIcon | ||
|
||
from curve_number_generator.processing.config import ( | ||
AOI_WKTS_FORM_ENRIES, | ||
AOI_WKTS_FORM_LINK, | ||
REGISTRATION_FORM_ENRIES, | ||
REGISTRATION_FORM_LINK, | ||
) | ||
|
@@ -70,6 +73,7 @@ def __init__(self): | |
super().__init__() | ||
# necessary to store LayerPostProcessor instances in class variable because of scoping issue | ||
self.styler_dict = {} | ||
self.aoi_wkt_3857 = "" | ||
|
||
def postProcessAlgorithm(self, context, feedback): | ||
try: # try-except because trivial features | ||
|
@@ -88,7 +92,10 @@ def postProcessAlgorithm(self, context, feedback): | |
form = RegisterForm("Register Curve Number Plugin", REGISTRATION_FORM_LINK, REGISTRATION_FORM_ENRIES) | ||
form.show() | ||
|
||
self.postWKTInfo() | ||
|
||
except Exception as e: | ||
# pass | ||
feedback.reportError( | ||
f"Algorithm finished successfully but post processing failed. {e}", | ||
False, | ||
|
@@ -128,3 +135,13 @@ def tr(self, string): | |
|
||
def helpUrl(self): | ||
return "mailto:[email protected]" | ||
|
||
def postWKTInfo(self): | ||
|
||
data = { | ||
AOI_WKTS_FORM_ENRIES["algorithm"]: self.name(), | ||
AOI_WKTS_FORM_ENRIES["aoi_wkt"]: self.aoi_wkt_3857, | ||
} | ||
|
||
r = requests.post(AOI_WKTS_FORM_LINK, data=data, timeout=5) | ||
r.raise_for_status() |
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