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
2 people authored and cbourget committed Mar 21, 2023
1 parent 9f787f8 commit a5aae49
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 a5aae49

Please sign in to comment.