From 99a1c3c7d2b31e959df6ac05e05d7e0d8bb2329d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-=C3=89tienne=20Lord?= <7397743+pelord@users.noreply.github.com> Date: Fri, 21 Oct 2022 11:15:56 -0400 Subject: [PATCH] fix(*): delete geometry column from search result or query (#1108) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(*): delete geometry column from search result or query * i18n(fr): typo Co-authored-by: Pierre-Étienne Lord --- packages/geo/src/lib/query/shared/query.service.ts | 3 +++ packages/geo/src/lib/search/shared/search.utils.ts | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/packages/geo/src/lib/query/shared/query.service.ts b/packages/geo/src/lib/query/shared/query.service.ts index 078716d267..3884f26287 100644 --- a/packages/geo/src/lib/query/shared/query.service.ts +++ b/packages/geo/src/lib/query/shared/query.service.ts @@ -568,6 +568,9 @@ export class QueryService { delete properties.boundedBy; delete properties.shape; delete properties.SHAPE; + delete properties.SHAPE_S; + delete properties.SHAPE_L; + delete properties.SHAPE_P; delete properties.the_geom; delete properties.geom; diff --git a/packages/geo/src/lib/search/shared/search.utils.ts b/packages/geo/src/lib/search/shared/search.utils.ts index ef64cded32..0d99ceda47 100644 --- a/packages/geo/src/lib/search/shared/search.utils.ts +++ b/packages/geo/src/lib/search/shared/search.utils.ts @@ -41,6 +41,18 @@ export function featureToSearchResult( feature: Feature, source: SearchSource ): SearchResult { + if (feature.properties) { + delete feature.properties.geometry; + delete feature.properties.GEOMETRIE; + delete feature.properties.boundedBy; + delete feature.properties.shape; + delete feature.properties.SHAPE; + delete feature.properties.SHAPE_S; + delete feature.properties.SHAPE_L; + delete feature.properties.SHAPE_P; + delete feature.properties.the_geom; + delete feature.properties.geom; + } feature.sourceId = source.getId(); return { source,