From ab67bcbb6169bd95cc78e127f36a2624ed766db6 Mon Sep 17 00:00:00 2001 From: Suren Date: Mon, 11 Sep 2023 18:18:08 +0530 Subject: [PATCH] Fix - WPS - Convert the ROI geometry to WKT to download spatial filter (#9342) --- web/client/epics/layerdownload.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/client/epics/layerdownload.js b/web/client/epics/layerdownload.js index a138262c7f..6f39a32f7c 100644 --- a/web/client/epics/layerdownload.js +++ b/web/client/epics/layerdownload.js @@ -7,6 +7,7 @@ */ import Rx from 'rxjs'; +import wk from 'wellknown'; import { get, find, findIndex, pick, toPairs, castArray } from 'lodash'; import { saveAs } from 'file-saver'; import { parseString } from 'xml2js'; @@ -332,8 +333,8 @@ export const startFeatureExportDownload = (action$, store) => ROI: cropToROI ? { type: 'TEXT', data: { - mimeType: 'application/json', - data: JSON.stringify(bboxToFeatureGeometry(mapBbox.bounds)) + mimeType: 'application/wkt', + data: wk.stringify(bboxToFeatureGeometry(mapBbox.bounds)) } } : undefined, roiCRS: cropToROI ? (mapBbox.crs || 'EPSG:4326') : undefined,