Skip to content

Commit

Permalink
fix(*): delete geometry column from search result or query (#1108)
Browse files Browse the repository at this point in the history
* fix(*): delete geometry column from search result or query

* i18n(fr): typo

Co-authored-by: Pierre-Étienne Lord <[email protected]>
  • Loading branch information
pelord and Pierre-Étienne Lord authored Oct 21, 2022
1 parent 42f8a85 commit 99a1c3c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/geo/src/lib/query/shared/query.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
12 changes: 12 additions & 0 deletions packages/geo/src/lib/search/shared/search.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ export function featureToSearchResult(
feature: Feature,
source: SearchSource
): SearchResult<Feature> {
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,
Expand Down

0 comments on commit 99a1c3c

Please sign in to comment.