Giter Site home page Giter Site logo

earthdaily / qgis-plugin Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 7.0 1.1 MB

🗺️ To be able to discover, request and use aggregate imagery products based on landsat-8/9, Sentinel 2 and other sensors from within QGIS, using the <geosys/> API.

License: GNU General Public License v3.0

Makefile 2.98% Python 92.18% Batchfile 0.89% Shell 0.94% QML 0.34% CSS 2.01% HTML 0.65%
agriculture geospatial geospatial-analysis geospatial-data geospatial-visualization python3 qgis qgis-plugin satellite satellite-data satellite-imagery satellite-images

qgis-plugin's People

Contributors

andrelester avatar geosys-user avatar myarjunar avatar pierrealixt avatar samweli avatar timlinux avatar vermeulendivan avatar vincentlel avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

qgis-plugin's Issues

Get hotspot as a layer

While requesting Hotspot, see here, the API will return the following hotspot object:

hotSpots": [
{
"geometry": "POINT (-100.26517713 38.99869576)",
"segmentId": 1
},
{
"geometry": "POINT (-100.26977919 38.99869091)",
"segmentId": 2
},
{
"geometry": "POINT (-100.27306991 38.99872395)",
"segmentId": 3

The goal is to convert these information into a shapefile layer. So hotspot points will have to be converted into a shapefile layer stored in the Map Output Directory.

The layer will be added to the map view.

See #100

EPIC 3.2: Options Dialog and Persistant Settings

Expectation: As a GEOSYS subscriber and plugin user, I would like be able to enter my API
credentials once and have them used whenever I use the GEOSYS API.

Acceptance criteria:

  1. Given the options dialog is implemented, when a user enters their credentials then those
    credentials shall be persistent across multiple QGIS Sessions.
  2. Given the options dialog is implemented, when a user has entered their credentials, then calls to the GEOSYS API shall use those credentials.
  3. Given the options dialog is implemented, when selected a geographical region, then any API
    calls will be made to the underlying GEOSYS URL that services that region.
  4. Given the paging limit is implemented, when the user performs a search or using the
    processing algorithm, then the number of results will be constrained by the paging limit size.

Error while loading Options screen

Describe the bug
With the latest release downloaded today, I received an error while trying to open the options screen

2019-04-15T08:20:27 WARNING Traceback (most recent call last):
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\plugin.py", line 276, in show_options
from geosys.ui.widgets.options_dialog import GeosysOptionsDialog
File "C:/PROGRA1/QGIS31.6/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\options_dialog.py", line 12, in
from geosys.ui.help.options_help import options_help
File "C:/PROGRA1/QGIS31.6/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\help\options_help.py", line 4, in
from geosys import messaging as m
File "C:/PROGRA1/QGIS31.6/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\messaging_init
.py", line 6, in
from .item.brand import Brand
File "C:/PROGRA1/QGIS31.6/apps/qgis/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\messaging\item\brand.py", line 21, in
from geosys.utilities.resources import (
ImportError: cannot import name 'resource_url' from 'geosys.utilities.resources' (C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\utilities\resources.py)

EPIC 3.1: QGIS GEOSYS Processing Algorithm

Expectation: As a QGIS Processing toolbox user, I would like be able to incorporate the retrieval and analysis of GEOSYS products into my workflows.

Acceptance Criteria:

  • Given the GEOSYS plugin is installed and my credentials are set in the options dialog, when
    I open the QGIS Processing toollbox, then the GEOSYS plugin will be available.
  • Given that I am using the GEOSYS Processing Algorithm, when I define the request criteria
    in the algorithm then the algorithm should successfully return the dataset requested.
  • Given that a date is requested, when the user presses OK, then the most recent coverage
    before the chosen date will be retrieved.
  • Given that the GEOSYS algorithm may retrieve more than one coverage, when the user
    presses OK, then the algorithm will merge the retrieved products as a single virtual raster and
    add that raster to the QGIS map canvas.
  • Given that a sensor is selected, when the user presses OK, then only coverages for that
    sensor will be returned.
  • Given that a polygon layer is selected, when the user presses OK, then the algorithm will
    iteratively search GEOSYS for each polygon by passing the WKT string representation of the
    polygon.

Options panel bugs

Describe the bug

Tidy up text on options dialog:

Screenshot 2019-03-26 at 17 01 32

  • Choose your region based on your fields geographical regions. -> Choose your region based on the location of your fields.

  • This will decide which GEOSYS service would be used. -> This well determine which GEOSYS service will be used.

  • Use testing service. -> We should make it clear to users why they would choose this option. Will this widget be shipped in the production version?

  • This parameters are required and will be applied to each coverage request. -> These parameters are required and will be used for each coverage request.

Note for above item I am wondering if we should not be managing that within the request panel itself. What if you have neighbouring wheat and corn fields - will you need to open the options dialog each time to change the crop? Why not rather just make the option stateful in the request panel so that it always defaults to what you last used? Same comment applies for sowing date - wouldnt this make more sense as a stateful widget in the coverage request panel?

's' is cut off in 'Visit GeoSYS website to get your credentials.

EPIC 4: Packaging and Publishing

Expectation: As a user, I would like be able to download the GEOSYS plugin from the QGIS plugin store.

Acceptance criteria:

Given the packaging is completed, when I browse the plugin repository then I will find the GEOSYS plugin and be able to download it in QGIS 3.4 or greater.

No Image thumbnail when requesting image for SaMZ creation

When you select SAMZ as a map product type and hit "search map". The "Coverage Search Result" panel is not showing any image thumbnail which prevents user to select images to do a custom SAMZ map.

This is related with the fact that the API does not provide thumbnail links
{
"seasonField": {
"id": "zgqbr35",
"customerExternalId": "QUGZKsiYQoJ4QC3ug17lWEGM7mXdKoSIWSA44xcSUik="
},
"image": {
"date": "2018-10-28",
"sensor": "SENTINEL_2",
"weather": "COLD",
"soilMaterial": "BARE"
},
"maps": [
{
"type": "SAMZ",
"_links": {}
}

For this map type could you please add in the coverage result panel the NDVI image thumbnail for image returned by the coverage.

to get the thumbnail on each image included in the SAMZ coverage request you can use the following request https://bridge.geosys-na.com/field-level-maps/v4/season-fields/zgqbr35/coverage/2019-08-29/base-reference-map/INSEASON_NDVI/thumbnail.png

where the date of the image will come from the coverage call as the season field id

No able to get coverage on newly created shapefile

Describe the bug
Just tested an end to end scenario, starting with drawing field border in a newly created shapefile layer (attached) and I received an error while requesting coverage. The error message is just saying " Error of processing! Exception Bad Request...

here is the python warning:
2019-04-23T14:16:19 WARNING warning:C:\PROGRA1\QGIS31.6\apps\Python37\lib\site-packages\PyQt5\uic\objcreator.py:152: DeprecationWarning:

         'U' mode is deprecated
         
         
         traceback: File "", line 1, in 
          File "C:/PROGRA~1/QGIS3~1.6/apps/qgis/./python\qgis\utils.py", line 344, in startPlugin
          plugins[packageName].initGui()
          File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\plugin.py", line 181, in initGui
          self._create_dock()
          File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\plugin.py", line 147, in _create_dock
          from geosys.ui.widgets.geosys_dockwidget import (
          File "C:/PROGRA~1/QGIS3~1.6/apps/qgis/./python\qgis\utils.py", line 672, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 728, in exec_module
          File "", line 219, in _call_with_frames_removed
          File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_dockwidget.py", line 48, in 
          from geosys.ui.help.help_dialog import HelpDialog
          File "C:/PROGRA~1/QGIS3~1.6/apps/qgis/./python\qgis\utils.py", line 672, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 728, in exec_module
          File "", line 219, in _call_with_frames_removed
          File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\help\help_dialog.py", line 13, in 
          FORM_CLASS = get_ui_class('help_dialog_base.ui')
          File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\utilities\resources.py", line 124, in get_ui_class
          return uic.loadUiType(ui_file_path)[0]
          File "C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\PyQt5\uic\__init__.py", line 198, in loadUiType
          winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports, resource_suffix, import_from)
          File "C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\PyQt5\uic\Compiler\compiler.py", line 53, in __init__
          qtproxies.QtWidgets, CompilerCreatorPolicy())
          File "C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\PyQt5\uic\uiparser.py", line 177, in __init__
          self.factory = QObjectCreator(creatorPolicy)
          File "C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\PyQt5\uic\objcreator.py", line 85, in __init__
          if self.load_plugin(filename, plugin_globals, plugin_locals):
          File "C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\PyQt5\uic\objcreator.py", line 152, in load_plugin
          plugin = open(filename, 'rU')

fields.zip

Impossible to get elevation map

Describe the bug
Impossible to get elevation map out of the plugin. Elevation is not related with coverage date (no image date parameter), so when user selects "Elevation", we should go directly to export format and then generate map.

Colorcomposition map thumbnail size is sensor-related

Describe the bug
When I request colorcomposition maps on a single field (out of 4), the thumbnails are not all the same size. They depend on sensor type.

To Reproduce

  1. Load the attached zipped layer into QGIS (EU platform)
  2. Select field called 'mafalda' or 'pocahontas'
  3. Tick the 'Selected features only' box
  4. Choose COLORCOMPOSITION
  5. ALL SENSORS
  6. 2019-04-01 to today

Expected behavior
All the thumbnails should be the same height/width, no matter the sensor and no matter the field size/shape.

Screenshots
image

Let me know if you have questions.

Zoned maps

Vegetation index map will group pixel into classes but each class is not necessarily a contiguous set of pixel, when is asking for a vector map, our map engine will vectorize all pixels and the output can be cumbersome and heavy. We provide an option to create “cleaned” zones based on the selected map. What we need from you is to:

  • Change the label on the map parameter screen from “SAMZ zone” by “Number of zones”. the default value is Null
  • When this property is filled by the user (no persistence of this user input) add in the get request the following parameter: ?zoning=true&zoneCount=X where X is the number of zone set by the user. This is available for all maps except SaMZ that is by definition a zoned map (so you will continue to use the number of zone set by the user) and color composition.
  • Postman collection shared by mail provides examples on several map types of this zoning option

Here is one example of the Get map URL with zoning option:

https://bridge.preprod.geosys-na.com/field-level-maps/v4/season-fields/5nl35la/coverage/2019-11-25/base-reference-map/INSEASON_NDVI?zoning=true&zoneCount=12

Zoning option is available for all map type except SaMZ and color composition

Credentials

Describe the bug
Need to have Client.secret and client.id on the Options screen as it can be different for each account.

Get Hotspot

Hotspot is a capability that will return a point link with each polygon or each part of a zoned map (NDVI, GNDVI, EVI, OM, YPM, YGM, CVI, Elevation):

  • To have one point per zone the following parameter need to be added in the URL on the request &HotSpot=True
  • To have one point per part of each zone the following parameter need to be added in the URL on the request &HotSpot=True&zoningSegmentation=polygon

The Postman collection shared by email provides examples on several map types of this sampling plan feature

On the map parameter screen you will need to add:

  • A check box for hotspot
  • A check box for one point per part

When hotspots is requested the response of the map API will contain:

  • Hotspot location
hotSpots": [
    {
      "geometry": "POINT (-100.26517713 38.99869576)",
      "segmentId": 1
    },
    {
      "geometry": "POINT (-100.26977919 38.99869091)",
      "segmentId": 2
    },
    {
      "geometry": "POINT (-100.27306991 38.99872395)",
      "segmentId": 3

- segment geometry. Segment is the object used as baseline to localize sampling point

{
      "id": 2,
      "stats": null,
      "segments": [
        {
          "id": 3,
          "geometry": "POLYGON ((-100.27327658 38.99521541, -100.27322103 38.99525856, -100.2731215 38.99529863, -100.27282053 38.99531638, -100.27235543 38.99544126, -100.27149121 38.99519287, -100.27138006 38.99509693, -100.27140155 38.99509685, -100.27125268 38.99274202, -100.2721877 38.99388471, -100.27197488 38.99396754, -100.27193783 38.99401002, -100.27194634 38.99410263, -100.27211392 38.99433437, -100.27231743 38.99471651, -100.27257459 38.99492696, -100.27265039 38.99494979, -100.27265947 38.99492774, -100.27264483 38.99487804, -100.2727993 38.99472743, -100.27285231 38.99469692, -100.27327658 38.99521541))",
          "stats": {
            "mean": 76.566032409667969,
            "max": 95.4800033569336,
            "min": 68.2699966430664,
            "area": 20200.183288909735,
            "std": 6.545262336730957
          }
        },
        {
          "id": 4,
          "geometry": "POLYGON ((-100.26223593 39.00193555, -100.26229984 39.00191334, -100.26241982 39.00190972, -100.26252536 39.00194399, -100.26255911 39.00197363, -100.26257067 39.00204349, -100.26252993 39.00210867, -100.26238314 39.0022166, -100.26223939 39.00221545, -100.26223593 39.00193555))",
          "stats": {
            "mean": 69.833854675292969,
            "max": 71.209999084472656,
            "min": 68.389999389648437,
            "area": 796.8251545285442,
            "std": 0.84949243068695068
          }
        },
        {
          "id": 5,
          "geometry": "POLYGON ((-100.26233923 38.99513157, -100.26242482 38.99522398, -100.26243726 38.99531859, -100.26239082 38.99542998, -100.26223783 38.9955403, -100.2619837 38.99563503, -100.26192073 38.99569498, -100.26178604 38.99593701, -100.26154296 38.99611787, -100.26138838 38.99619037, -100.2612239 38.99640278, -100.26110956 38.99680612, -100.26103841 38.99689982, -100.26097037 38.99693453, -100.26084211 38.99693285, -100.26079658 38.99691753, -100.26080418 38.99528034, -100.26090623 38.99531307, -100.26102583 38.99532822, -100.26160438 38.99532531, -100.26180122 38.99529083, -100.26199082 38.99513989, -100.26198903 38.99513291, -100.26233923 38.99513157))",
          "stats": {
            "mean": 77.062858581542969,
            "max": 95.4800033569336,
            "min": 68.2699966430664,
            "area": 13323.431806102484,
            "std": 7.3088870048522949
          }
        },

Issue in SaMZ creation

Describe the bug
SaMZ is a zoning method that compile several images to create zones:

  • when the selection is empty in the coverage screen then you need to call SaMZ (see SaMZ Auto in the postman collection). Our platform will automatically select 5 images and create zones)
  • when the selection is not empty, you need to call SaMZ and set selected images dates to be used (see SaMZ Custom in the Postman collection)

Currently if several image are selected, the tool generates several maps and it should not be the case.

Issue creating a difference map

Describe the bug
A clear and concise description of what the bug is.

Trying to do a difference map I get:

2019-05-03T11:08:52     WARNING    Traceback (most recent call last):
              File "/Users/timlinux/Library/Application Support/QGIS/QGIS3/profiles/Maceira/python/plugins/geosys-qgis-plugin/geosys/ui/widgets/geosys_dockwidget.py", line 536, in start_difference_map_creation
              filename, output_map_format=self.output_map_format)
              File "/Users/timlinux/Library/Application Support/QGIS/QGIS3/profiles/Maceira/python/plugins/geosys-qgis-plugin/geosys/ui/widgets/geosys_coverage_downloader.py", line 326, in create_difference_map
              proxies=QGISSettings.get_qgis_proxy())
              File "/Users/timlinux/Library/Application Support/QGIS/QGIS3/profiles/Maceira/python/plugins/geosys-qgis-plugin/geosys/bridge_api_wrapper.py", line 109, in __init__
              self.authenticated, self.authentication_message = self.authenticate()
              File "/Users/timlinux/Library/Application Support/QGIS/QGIS3/profiles/Maceira/python/plugins/geosys-qgis-plugin/geosys/bridge_api_wrapper.py", line 150, in authenticate
              self.client_secret)
              File "/Users/timlinux/Library/Application Support/QGIS/QGIS3/profiles/Maceira/python/plugins/geosys-qgis-plugin/geosys/bridge_api/connection.py", line 69, in get_access_token
              return response.json()
              File "/Applications/QGIS3.4.app/Contents/MacOS/../Resources/python/requests/models.py", line 897, in json
              return complexjson.loads(self.text, **kwargs)
              File "/Applications/QGIS3.4.app/Contents/MacOS/../Resources/python/simplejson/__init__.py", line 518, in loads
              return _default_decoder.decode(s)
              File "/Applications/QGIS3.4.app/Contents/MacOS/../Resources/python/simplejson/decoder.py", line 370, in decode
              obj, end = self.raw_decode(s)
              File "/Applications/QGIS3.4.app/Contents/MacOS/../Resources/python/simplejson/decoder.py", line 400, in raw_decode
              return self.scan_once(s, idx=_w(s, idx).end())
             simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Problem on PNG export

Describe the bug
On the PNG export please also fecth the Legend file and the pgw file in the export folder. Currently we only have the png of the map.

EPIC 1.1: Base Framework for plugin - code

Expectation: As a GEOSYS plugin developer / contributor, I would like be able to access the source
code in a public GitHub repository. The repository should include code organized in a clear and usable layout.

Acceptance criteria: Given that the GEOSYS plugin has been hosted on GitHub, when opens the
repository in their web browser then they should find all needed resources to make a local copy of the
source code, improve it locally and share it back to the upstream code repository via a pull request.

Geosys Logo

We need to update the Geosys Logo used within the plugin as icon.

QGIS Icon

Describe the bug
When using the tool on QGIS with a Windows laptop, the icon in the main toolbar is changed. See screenshot.
iconQGIS

Missing map types in the drop down list

In the Map Product Type drop down list, we need to have option for OM, YVM, YGM, ELEVATION, COLOR COMPOSITION, SAMZ. Each of this map type will trigger a call to specific end points.

Date selection persistence

Would it be possible to persist date entered by the user or we need to set default start date in a config file or in the setting.

Multi polygon request

Describe the bug
When the layer contains several objects, the coverage is doing one coverage call with all objects. It should be one call per object.
Multifield request (one request with several object) is a nice to have feature that could be used in some specific case. If the number of object (in the layer or selection depending on the option selected) is under 10. Ideal would be to have Multifield as an option with a check box

Difference map not working

Describe the bug
The difference map button should be enable only when 2 EVI or NDVI maps have been selected in the coverage panel. The two selected date will be used as parameter of the difference map end point.

Coverage obtaining error

Hello
I've encountered a problem while trying to get the coverage. This is exactly the same case as in https://github.com/GEOSYS/qgis-plugin/issues/76, but this case is already closed as its author handled the issue by himself. I am a fresh user of the plugin, and kind of newbie to the programming.

Basically I have created a shapefile, but whatever settings I use it won't let me get the coverage. Is there any chance it's somehow caused by connection problem? I mean I had hard times getting authentication (turned out it is US region for me while I expected Europe). Also I am on a trial version as I need the plugin for just a while. If needed I will attach anything possible, but maybe there is some known solution by now.
Thanks in advance

EPIC 1.3: Documentation System

As a developer or user, I would like be able to be able to read clear, relevant and current
documentation that describes the code (for developers) and the user interface (for users).

Load Png map as a QGIS layer

Describe the bug
if the user is selecting png map, the map should be loaded in QGIS as a layer as for the Geotiff, you need to use the pgw file provided by the API to geocode the image on the map.
For example you use the following link to get the map:
https://bridge.geosys-na.com/field-level-maps/v4/season-fields/ngyw23j/coverage/2018-11-22/base-reference-map/INSEASON_NDVI/image.png

and this one is the worldfile:
"https://bridge.geosys-na.com/field-level-maps/v4/season-fields/ngyw23j/coverage/2018-11-22/base-reference-map/INSEASON_NDVI/world-file.pgw",

Get Hotspot segment as a layer

While requesting Hotspot, see here, the API will return the following segment object as the example below:

{
"id": 2,
"stats": null,
"segments": [
{
"id": 3,
"geometry": "POLYGON ((-100.27327658 38.99521541, -100.27322103 38.99525856, -100.2731215 38.99529863, -100.27282053 38.99531638, -100.27235543 38.99544126, -100.27149121 38.99519287, -100.27138006 38.99509693, -100.27140155 38.99509685, -100.27125268 38.99274202, -100.2721877 38.99388471, -100.27197488 38.99396754, -100.27193783 38.99401002, -100.27194634 38.99410263, -100.27211392 38.99433437, -100.27231743 38.99471651, -100.27257459 38.99492696, -100.27265039 38.99494979, -100.27265947 38.99492774, -100.27264483 38.99487804, -100.2727993 38.99472743, -100.27285231 38.99469692, -100.27327658 38.99521541))",
"stats": {
"mean": 76.566032409667969,
"max": 95.4800033569336,
"min": 68.2699966430664,
"area": 20200.183288909735,
"std": 6.545262336730957
}
},
{
"id": 4,
"geometry": "POLYGON ((-100.26223593 39.00193555, -100.26229984 39.00191334, -100.26241982 39.00190972, -100.26252536 39.00194399, -100.26255911 39.00197363, -100.26257067 39.00204349, -100.26252993 39.00210867, -100.26238314 39.0022166, -100.26223939 39.00221545, -100.26223593 39.00193555))",
"stats": {
"mean": 69.833854675292969,
"max": 71.209999084472656,
"min": 68.389999389648437,
"area": 796.8251545285442,
"std": 0.84949243068695068
}
},
{
"id": 5,
"geometry": "POLYGON ((-100.26233923 38.99513157, -100.26242482 38.99522398, -100.26243726 38.99531859, -100.26239082 38.99542998, -100.26223783 38.9955403, -100.2619837 38.99563503, -100.26192073 38.99569498, -100.26178604 38.99593701, -100.26154296 38.99611787, -100.26138838 38.99619037, -100.2612239 38.99640278, -100.26110956 38.99680612, -100.26103841 38.99689982, -100.26097037 38.99693453, -100.26084211 38.99693285, -100.26079658 38.99691753, -100.26080418 38.99528034, -100.26090623 38.99531307, -100.26102583 38.99532822, -100.26160438 38.99532531, -100.26180122 38.99529083, -100.26199082 38.99513989, -100.26198903 38.99513291, -100.26233923 38.99513157))",
"stats": {
"mean": 77.062858581542969,
"max": 95.4800033569336,
"min": 68.2699966430664,
"area": 13323.431806102484,
"std": 7.3088870048522949
}
},

The goal is to convert these information into a shapefile layer. So segment polygon will have to be converted into a shapefile layer stored in the Map Output Directory.

The layer will be added to the map view.

See also #100

Unable to install the plugin on QGIS 3.10

Describe the bug
Unable to install the plugin on QGIS 3.10

To Reproduce
Steps to reproduce the behavior:

  1. Install QGIS 3.10 and open the software (I would not advise to install 3.10 if 3.4 is already present on your system)
  2. Search for the GeoSYS plugin
  3. Install it
  4. See error:

Plugin has disappeared: The plugin seems to have been installed but I don't know where. Probably the plugin package contained a wrong named directory. Please search the list of installed plugins. I'm nearly sure you'll find the plugin there, but I just can't determine which of them it is. It also means that I won't be able to determine if this plugin is installed and inform you about available updates. However the plugin may work. Please contact the plugin author and submit this issue.

Bug

Expected behavior
We should be able to install the plugin.

Desktop (please complete the following information):

  • OS: Mac OS / Linux

On the processing toolbox, the label needs to be updated

Describe the bug
Naming of the function in the processing tool box needs to be change as the current one is misleading "Create coverage map" describe only one step of the process, this is why I did not try it... I would suggest to set "Get field level map"

EPIC 1.2: Testing Framework & Travis

Expectation: As a product owner, I would like to know that any submissions made to the plugin code
base are subject to automated testing to ensure a good standard of code quality.

Acceptance criteria: Given a new pull request being opened, when a reviewer views the pull
request queue then he should observe the test status of each pull request.

image

EPIC 3.3: Side Panel / Dock widget for searching

Expectation: As a user, I would like be able to search and browse for products using a side bar.

Acceptance criteria:

  1. Given the side bar is implemented, when searching GEOSYS then a list of available images
    should be displayed.
  2. Given the available image list is implemented, when browsing the image list, then I should
    be able to select one or more thumbnails and define criteria for map creation.
  3. Given the product criteria have been entered, when clicking OK, then the computed maps
    should be retrieved from the GEOSYS API and added to the QGIS Map Canvas.

Error when installing the Plugin from Zip

Describe the bug
Error, when loading the plugin from a zip file in QGIS 3.6

To Reproduce

  1. Download the plugin as zip file from the Github repo
  2. In QGIS choose the option, under the Plugins Manger to install from zip.
  3. Gives you an error

Expected behavior
The Plugin should install without any warnings.

Screenshots
image

Desktop (please complete the following information):

  • OS: MacOS Mojave
  • QGIS: ver 3.6.0

Additional context
Full Error message:

Couldn't load plugin 'geosys-qgis-plugin' due to an error when calling its initGui() method

ModuleNotFoundError: No module named 'past'
Traceback (most recent call last):
File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 344, in startPlugin
plugins[packageName].initGui()
File "/Users/andre/Library/Application Support/QGIS/QGIS3/profiles/testing/python/plugins/geosys-qgis-plugin/geosys/plugin.py", line 165, in initGui
self._create_dock()
File "/Users/andre/Library/Application Support/QGIS/QGIS3/profiles/testing/python/plugins/geosys-qgis-plugin/geosys/plugin.py", line 143, in _create_dock
from geosys.ui.widgets.geosys_dockwidget import (
File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/Users/andre/Library/Application Support/QGIS/QGIS3/profiles/testing/python/plugins/geosys-qgis-plugin/geosys/ui/widgets/geosys_dockwidget.py", line 35, in
from geosys.utilities.gui_utilities import (
File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/Users/andre/Library/Application Support/QGIS/QGIS3/profiles/testing/python/plugins/geosys-qgis-plugin/geosys/utilities/gui_utilities.py", line 3, in
from past.builtins import cmp
File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'past'

Python version: 3.6.8 (v3.6.8:3c6b436a57, Dec 24 2018, 02:04:31) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
QGIS version: 3.6.0-Noosa Noosa, exported

Python Path:
/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python
/Users/andre/Library/Application Support/QGIS/QGIS3/profiles/testing/python
/Users/andre/Library/Application Support/QGIS/QGIS3/profiles/testing/python/plugins
/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/plugins
/Library/Frameworks/SQLite3.framework/Versions/E/Python/3.6
/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
/Users/andre/Library/Application Support/QGIS/QGIS3/profiles/testing/python
/Users/andre/Documents/Jobs/geosys/GIS
/Users/andre/Library/Application Support/QGIS/QGIS3/profiles/testing/python/plugins/geosys-qgis-plugin
/Users/andre/Library/Application Support/QGIS/QGIS3/profiles/testing/python/plugins

test_get_field_map is failing

Describe the bug
The test test_get_field_map is failing.

To Reproduce
Steps to reproduce the behavior:

export BRIDGE_API_USERNAME=Grower_Bridge_Prod_US
export BRIDGE_API_PASSWORD=SET_THE_PASSWORD

make test-bridge-api

Context:
Test test_get_field_map is using the FieldLevelMapsAPI.
map_type_key = 'INSEASONPARTIAL_NDVI'
request body:

{'SeasonField': {'Id': 'jepqrr3'}, 'Image': {'Date': '2018-10-13'}, 'NPlanned': 48, 'NMin': 20, 'NMax': 70}

The output of the test is:

{'errors': {'body': {'seasonFieldId.Id': [{'code': 'not_found', 'message': 'SeasonField not found'}]}}, 'code': 'model_validation_error', 'message': 'Invalid input'}

Expected behavior
It should succeed.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Map export format selection

After the coverage selection we should have access to all format selection: png should be the default value and shp for vector. Then user should be able to select tiff or kmz.

EPIC 2.2: Testing with 80% coverage

As a developer and product owner, I would like to know that code being written is
subject to a testing regime in order to limit the possibility that new additions to the code base cause regressions.

Impossible to get OM maps

Describe the bug
Impossible to get OM map, always receiving an error.
OMError

2019-04-18T07:07:54 WARNING Traceback (most recent call last):
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_itemwidget.py", line 112, in mouseDoubleClickEvent
self.addToMap()
AttributeError: 'CoverageSearchResultItemWidget' object has no attribute 'addToMap'

Main menu Drop donw list empty

Describe the bug
After successful authentication on the Options panel, impossible to use the main panel as all drop down menu are empty.

Error on the second coverage call

I am starting my project with one layer, selecting parameter calling the coverage, hit "Next" and receive response from coverage API. Then I click "Back" and "Search Map" again. I received an error message with Python error.

2019-04-05T11:18:44 WARNING Traceback (most recent call last):
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_dockwidget.py", line 175, in show_next_page
self.start_coverage_search()
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_dockwidget.py", line 421, in start_coverage_search
parent=self.iface.mainWindow())
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_coverage_downloader.py", line 85, in init
*credentials_parameters_from_settings())
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\bridge_api_wrapper.py", line 101, in init
self.authenticated, self.authentication_message = self.authenticate()
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\bridge_api_wrapper.py", line 142, in authenticate
self.client_secret)
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\bridge_api\connection.py", line 69, in get_access_token
return response.json()
File "C:\PROGRA1\QGIS31.6\apps\Python37\lib\site-packages\requests\models.py", line 896, in json
return complexjson.loads(self.text, **kwargs)
File "C:\PROGRA1\QGIS31.6\apps\Python37\lib\site-packages\simplejson_init_.py", line 518, in loads
return _default_decoder.decode(s)
File "C:\PROGRA1\QGIS31.6\apps\Python37\lib\site-packages\simplejson\decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "C:\PROGRA1\QGIS31.6\apps\Python37\lib\site-packages\simplejson\decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

2019-04-05T11:18:52 WARNING Traceback (most recent call last):
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_dockwidget.py", line 175, in show_next_page
self.start_coverage_search()
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_dockwidget.py", line 405, in start_coverage_search
self.search_threads.data_downloaded.disconnect()
TypeError: disconnect() failed between 'data_downloaded' and all its connections

2019-04-05T11:19:28 WARNING Traceback (most recent call last):
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_dockwidget.py", line 175, in show_next_page
self.start_coverage_search()
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_dockwidget.py", line 405, in start_coverage_search
self.search_threads.data_downloaded.disconnect()
TypeError: disconnect() failed between 'data_downloaded' and all its connections

Feature selection

In the original discussion feature selection to get map was based on selection. Currently if we have an active layer of 10,000 features we cannot send API coverage for this entire layer but user may be interested to have maps for couple of objects.

Active layer drop down should have a default value with the layer selected in the "Layers" panel. In addition to the drop down list, it is required to have an option to have "selected objects only" ideally with the number.

Sensor selection

Sensor selection is an optional filter for the coverage. The default option should be "All" meaning that we will return all data available. As all data are cross calibrated in our platform, user can have several maps the same day and data will be consistent.

Bridge API error handler

once all possible error responses from Bridge API gathered, we can start to make a generic error handler and show nice and detail error message to the user.

Impossible to get coverage

Describe the bug
With the latest release, I selected a layer and the search parameter. Then when I hit the "Search map" button, new panel load but received an error.

Here is the WKT selected:
MultiPolygon (((-97.73379563999999675 41.51117234000000167, -97.73353815000000111 41.52155149000000023, -97.72950410999999349 41.52155149000000023, -97.72916078999999456 41.52116591000000057, -97.7274012599999935 41.52113377999999955, -97.727358339999995 41.52153541999999931, -97.72699355999999682 41.52174426999999923, -97.72598505000000557 41.52185673000000321, -97.72564173000000665 41.52196919000000008, -97.7256631900000059 41.52216196999999909, -97.7252125699999965 41.52214590999999899, -97.72512673999999322 41.52195311999999916, -97.72413969000000122 41.52190492999999805, -97.72416115000000048 41.51139729999999872, -97.73379563999999675 41.51117234000000167)))

here is the stack trace:
An error has occurred while executing Python code:

TypeError: disconnect() failed between 'data_downloaded' and all its connections
Traceback (most recent call last):
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_dockwidget.py", line 175, in show_next_page
self.start_coverage_search()
File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_dockwidget.py", line 405, in start_coverage_search
self.search_threads.data_downloaded.disconnect()
TypeError: disconnect() failed between 'data_downloaded' and all its connections

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.6.0-Noosa Noosa, 58734527ab

Python Path:
C:/PROGRA1/QGIS31.6/apps/qgis/./python
C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA1/QGIS31.6/apps/qgis/./python/plugins
C:\Program Files\QGIS 3.6\bin\python37.zip
C:\PROGRA1\QGIS31.6\apps\Python37\DLLs
C:\PROGRA1\QGIS31.6\apps\Python37\lib
C:\Program Files\QGIS 3.6\bin
C:\PROGRA1\QGIS31.6\apps\Python37
C:\PROGRA1\QGIS31.6\apps\Python37\lib\site-packages
C:\PROGRA1\QGIS31.6\apps\Python37\lib\site-packages\win32
C:\PROGRA1\QGIS31.6\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA1\QGIS31.6\apps\Python37\lib\site-packages\Pythonwin
C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop
C:\Users\VL\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins
C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop
C:\Users\VL\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins
C:/GEOSYS/Application/Bridge/Testing

Desktop (please complete the following information):

  • OS: Windows 10
  • Version QGIS 3.6

Additional context
Using PUS account

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.