Giter Site home page Giter Site logo

Multi polygon request about qgis-plugin HOT 11 CLOSED

earthdaily avatar earthdaily commented on August 16, 2024
Multi polygon request

from qgis-plugin.

Comments (11)

myarjunar avatar myarjunar commented on August 16, 2024

I think we need to have further discussion about this issue. Calling one request per one feature would take a longer time to get the results, that's why I combine it to a single feature in the first place so it will only request one time. Also If there is a case where the user would like to request a coverage for every single feature, we need to discuss about how do we show the results in the coverage results and also the map creation itself.

from qgis-plugin.

vincentlel avatar vincentlel commented on August 16, 2024

Hi Rohmat, no problem to jump on a call tomorrow morning CST. A bulk product call generate stats for the entire set of data included in the call. The baseline scenario is to do one call per product (ideally with a progress bar) as it will generate stats per field which is important if you need to use data for agronomic model on a field. It should be possible to extract data for several hundred of polygon. A bulk call is possible with 20 field max if I remenber correctly so again the current implementation should be an option if the selection or number of object allow to use this option. The display in the coverage panel can use a prefix to display all data per field.

from qgis-plugin.

myarjunar avatar myarjunar commented on August 16, 2024

HI @vincentlel , my apologies, after I had a look at the user requirements documentation, I just realized that this feature is included in the processing algorithm. I labelled it as an enhancement because I thought you raised this ticket for the side panel. We need to decide how do we want to show the result in the results panel if we want to add this feature to the side panel. Other than that I will try to make it work with the processing algorithm. cc @AndreLester @timlinux

from qgis-plugin.

 avatar commented on August 16, 2024

Hi all, is this related to the error I'm having when I don't tick the box 'Selected features only'?
At the moment, no matter how many polygons I select in QGIS (tested with 0, 1 or 2), as long as I leave this box unticked, I get this error.
The only case that works is when I have only one polygon(field) in my layer, which is very rare in practice.
image
Thank you

from qgis-plugin.

myarjunar avatar myarjunar commented on August 16, 2024

Hi @SupportToulouse , thanks for reporting this issue. Could you also upload the zipped layer here if it's possible? I will try to replicate it on my machine first.

Currently iff the Selected features only is unticked, it means you will send a coverage request for a whole layer geometry. So it could be because of the size of the layer area. I believe there is a size limit for that in Bridge API. So I guess the error is saying the area is too big. Better error handling will be coming later.

Thank you very much.

from qgis-plugin.

 avatar commented on August 16, 2024

Hi @myarjunar thank you for your reply.
Please, find attached the zipped layer. There are 3 polygons/fields in the layer (located in Brazil - EU platform in case you needed it).
fields_kartozaBR.zip
Let me know if you have any other questions.

from qgis-plugin.

myarjunar avatar myarjunar commented on August 16, 2024

@SupportToulouse thanks, that helps me a lot. I am able to replicate it and here is the error message:

Field diagonal too big (actual: 13814.255 m, max: 10000 m)

This is happening because at the moment the default behaviour is to perform bulk request (many features as single geometry). With this PR #84 , it will no longer happening unless the user ask to.

from qgis-plugin.

 avatar commented on August 16, 2024

Aaah, you mean the fields are too far from each other? That makes sense.
Indeed, the bulk request should not be the default behaviour. I'm glad the issue is already taken care of.
Thanks for the clarification!

from qgis-plugin.

vincentlel avatar vincentlel commented on August 16, 2024

Hi Rohmat, almost done but I got an error while loading 27 maps on 3 fields (9 maps per field) could you please check.
An error has occurred while executing Python code:

simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 
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 204, in show_next_page
    self.start_map_creation()
  File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_dockwidget.py", line 510, in start_map_creation
    self._start_map_creation(self.selected_coverage_results)
  File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_dockwidget.py", line 481, in _start_map_creation
    data=data, output_map_format=self.output_map_format)
  File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\ui\widgets\geosys_coverage_downloader.py", line 237, in create_map
    proxies=QGISSettings.get_qgis_proxy())
  File "C:/Users/VL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\geosys-qgis-plugin-develop\geosys\bridge_api_wrapper.py", line 109, 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 150, 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:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\requests\models.py", line 896, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\simplejson\__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\simplejson\decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "C:\PROGRA~1\QGIS3~1.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)


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:/PROGRA~1/QGIS3~1.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:/PROGRA~1/QGIS3~1.6/apps/qgis/./python/plugins
C:\Program Files\QGIS 3.6\bin\python37.zip
C:\PROGRA~1\QGIS3~1.6\apps\Python37\DLLs
C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib
C:\Program Files\QGIS 3.6\bin
C:\PROGRA~1\QGIS3~1.6\apps\Python37
C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages
C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\win32
C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS3~1.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:/GEOSYS/Application/Bridge/Testing

from qgis-plugin.

myarjunar avatar myarjunar commented on August 16, 2024

@vincentlel Do you still get this error on another try? I believe this is happening because sometimes the identity server is not returning anything when we ask for the token. This should also be handled when we implement the error handler.

from qgis-plugin.

vincentlel avatar vincentlel commented on August 16, 2024

Hi Rohmat, the processing feature is working fine as bulk request. I am not familiar with the architecture of this processing toolbox but as you explained, we should have one output layer and therefore the default behavior is a bulk request. To handle on request per polygon, we should break apart the shapefile and run a batch. Is it the correct rational behind the behavior of the processing function?

from qgis-plugin.

Related Issues (20)

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.