Skip to content

Geoprocessing Tools plugin  #9263

@MV88

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions