Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoProcessing Tool Intersection issue #10429

Closed
1 task done
tdipisa opened this issue Jun 17, 2024 · 7 comments · Fixed by #10432 or #10441
Closed
1 task done

GeoProcessing Tool Intersection issue #10429

tdipisa opened this issue Jun 17, 2024 · 7 comments · Fixed by #10432 or #10441

Comments

@tdipisa
Copy link
Member

tdipisa commented Jun 17, 2024

Description

It seems the tool is not able to calculate an intersection using a precalcuated buffer if the intersectin feature is not selected

How to reproduce

  • Open this map
  • Perform a buffer as indicated in figure below

Image

  • Use this buffer to calculate the intersection with the bugsites layer wthout selecting the Intersection feature

Expected Result

The intersection should be calculated using the whole buffer layer whle now 'undefined' is sent to the server

Current Result

Image

  • Not browser related
Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users)
Browser Affected Version
Internet Explorer
Edge
Chrome
Firefox
Safari

Other useful information

@MV88
Copy link
Contributor

MV88 commented Jun 17, 2024

that context was missing a key property as it it the wpsUrl

i have fixed the demo_context cfg of GeoProcessingTool and now it is working

can i close this @tdipisa ?

@tdipisa
Copy link
Member Author

tdipisa commented Jun 17, 2024

@MV88 I don't think the issue can be closed. I didn't understand which config fix you applied. Can you please better specify it.
In any case it seems the tool now no longer works as before: for each layer I've selected (e.g. for the buffer) I have the following, which leads me to think there is some missconfiguration now:

image

Can you please review again?

@MV88
Copy link
Contributor

MV88 commented Jun 17, 2024

yes I misstyped the protocol

this is the cfg added

{
  "cfg": {
    "wpsUrl": "https://gs-stable.geo-solutions.it/geoserver/wps",
    "selectedTool": "buffer",
    "buffer": {
      "quadrantSegments": 200,
      "capStyle": "Round"
    }
  },
  "override": {}
}

try again

@tdipisa
Copy link
Member Author

tdipisa commented Jun 18, 2024

@MV88 thank you. It is working now. Is there something to fix on the JS documentation for this or something to fix in the plugin default config for contexts? If no, please feel free to close the issue.

@MV88
Copy link
Contributor

MV88 commented Jun 18, 2024

I think that we could close this issue. the thing is that every time this property is not configured it will cause this issue because

  • the source is a generated vector layer
  • this needs a geoserver behind

solutions

  • we can maybe introduce a default value pointing to out geoservers this would avoid this issue even tough is not ideal.
  • otherwise we have to block the run button when this situation occurs

what do you think ?

@MV88
Copy link
Contributor

MV88 commented Jun 18, 2024

as agreed with @tdipisa we will harden more the geoprocessingtool adding

  • a check that verify that if wpsUrl is not configured or the layer.url is not present it disables the run button by informing the user, this will prevent to run into errors messages that can be avoided with correct configuration
  • we can add a default config in the pluginsCfg with "wpsUrl":"https://yourdomain/geoserver/wps"

@MV88
Copy link
Contributor

MV88 commented Jun 19, 2024

Actually i have found a fix that shows the correct error message, i'll proceed this way instead of changing workflow in the ui
also point 2 makes this fix not working so is better to simply correctly handle the error as proposed here

image

MV88 added a commit to MV88/MapStore2 that referenced this issue Jun 19, 2024
@MV88 MV88 linked a pull request Jun 19, 2024 that will close this issue
12 tasks
dsuren1 pushed a commit that referenced this issue Jun 21, 2024
#10432)

* Fix #10429 error mesage when using vector data with no wpsUrl defined

* improved logic for misconfigured plugin
@ElenaGallo ElenaGallo self-assigned this Jun 21, 2024
@ElenaGallo ElenaGallo added the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Jun 21, 2024
MV88 added a commit to MV88/MapStore2 that referenced this issue Jun 24, 2024
…o wpsUrl defined (geosolutions-it#10432)

* Fix geosolutions-it#10429 error mesage when using vector data with no wpsUrl defined

* improved logic for misconfigured plugin
dsuren1 pushed a commit that referenced this issue Jun 24, 2024
#10432) (#10441)

* Fix #10429 error mesage when using vector data with no wpsUrl defined

* improved logic for misconfigured plugin
@tdipisa tdipisa removed the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment