Giter VIP home page Giter VIP logo

ar-siddiqui / curve_number_generator Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 2.0 525 KB

QGIS Plugin 'Curve Number Generator' has multiple algorithms to generate the curve number layer for any area of interest using different datasets.

License: GNU General Public License v2.0

Makefile 1.21% Python 26.82% QML 70.24% Batchfile 1.08% Shell 0.64%
curve-number nlcd land-cover ssurgo soil hydrologic-soil-groups hsg wfs wms hydrology

curve_number_generator's People

Contributors

ar-siddiqui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

curve_number_generator's Issues

Plugin approval

Can you please upload the source code into this repository and add a proper homepage link in metadata.txt

Data type issue when applying user-defined CN table

I observed one thing that I want a clarification.

  1. If I use the default CN look up table, the cn field of the generated cn shapefile is in decimal; this is good since I can rasterize it easily;
  2. However, I use my own CN look up table, the cn field of the generated cn shapefile is a text string; is this a bug? I would like the field is still in decimal under this situation.

Display feed in help tool

Just like QGIS displays news feed on the opening of the page, the CN tool can do this as well using tool help. This would benefit to provide news updates etc such as new version available.

Gaps in data on the corners of output of CONUS algorithm.

If the AOI is a square and the CRS is not 5070. Then during the reprojection of the raster downloaded from NLCD to the CRS of the AOI, some pixels for corners are missed. This is because of the nature of how projection work.

Before reprojection
image

After projection
image

This causes gaps in data on two of the corners.

Feature Request: Create CN from Local Land Use Raster and Soil Vector

This feature would allow users to

  • Calculate CN by any local land use and soil data
  • Compare pre and post-development Curve Number Changes
  • Use this plugin anywhere in the world (currently, it works for CONUS only)

The following methodology will be adopted to implement this feature.

Workflow

  • CN Plugin will have two modules, the existing one that will download data from the internet and a new one that will take user input.
  • The user will provide local Land Use and Soil data to the new module.
  • The user will also provide a custom lookup table always.

If you would like to see this feature implemented, you can support the development of this feature. The estimated development cost for the compensation of developers hours is 2000$. Any amount can be donated. If an organization is willing to sponsor full development, they will be recognized as the sponsors of this feature, and their name and website will be displayed in the algorithm help**.



Donate

** for no less than 10 years

SSL Certificate Issues

Tried running the plugin tool with QGIS 3.18.3-Zurich on Windows 10.

On the initial run, an error popped up regarding some type of SSL Certificate issue. I hit "ignore", but not "ignore and save". The tool failed because it couldn't pull the data down. On subsequent runs, the pop-up wouldn't open but the tool still wouldn't work. I uninstalled and reinstalled the plugin, still no popup, still no success. The error message indicated that it was on the server side, but I guessed this was a client-side issue.

I was able to fix this by manually creating an certificate exception under Settings > options > Authentication > Manage Certificates > Servers (tab) and created one for www.mrlc.gov. I wasn't sure which errors needed to be ignored so I checked essentially all of them.

Tool then ran fine.

Also, let me just say, thanks a ton for creating this! You are a selfless human saving people many human-hours of frustration.

Make Usage a QGIS Environmental Variable for Each Profile

Reasons

For

  1. No File Management

Against

  1. Usage log should be hidden from users

Potential Issues

  • Restart of QGIS will keep the value? Yes it will
  • Upgrading version may delete the variable?
  • Different profiles have the same or different variables? Different values
  • Is variable available in different versions? Yes

Resources

https://qgis.org/pyqgis/3.6/core/QgsExpressionContextUtils.html?highlight=globalscope#qgis.core.QgsExpressionContextUtils.setGlobalVariable

https://gis.stackexchange.com/questions/240085/how-to-get-layer-variables-using-qgis-python-apis

https://gis.stackexchange.com/questions/189075/how-to-change-a-project-variable-using-python

NLCD Server Down

It looks like a change was applied to the GEOS GeoServer
jms-cluster: switch to using managed dependency for log4j

Now the Curve_number_generator may not be getting downloads.

Here is the Log Message:
QGIS version: 3.18.2-Zürich
QGIS code revision: 515138c171
Qt version: 5.11.2
GDAL version: 3.1.4
GEOS version: 3.8.1-CAPI-1.13.3
PROJ version: Rel. 6.3.2, May 1st, 2020
Processing algorithm…
Algorithm 'Curve Number Generator' starting…
Input parameters:
{ 'OutputCurveNumberLayer' : True, 'OutputNLCDImperviousRaster' : True, 'OutputNLCDLandCoverRaster' : True, 'OutputNLCDLandCoverVector' : False, 'OutputSoilLayer' : True, 'areaboundary' : 'D:/FLO-2D Docs/Short Course/AFMA 2021/Advanced Class/Module 1/Lesson 1.gpkg|layername=grid', 'cnlookup' : None, 'drainedsoilsleaveuncheckedifnotsure' : False }

Area Boundary layer extent area is 1,273.9463 acres

Successfully downloaded https://www.mrlc.gov/geoserver/mrlc_display/NLCD_2019_Impervious_L48/ows?version=1.3.0&service=WMS&layers=NLCD_2019_Impervious_L48&styles&crs=EPSG:2223&format=image/geotiff&request=GetMap&width=279&height=221&BBOX=656965.3593088828,957270.0,665335.3593088828,963900.0&
Results: {'OUTPUT': 'C:/Users/ComuterName/AppData/Local/Temp/processing_tpjsop/a9cb30bd23e84eb59afa4a9035c9b814/OUTPUT.file.0&'}
Unable to execute algorithm
Incorrect parameter value for INPUT
Unable to execute algorithm
Could not load source layer for INPUT: C:/Users//ComuterName/AppData/Local/Temp/processing_tpjsop/a9cb30bd23e84eb59afa4a9035c9b814/OUTPUT.file.0& not found
Unable to execute algorithm
Could not load source layer for INPUT: C:/Users//ComuterName/AppData/Local/Temp/processing_tpjsop/a9cb30bd23e84eb59afa4a9035c9b814/OUTPUT.file.0& not found
Execution failed after 1.82 seconds

Loading resulting layers
Algorithm 'Curve Number Generator' finished

Output Layers Using Proper Sink

With the template set in QNSPECT, the Plugin should have proper layer sinks and use QgsLayerPostProcessorInterface to stylize.

This would allow the tool to be used in batch processing, and command-line environments properly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.