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 Tools plugin #9263

Closed
10 of 37 tasks
MV88 opened this issue Jun 29, 2023 · 4 comments · Fixed by #9316
Closed
10 of 37 tasks

Geoprocessing Tools plugin #9263

MV88 opened this issue Jun 29, 2023 · 4 comments · Fixed by #9316
Assignees
Milestone

Comments

@MV88
Copy link
Contributor

MV88 commented Jun 29, 2023

Description

The plugin can be embedded into the main MapStore project.

Based on the requirements, it is intended that only the following WPSs must be maintained:

  • geo:buffer
  • gs:IntersectionFeatureCollection

We also understand that, for both layer selections, a feature from one of the layers present in map need to be selected for both the WPS. This means:

  • UI to select one of the layer present in TOC
  • Once a layer is selected, UI to select a feature geometry from it

The result is, in both cases, a new vector client side layer added in TOC that can be saved within the map.
It will be also necessary to include in the UI all the other possible parameters requested from the above mentioned WPSs along with the possibility to choose the name of the resulting vector layer in TOC.

An extendable WPS tool needs to be implemented for MapStore for these kinds of purposes leveraging the existing support to manage asynchronous requests.

Acceptance criteria

Summarizing the UI & ACs here:

  • This will be an optional plugin to be used in contexts and not included in default map viewer
  • Will open as a right panel through a button in the sidebar
  • When a layer is selected as source or intersection it will check with describe wps process if geo:buffer and gs:IntersectionFeatureCollection, gs:CollectGeometries are available, if not notify it via a message in the UI (using a tooltip as addon
  • Propose to select two functionalities in a combobox working on top of the WPS OGC standard

Buffer (WPS geo:buffer):

  • Once selected this will ask to provide:
    • A list of layers coming from TOC as a source
    • (optional) a list of features in a combobox with fid or named "feature 0" etc. that are fetched via a GetFeature request
    • A distance numeric field
    • A combobox for the unit of measure similar to the one in the measure plugin
    • A RUN button
      • If pressed and no feature is selected then it will do before a gs:CollectGeometries to get the entire geometry to be used in the wps process, in this case a confirmation modal appears because the process can be heavy and take a lot of time (we have to check about the possibility to run the process asynchronously in this case, as it happens for the existing export plugin)
      • If a feature is selected from combobox it can highlight the feature in map by zooming on it and it will do a get feature with geometry to be used in the wps process
      • Optionally it can have a button on the side to enable feature selection from the map
  • As agreed with @tdipisa we will send coordinates in 3857
  • add possibility to define the quadrantSegments number
  • add possibility to define the capStyle string
  • summarizing the distance factor conversion:
    • regarding the distance of the buffer a better approximation will be done in this way
      • calculate the centroid of the geometry
      • calculate the geodetic distance of two points distant 1000m towards east at the latitude of the centroid lat (using haversine formula)
      • result = 1000 / distance_calculated

Intersection (WPS gs:IntersectionFeatureCollection):

  • In this case the ui will be 4 combobox
    • One for layer and feature of the source
    • One for layer and feature of the intersection layer
    • The behaviour is the same as described before for the feature selection, the difference is that in this case we need to send these data to the gs:IntersectionFeatureCollection process of the layer source
    • include also other missing parameters
    • first attributes to retain (String)
    • second attributes to retain (String)
    • intersectionMode - list (intersection, first, second)
    • percentagesEnabled - Boolean
    • areasEnabled - Boolean

General ACs:

  • exclude raster layers from the possibility to run the tool
  • add a checkbox to toggle on and off highlighted features
  • add single map selection for the feature
  • Loading spinners and blocked UI are needed to give the user a useful feedback
  • Include warnings messages and notification where needed, especially if a tool is run with no feature selected
  • add an advanced options section in an accordion the following parameters present in the list

Other useful information

more details here https://github.com/geosolutions-it/MapStore-C265/issues/4

@MV88 MV88 added the New Feature used for new functionalities label Jun 29, 2023
@MV88 MV88 self-assigned this Jun 29, 2023
@MV88 MV88 added this to the 2023.02.00 milestone Jul 26, 2023
MV88 added a commit to MV88/MapStore2 that referenced this issue Jul 26, 2023
MV88 added a commit to MV88/MapStore2 that referenced this issue Jul 26, 2023
@MV88 MV88 mentioned this issue Jul 26, 2023
12 tasks
MV88 added a commit to MV88/MapStore2 that referenced this issue Aug 1, 2023
MV88 added a commit to MV88/MapStore2 that referenced this issue Aug 1, 2023
@MV88 MV88 mentioned this issue Aug 1, 2023
12 tasks
@tdipisa tdipisa linked a pull request Aug 4, 2023 that will close this issue
12 tasks
MV88 added a commit to MV88/MapStore2 that referenced this issue Aug 7, 2023
MV88 added a commit to MV88/MapStore2 that referenced this issue Aug 7, 2023
MV88 added a commit that referenced this issue Aug 11, 2023
* #9263 Geo Processing Tools

* wip

* wip

* #9263 implementing geoprocessing tools

* fix build

* fix doc

* fix review changes requested

* Finalized review and fixed locales

* fix it locales

* fix test

* fix tests

* fix after review

* fix with toWKT

* fix call to toWkt

* clear console.error

* changes after latest review

* refactor after latest changes

* changes to the wfslayers selector
* fixed tests

* little fix

* fix lint and epics

* fix test

* fix messages

* Adding pagination to the select features combobox

* fix toggle highlight on close and also fix bug with ft info zoom to

* Update web/client/selectors/layers.js

* Update web/client/selectors/layers.js

* Update web/client/actions/additionallayers.js

* Apply suggestions from code review

* Apply suggestions from code review

---------

Co-authored-by: Lorenzo Natali <lorenzo.natali@geosolutionsgroup.com>
@ElenaGallo ElenaGallo self-assigned this Aug 21, 2023
@ElenaGallo
Copy link
Contributor

ElenaGallo commented Aug 21, 2023

@MV88 some notes after testing the issue (use this map):

  • when the panel reopens, after intersecting/buffering the layers, the layers are still present on the panel and highlighted on the map
1.mov
  • this also happens when changing from buffer to intersection
2.mov

@MV88
Copy link
Contributor Author

MV88 commented Aug 22, 2023

when the panel reopens, after intersecting/buffering the layers, the layers are still present on the panel and highlighted on the map
this also happens when changing from buffer to intersection

It's correct to show the highlighted layers on reopening,
is not correct though that intersection Feature remains highlighted when switching to buffer.
I will fix this last behavior

MV88 added a commit to MV88/MapStore2 that referenced this issue Aug 22, 2023
@tdipisa tdipisa reopened this Aug 30, 2023
@tdipisa tdipisa closed this as completed Sep 19, 2023
@ElenaGallo ElenaGallo added the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Sep 20, 2023
@tdipisa tdipisa removed the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Sep 26, 2023
@SESMAPS
Copy link

SESMAPS commented Feb 22, 2024

Once the new layer has been created from any geoprocessing operation, this layer:

  1. There is no option to download the layer in any supported format.
  2. If you want to work with this layer as input for running a new geoprocessing task, the layer does not appear available.
  3. Is it possible to save the layer directly to PostgreSQL or somewhere on the server?

@tdipisa
Copy link
Member

tdipisa commented Feb 22, 2024

@SESMAPS thank for getting in touch with us:

  1. There is no option to download the layer in any supported format.

I confirm, not yet. It could be an interesting enhancement.

  1. If you want to work with this layer as input for running a new geoprocessing task, the layer does not appear available.

It is possible indeed but from 2023.02.02

image

  1. Is it possible to save the layer directly to PostgreSQL or somewhere on the server?

No, MS doesn't provide any capability at the moment to publish new layers from scratch. Editing capabilities are anyway possible through the attribute table through WFS-T but not for vector layers created by the geoprocessing tool client side at the moment.

For further exchanges on this topic I can suggest you to use the mailing list. You can find links to subscribe here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants