From f89a9825e88505f1bdcaa22abb1b2383a4fb6b38 Mon Sep 17 00:00:00 2001 From: kim Date: Fri, 2 Feb 2024 15:28:48 -0900 Subject: [PATCH 1/4] abstracts bounding box calculation, notifies user when bbox is used --- src/app/models/asf-api.model.ts | 1 + src/app/services/map/map.service.ts | 2 +- .../services/polygon-validation.service.ts | 75 +++++++++++++++++-- src/app/services/search-params.service.ts | 42 ++--------- 4 files changed, 80 insertions(+), 40 deletions(-) diff --git a/src/app/models/asf-api.model.ts b/src/app/models/asf-api.model.ts index 2961c2846..b5fb6f620 100644 --- a/src/app/models/asf-api.model.ts +++ b/src/app/models/asf-api.model.ts @@ -39,6 +39,7 @@ export enum PolygonRepairTypes { CLOSE = 'CLOSE', REVERSE = 'REVERSE', WRAP = 'WRAP', + BBOX = 'BBOX' } export enum PolygonErrorTypes { diff --git a/src/app/services/map/map.service.ts b/src/app/services/map/map.service.ts index 48a5c8b7d..aef662065 100644 --- a/src/app/services/map/map.service.ts +++ b/src/app/services/map/map.service.ts @@ -55,7 +55,7 @@ export class MapService { tap(isDrawing => this.map.getViewport().style.cursor = isDrawing ? 'crosshair' : 'default') ); - private mapView: views.MapView; + private mapView: views.MapView = views.equatorial(); private map: Map; private scaleLine: ScaleLine; diff --git a/src/app/services/polygon-validation.service.ts b/src/app/services/polygon-validation.service.ts index e4dcd677e..2985a5b48 100644 --- a/src/app/services/polygon-validation.service.ts +++ b/src/app/services/polygon-validation.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { of } from 'rxjs'; -import { filter, map, switchMap, catchError } from 'rxjs/operators'; +import { filter, map, switchMap, catchError, withLatestFrom } from 'rxjs/operators'; import { MapService } from './map/map.service'; import { AsfApiService } from './asf-api.service'; @@ -9,6 +9,9 @@ import { WktService } from './wkt.service'; import * as models from '@models'; import { NotificationService } from './notification.service'; +import { Feature } from 'ol'; +import { Geometry, Polygon } from 'ol/geom'; +import { DrawService } from './map/draw.service'; @Injectable({ providedIn: 'root' @@ -22,6 +25,7 @@ export class PolygonValidationService { private asfApiService: AsfApiService, private wktService: WktService, private notificationService: NotificationService, + private drawService: DrawService, ) { } public validate(): void { @@ -33,9 +37,19 @@ export class PolygonValidationService { return skip; }), filter(p => !!p || this.polygons.has(p)), - switchMap(polygon => this.asfApiService.validate(polygon).pipe( - catchError(_ => of(null)) - )), + // filter(([_, polygon]) => ), + map(([wkt, _]) => wkt), + withLatestFrom(this.drawService.polygon$), + switchMap(([wkt, polygon]) => { + const bbox = this.getRectangleBbox(polygon, this.mapService.epsg()) + if (bbox.length > 0) { + return of({ wkt: { unwrapped: wkt }, repairs: [{ type: models.PolygonRepairTypes.BBOX, report: "The provided rectangle's bounding box will be used instead of the wkt" }] }) + } + return this.asfApiService.validate(wkt).pipe( + catchError(_ => of(null)) + ); + + }), filter(resp => !!resp), map(resp => { const error = this.getErrorFrom(resp); @@ -83,7 +97,7 @@ export class PolygonValidationService { return resp.wkt.unwrapped; } - const { report, type } = resp.repairs.pop(); + const { report, type } = resp.repairs.pop(); if (type !== models.PolygonRepairTypes.WRAP && type !== models.PolygonRepairTypes.REVERSE) { this.notificationService.info( @@ -100,4 +114,55 @@ export class PolygonValidationService { this.mapService.setDrawFeature(features); } + + public isRectangle(feature: Feature): boolean { + const geom = feature?.getGeometry() + if (geom instanceof Polygon) { + let points = (geom as Polygon).getCoordinates() ?? [] + const extent = (geom as Polygon).getExtent() + for (const point of points[0][0]) { + if (!extent.includes(point)) { + return false; + } + } + return !!points && points[0].length === 5 + } + return false; + } + + public getRectangleBbox(feature: Feature, epsg: string): number[] { + // Attempts to get the bounding box of a rectangular polygon + if (this.isRectangle(feature)) { + const clonedFeature = this.cloneFeature(feature.clone()); + const rectangle = clonedFeature.getGeometry() as Polygon; + return this.getBbox(rectangle, epsg); + } + return []; + } + + private cloneFeature(feature: Feature): Feature { + const clonedFeature = feature.clone(); + const clonedProperties = JSON.parse(JSON.stringify(feature.getProperties())); + clonedProperties.geometry = clonedFeature.getGeometry(); + clonedFeature.setProperties(clonedProperties, true); + return clonedFeature; + } + + private getBbox(rectangle: Polygon, epsg: string) { + rectangle.transform(epsg, 'EPSG:4326'); + const outerHull = rectangle.getLinearRing(0).getCoordinates().slice(0, 4); + return this.wrapBbox([...outerHull[0], ...outerHull[2]]); + } + + private wrapBbox(bbox: number[]): number[] { + return bbox.map(value => { + if (value > 180) { + value = value % 360 - 360; + } + if (value < -180) { + value = value % 360 + 360; + } + return value; + }); + } } diff --git a/src/app/services/search-params.service.ts b/src/app/services/search-params.service.ts index 2e14aa069..4e2462cdb 100644 --- a/src/app/services/search-params.service.ts +++ b/src/app/services/search-params.service.ts @@ -17,7 +17,7 @@ import { RangeService } from './range.service'; import * as models from '@models'; import { DrawService } from './map/draw.service'; -import { Polygon } from 'ol/geom'; +import { PolygonValidationService } from './polygon-validation.service'; @Injectable({ providedIn: 'root' }) @@ -26,7 +26,8 @@ export class SearchParamsService { private store$: Store, private mapService: MapService, private rangeService: RangeService, - private drawService: DrawService + private drawService: DrawService, + private polygonValidationService: PolygonValidationService ) { } @@ -63,7 +64,7 @@ export class SearchParamsService { withLatestFrom(this.store$.select(filterStore.getSelectedDatasetId)), map(([useCalibrationData, dataset]) => dataset === models.opera_s1.id && useCalibrationData ? - ({dataset: models.opera_s1.calibrationDatasets}) : ({})) + ({ dataset: models.opera_s1.calibrationDatasets }) : ({})) ) private groupID$ = this.store$.select(filterStore.getGroupID).pipe( @@ -79,38 +80,11 @@ export class SearchParamsService { ).pipe( map(([polygon, shouldOmitGeoRegion, asdf]) => shouldOmitGeoRegion ? null : { polygon: polygon, thing: asdf }), map(polygon => { - let feature = polygon.thing; - - - const geom = feature?.getGeometry() - if (geom instanceof Polygon) { - let points = (geom as Polygon).getCoordinates() - if (points && points[0].length === 5) { - const clonedFeature = feature.clone(); - const clonedProperties = JSON.parse(JSON.stringify(feature.getProperties())); - clonedProperties.geometry = clonedFeature.getGeometry(); - clonedFeature.setProperties(clonedProperties, true); - feature = clonedFeature; - const rectangle = feature.getGeometry() as Polygon; - rectangle.transform(this.mapService.epsg(), 'EPSG:4326'); - const outerHull = rectangle.getCoordinates()[0].slice(0, 4); - let extent = [...outerHull[0], ...outerHull[2]]; - if (JSON.stringify(rectangle.getExtent()) === JSON.stringify(extent)) { - extent = extent.map(value => { - if (value > 180) { - value = value % 360 - 360; - } - if (value < -180) { - value = value % 360 + 360; - } - return value; - }); - return { bbox: extent.join(',') }; - } + const bbox = this.polygonValidationService.getRectangleBbox(feature, this.mapService.epsg()); + if (bbox.length > 0) { + return { bbox: bbox.join(',') }; } - } - return { intersectsWith: polygon.polygon }; }) @@ -288,7 +262,7 @@ export class SearchParamsService { ); public getOnDemandSearchParams = combineLatest([ - this.store$.select(hyp3Store.getOnDemandUserId) + this.store$.select(hyp3Store.getOnDemandUserId) ]).pipe( map(([userID]) => { return { From 070e64ef38478771f8c2b7e5a453aa0cb784aa01 Mon Sep 17 00:00:00 2001 From: kim Date: Fri, 16 Feb 2024 11:16:54 -0900 Subject: [PATCH 2/4] wip client-side bbox substitution --- src/app/models/index.ts | 1 + src/app/models/wkt-repair-response.model.ts | 7 +++ src/app/services/map/map.service.ts | 13 ++++- .../services/polygon-validation.service.ts | 51 ++++++++++++------- src/app/services/search-params.service.ts | 20 +++++--- src/app/services/url-state.service.ts | 5 ++ 6 files changed, 69 insertions(+), 28 deletions(-) create mode 100644 src/app/models/wkt-repair-response.model.ts diff --git a/src/app/models/index.ts b/src/app/models/index.ts index 5dbf6da79..c0bedc627 100644 --- a/src/app/models/index.ts +++ b/src/app/models/index.ts @@ -28,3 +28,4 @@ export * from './download.model'; export * from './event-product-sort.model'; export * from './asf-website.model'; export * from './mapbox.model'; +export * from './wkt-repair-response.model'; \ No newline at end of file diff --git a/src/app/models/wkt-repair-response.model.ts b/src/app/models/wkt-repair-response.model.ts new file mode 100644 index 000000000..777ca9370 --- /dev/null +++ b/src/app/models/wkt-repair-response.model.ts @@ -0,0 +1,7 @@ +export interface WKTRepairResponse { + wkt: { + unwrapped: string; + wrapped: string; + } + repairs: { report: string, type: string }[]; +} \ No newline at end of file diff --git a/src/app/services/map/map.service.ts b/src/app/services/map/map.service.ts index aef662065..cef998141 100644 --- a/src/app/services/map/map.service.ts +++ b/src/app/services/map/map.service.ts @@ -55,7 +55,7 @@ export class MapService { tap(isDrawing => this.map.getViewport().style.cursor = isDrawing ? 'crosshair' : 'default') ); - private mapView: views.MapView = views.equatorial(); + public mapView: views.MapView = views.equatorial(); private map: Map; private scaleLine: ScaleLine; @@ -338,6 +338,17 @@ export class MapService { this.setMap(view, overlay); } + public getMapView(): models.MapViewType { + switch(this.mapView) { + case views.antarctic(): + return models.MapViewType.ANTARCTIC; + case views.arctic(): + return models.MapViewType.ARCTIC; + default: + return models.MapViewType.EQUATORIAL; + } + } + public clearSelectedScene(): void { this.selectedSource.clear(); this.selectClick.getFeatures().clear(); diff --git a/src/app/services/polygon-validation.service.ts b/src/app/services/polygon-validation.service.ts index 2985a5b48..a237acb4a 100644 --- a/src/app/services/polygon-validation.service.ts +++ b/src/app/services/polygon-validation.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; -import { of } from 'rxjs'; -import { filter, map, switchMap, catchError, withLatestFrom } from 'rxjs/operators'; +import { BehaviorSubject, of } from 'rxjs'; +import { filter, map, switchMap, catchError, tap } from 'rxjs/operators'; import { MapService } from './map/map.service'; import { AsfApiService } from './asf-api.service'; @@ -11,8 +11,6 @@ import * as models from '@models'; import { NotificationService } from './notification.service'; import { Feature } from 'ol'; import { Geometry, Polygon } from 'ol/geom'; -import { DrawService } from './map/draw.service'; - @Injectable({ providedIn: 'root' }) @@ -25,11 +23,17 @@ export class PolygonValidationService { private asfApiService: AsfApiService, private wktService: WktService, private notificationService: NotificationService, - private drawService: DrawService, ) { } + public BBOX$: BehaviorSubject = new BehaviorSubject(null) + public validate(): void { this.mapService.searchPolygon$.pipe( + tap(wkt => { + if(wkt == null) { + this.BBOX$.next(null); + } + }), filter(_ => { const skip = !this.isUpdatedFromRepair; this.isUpdatedFromRepair = false; @@ -38,13 +42,7 @@ export class PolygonValidationService { }), filter(p => !!p || this.polygons.has(p)), // filter(([_, polygon]) => ), - map(([wkt, _]) => wkt), - withLatestFrom(this.drawService.polygon$), - switchMap(([wkt, polygon]) => { - const bbox = this.getRectangleBbox(polygon, this.mapService.epsg()) - if (bbox.length > 0) { - return of({ wkt: { unwrapped: wkt }, repairs: [{ type: models.PolygonRepairTypes.BBOX, report: "The provided rectangle's bounding box will be used instead of the wkt" }] }) - } + switchMap(wkt => { return this.asfApiService.validate(wkt).pipe( catchError(_ => of(null)) ); @@ -57,6 +55,7 @@ export class PolygonValidationService { if (error) { this.displayDrawError(error); } else { + this.updateBBox(resp); this.setValidPolygon(resp); } }), @@ -84,7 +83,7 @@ export class PolygonValidationService { ); } - private setValidPolygon(resp) { + private setValidPolygon(resp: models.WKTRepairResponse) { this.polygons.add(resp.wkt.unwrapped); this.mapService.setDrawStyle(models.DrawPolygonStyle.VALID); @@ -155,14 +154,28 @@ export class PolygonValidationService { } private wrapBbox(bbox: number[]): number[] { + // bounds = [(x + 180) % 360 - 180 return bbox.map(value => { - if (value > 180) { - value = value % 360 - 360; - } - if (value < -180) { - value = value % 360 + 360; + if (Math.abs(value) > 180) { + value = (value + 180) % 360 - 180 } return value; - }); + } + ); + } + + public updateBBox(repairResponse: models.WKTRepairResponse): void { + if (!this.isRectangle(this.wktService.wktToFeature(repairResponse.wkt.wrapped, this.mapService.epsg()))) { + this.BBOX$.next(null); + } + // if (this.mapService.mapView.view == views.equatorial().view) { + const unwrapped = this.wktService.wktToFeature(repairResponse.wkt.unwrapped, this.mapService.epsg()) + this.BBOX$.next(this.getBbox(unwrapped.getGeometry() as Polygon, this.mapService.epsg())); + // } else { + // this.BBOX$.next(null); + // // const wrapped = this.wktService.wktToFeature(repairResponse.wkt.wrapped, this.mapService.epsg()) + // // this.BBOX$.next(this.getBbox(wrapped.getGeometry() as Polygon, this.mapService.epsg())); + // } + } } diff --git a/src/app/services/search-params.service.ts b/src/app/services/search-params.service.ts index 4e2462cdb..734b6b2dd 100644 --- a/src/app/services/search-params.service.ts +++ b/src/app/services/search-params.service.ts @@ -76,17 +76,21 @@ export class SearchParamsService { private searchPolygon$ = combineLatest([ this.mapService.searchPolygon$.pipe(startWith(null)), this.store$.select(filterStore.getShouldOmitSearchPolygon), - this.drawService.polygon$] + this.drawService.polygon$, + this.polygonValidationService.BBOX$ + ] ).pipe( - map(([polygon, shouldOmitGeoRegion, asdf]) => shouldOmitGeoRegion ? null : { polygon: polygon, thing: asdf }), - map(polygon => { - let feature = polygon.thing; - const bbox = this.polygonValidationService.getRectangleBbox(feature, this.mapService.epsg()); - if (bbox.length > 0) { - return { bbox: bbox.join(',') }; + map(([polygon, shouldOmitGeoRegion, _, bbox]) => shouldOmitGeoRegion ? null : { wkt: polygon, bbox }), + map(aoi => { + if (!!aoi.bbox) { + if (this.mapService.getMapView() == models.MapViewType.EQUATORIAL) { + return { bbox: aoi.bbox.join(',') }; + } else { + this.polygonValidationService.BBOX$.next(null); + } } - return { intersectsWith: polygon.polygon }; + return { intersectsWith: aoi.wkt }; }) ); diff --git a/src/app/services/url-state.service.ts b/src/app/services/url-state.service.ts index 3cdffcf0e..b3b160842 100644 --- a/src/app/services/url-state.service.ts +++ b/src/app/services/url-state.service.ts @@ -21,6 +21,7 @@ import { WktService } from './wkt.service'; import { RangeService } from './range.service'; import { PropertyService } from './property.service'; import { ThemingService } from './theming.service'; +import { PolygonValidationService } from './polygon-validation.service'; @Injectable({ @@ -55,6 +56,7 @@ export class UrlStateService { private router: Router, private prop: PropertyService, private themeService: ThemingService, + private polygonValidationService: PolygonValidationService ) { const params = [ ...this.datasetParam(), @@ -586,6 +588,9 @@ export class UrlStateService { this.mapService.epsg() ); + this.polygonValidationService.updateBBox({wkt: {unwrapped: polygon, wrapped: polygon}, repairs: []}) + + this.mapService.setDrawFeature(features); return; From 0016dfeff598031c0e3091aa84a504d242893cc8 Mon Sep 17 00:00:00 2001 From: kim Date: Fri, 16 Feb 2024 11:20:45 -0900 Subject: [PATCH 3/4] completely removes client-side bounding box substitution from Vertex, leaves to SearchAPI --- .../services/polygon-validation.service.ts | 79 +------------------ src/app/services/search-params.service.ts | 16 +--- src/app/services/url-state.service.ts | 3 - 3 files changed, 4 insertions(+), 94 deletions(-) diff --git a/src/app/services/polygon-validation.service.ts b/src/app/services/polygon-validation.service.ts index a237acb4a..7bc6896c0 100644 --- a/src/app/services/polygon-validation.service.ts +++ b/src/app/services/polygon-validation.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; -import { BehaviorSubject, of } from 'rxjs'; -import { filter, map, switchMap, catchError, tap } from 'rxjs/operators'; +import { of } from 'rxjs'; +import { filter, map, switchMap, catchError } from 'rxjs/operators'; import { MapService } from './map/map.service'; import { AsfApiService } from './asf-api.service'; @@ -9,8 +9,6 @@ import { WktService } from './wkt.service'; import * as models from '@models'; import { NotificationService } from './notification.service'; -import { Feature } from 'ol'; -import { Geometry, Polygon } from 'ol/geom'; @Injectable({ providedIn: 'root' }) @@ -25,15 +23,8 @@ export class PolygonValidationService { private notificationService: NotificationService, ) { } - public BBOX$: BehaviorSubject = new BehaviorSubject(null) - public validate(): void { this.mapService.searchPolygon$.pipe( - tap(wkt => { - if(wkt == null) { - this.BBOX$.next(null); - } - }), filter(_ => { const skip = !this.isUpdatedFromRepair; this.isUpdatedFromRepair = false; @@ -55,7 +46,6 @@ export class PolygonValidationService { if (error) { this.displayDrawError(error); } else { - this.updateBBox(resp); this.setValidPolygon(resp); } }), @@ -113,69 +103,4 @@ export class PolygonValidationService { this.mapService.setDrawFeature(features); } - - public isRectangle(feature: Feature): boolean { - const geom = feature?.getGeometry() - if (geom instanceof Polygon) { - let points = (geom as Polygon).getCoordinates() ?? [] - const extent = (geom as Polygon).getExtent() - for (const point of points[0][0]) { - if (!extent.includes(point)) { - return false; - } - } - return !!points && points[0].length === 5 - } - return false; - } - - public getRectangleBbox(feature: Feature, epsg: string): number[] { - // Attempts to get the bounding box of a rectangular polygon - if (this.isRectangle(feature)) { - const clonedFeature = this.cloneFeature(feature.clone()); - const rectangle = clonedFeature.getGeometry() as Polygon; - return this.getBbox(rectangle, epsg); - } - return []; - } - - private cloneFeature(feature: Feature): Feature { - const clonedFeature = feature.clone(); - const clonedProperties = JSON.parse(JSON.stringify(feature.getProperties())); - clonedProperties.geometry = clonedFeature.getGeometry(); - clonedFeature.setProperties(clonedProperties, true); - return clonedFeature; - } - - private getBbox(rectangle: Polygon, epsg: string) { - rectangle.transform(epsg, 'EPSG:4326'); - const outerHull = rectangle.getLinearRing(0).getCoordinates().slice(0, 4); - return this.wrapBbox([...outerHull[0], ...outerHull[2]]); - } - - private wrapBbox(bbox: number[]): number[] { - // bounds = [(x + 180) % 360 - 180 - return bbox.map(value => { - if (Math.abs(value) > 180) { - value = (value + 180) % 360 - 180 - } - return value; - } - ); - } - - public updateBBox(repairResponse: models.WKTRepairResponse): void { - if (!this.isRectangle(this.wktService.wktToFeature(repairResponse.wkt.wrapped, this.mapService.epsg()))) { - this.BBOX$.next(null); - } - // if (this.mapService.mapView.view == views.equatorial().view) { - const unwrapped = this.wktService.wktToFeature(repairResponse.wkt.unwrapped, this.mapService.epsg()) - this.BBOX$.next(this.getBbox(unwrapped.getGeometry() as Polygon, this.mapService.epsg())); - // } else { - // this.BBOX$.next(null); - // // const wrapped = this.wktService.wktToFeature(repairResponse.wkt.wrapped, this.mapService.epsg()) - // // this.BBOX$.next(this.getBbox(wrapped.getGeometry() as Polygon, this.mapService.epsg())); - // } - - } } diff --git a/src/app/services/search-params.service.ts b/src/app/services/search-params.service.ts index 734b6b2dd..0b48e17fd 100644 --- a/src/app/services/search-params.service.ts +++ b/src/app/services/search-params.service.ts @@ -76,22 +76,10 @@ export class SearchParamsService { private searchPolygon$ = combineLatest([ this.mapService.searchPolygon$.pipe(startWith(null)), this.store$.select(filterStore.getShouldOmitSearchPolygon), - this.drawService.polygon$, - this.polygonValidationService.BBOX$ ] ).pipe( - map(([polygon, shouldOmitGeoRegion, _, bbox]) => shouldOmitGeoRegion ? null : { wkt: polygon, bbox }), - map(aoi => { - if (!!aoi.bbox) { - if (this.mapService.getMapView() == models.MapViewType.EQUATORIAL) { - return { bbox: aoi.bbox.join(',') }; - } else { - this.polygonValidationService.BBOX$.next(null); - } - } - - return { intersectsWith: aoi.wkt }; - }) + map(([polygon, shouldOmitGeoRegion]) => shouldOmitGeoRegion ? null : { wkt: polygon }), + map(aoi => ({intersectsWith: aoi.wkt })) ); private selectedDataset$ = combineLatest([ diff --git a/src/app/services/url-state.service.ts b/src/app/services/url-state.service.ts index b3b160842..68db0896d 100644 --- a/src/app/services/url-state.service.ts +++ b/src/app/services/url-state.service.ts @@ -588,9 +588,6 @@ export class UrlStateService { this.mapService.epsg() ); - this.polygonValidationService.updateBBox({wkt: {unwrapped: polygon, wrapped: polygon}, repairs: []}) - - this.mapService.setDrawFeature(features); return; From 618d878b6265410883f5ab194ece2eddc30d19d8 Mon Sep 17 00:00:00 2001 From: kim Date: Fri, 16 Feb 2024 11:58:20 -0900 Subject: [PATCH 4/4] removes unused imports from services, removes BBOX polygon repair type --- src/app/models/asf-api.model.ts | 1 - src/app/services/search-params.service.ts | 4 ---- src/app/services/url-state.service.ts | 4 +--- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/app/models/asf-api.model.ts b/src/app/models/asf-api.model.ts index b5fb6f620..2961c2846 100644 --- a/src/app/models/asf-api.model.ts +++ b/src/app/models/asf-api.model.ts @@ -39,7 +39,6 @@ export enum PolygonRepairTypes { CLOSE = 'CLOSE', REVERSE = 'REVERSE', WRAP = 'WRAP', - BBOX = 'BBOX' } export enum PolygonErrorTypes { diff --git a/src/app/services/search-params.service.ts b/src/app/services/search-params.service.ts index 0b48e17fd..0edb6a203 100644 --- a/src/app/services/search-params.service.ts +++ b/src/app/services/search-params.service.ts @@ -16,8 +16,6 @@ import { MapService } from './map/map.service'; import { RangeService } from './range.service'; import * as models from '@models'; -import { DrawService } from './map/draw.service'; -import { PolygonValidationService } from './polygon-validation.service'; @Injectable({ providedIn: 'root' }) @@ -26,8 +24,6 @@ export class SearchParamsService { private store$: Store, private mapService: MapService, private rangeService: RangeService, - private drawService: DrawService, - private polygonValidationService: PolygonValidationService ) { } diff --git a/src/app/services/url-state.service.ts b/src/app/services/url-state.service.ts index 68db0896d..ef1ea132a 100644 --- a/src/app/services/url-state.service.ts +++ b/src/app/services/url-state.service.ts @@ -21,7 +21,6 @@ import { WktService } from './wkt.service'; import { RangeService } from './range.service'; import { PropertyService } from './property.service'; import { ThemingService } from './theming.service'; -import { PolygonValidationService } from './polygon-validation.service'; @Injectable({ @@ -55,8 +54,7 @@ export class UrlStateService { private rangeService: RangeService, private router: Router, private prop: PropertyService, - private themeService: ThemingService, - private polygonValidationService: PolygonValidationService + private themeService: ThemingService ) { const params = [ ...this.datasetParam(),