Skip to content

Commit

Permalink
Fix #9685 Add possibility to use vector layers inside GeoProcessing t…
Browse files Browse the repository at this point in the history
…ool (#9691)

* Fix #9685 Add possibility tyo use vector layers inside Geo_Processing tool

* refactored the way the counter for each tool is handled
* add possibility to configure a wpsUrl to be used as default source in the plugin otherwise the url from the layer will be used

* refactor: moved some utilities in dedicated utils file

* improved feedback in case wpsUrl is missing

* improve feedback also for buffer tool

* better handling misconfigured layer in buffer tool

* Fixed review points

* better clean up of highlighted features
* fixed layer used in intersection process
* fiz zoom to feature when selected

* fix test
  • Loading branch information
MV88 authored Dec 6, 2023
1 parent b903bce commit 468775b
Show file tree
Hide file tree
Showing 19 changed files with 592 additions and 198 deletions.
14 changes: 0 additions & 14 deletions web/client/actions/__tests__/geoProcessing-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import {
errorLoadingDFT, ERROR_LOADING_DFT,
getFeatures, GET_FEATURES,
initPlugin, INIT_PLUGIN,
increaseBufferedCounter, INCREASE_BUFFERED_COUNTER,
increaseIntersectedCounter, INCREASE_INTERSECT_COUNTER,
runningProcess, RUNNING_PROCESS,
runProcess, RUN_PROCESS,
setBufferDistance, SET_BUFFER_DISTANCE,
Expand Down Expand Up @@ -99,18 +97,6 @@ describe('Test Geo Processing Tools related actions', () => {
cfg
});
});
it('increaseBufferedCounter', () => {
const action = increaseBufferedCounter();
expect(action).toEqual({
type: INCREASE_BUFFERED_COUNTER
});
});
it('increaseIntersectedCounter', () => {
const action = increaseIntersectedCounter();
expect(action).toEqual({
type: INCREASE_INTERSECT_COUNTER
});
});
it('runningProcess', () => {
const status = true;
const action = runningProcess(status);
Expand Down
20 changes: 2 additions & 18 deletions web/client/actions/geoProcessing.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export const GPT_TOOL_INTERSECTION = "intersection";
export const GPT_CONTROL_NAME = "GeoProcessing";
export const GPT_SOURCE_HIGHLIGHT_ID = "gpt-layer";
export const GPT_INTERSECTION_HIGHLIGHT_ID = "gpt-layer-intersection";
export const GPT_INTERSECTION_GROUP_ID = "intersection.layer";
export const GPT_BUFFER_GROUP_ID = "buffered.layer";
export const GPT_INTERSECTION_GROUP_ID = "intersection_group";
export const GPT_BUFFER_GROUP_ID = "buffered_group";

export const CHECK_WPS_AVAILABILITY = "GPT:CHECK_WPS_AVAILABILITY";
export const CHECKING_WPS_AVAILABILITY = "GPT:CHECKING_WPS_AVAILABILITY";
Expand All @@ -21,8 +21,6 @@ export const CHECKED_WPS_AVAILABILITY = "GPT:CHECKED_WPS_AVAILABILITY";
export const GET_FEATURES = "GPT:GET_FEATURES";
export const ERROR_LOADING_DFT = "GPT:ERROR_LOADING_DFT";
export const INIT_PLUGIN = "GPT:INIT_PLUGIN";
export const INCREASE_BUFFERED_COUNTER = "GPT:INCREASE_BUFFERED_COUNTER";
export const INCREASE_INTERSECT_COUNTER = "GPT:INCREASE_INTERSECT_COUNTER";
export const RUNNING_PROCESS = "GPT:RUNNING_PROCESS";
export const RESET = "GPT:RESET";
export const RUN_PROCESS = "GPT:RUN_PROCESS";
Expand Down Expand Up @@ -115,20 +113,6 @@ export const initPlugin = (cfg) => ({
type: INIT_PLUGIN,
cfg
});
/**
* action for triggering the increase of the number of buffered layers
* @memberof actions.geoProcessing
*/
export const increaseBufferedCounter = () => ({
type: INCREASE_BUFFERED_COUNTER
});
/**
* action for triggering the increase of the number of intersected layers
* @memberof actions.geoProcessing
*/
export const increaseIntersectedCounter = () => ({
type: INCREASE_INTERSECT_COUNTER
});
/**
* action that clears current status
* @memberof actions.geoProcessing
Expand Down
Loading

0 comments on commit 468775b

Please sign in to comment.