Skip to content

Geoprocessing Tools plugin  #9263

Closed

Description

@MV88

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

Activity

  1. added
    New Feature
    on Jun 29, 2023
  2. self-assigned this
    on Jun 29, 2023
  3. added this to the 2023.02.00 milestone on Jul 26, 2023
  4. added 4 commits that reference this issue on Jul 26, 2023
  5. linked a pull request that will close this issue#9263 geoprocessing tools #9316on Aug 4, 2023
  6. added 2 commits that reference this issue on Aug 7, 2023
  7. added a commit that references this issue on Aug 11, 2023
  8. self-assigned this
    on Aug 21, 2023
  9. ElenaGallo commented on Aug 21, 2023

    @ElenaGallo
    Contributor

    @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
  10. MV88 commented on Aug 22, 2023

    @MV88
    ContributorAuthor

    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

  11. added a commit that references this issue on Aug 22, 2023
  12. added
    BackportNeeded
    on Sep 20, 2023
  13. removed
    BackportNeeded
    on Sep 26, 2023
  14. SESMAPS commented on Feb 22, 2024

    @SESMAPS

    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?
  15. tdipisa commented on Feb 22, 2024

    @tdipisa
    Member

    @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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions