From bdc7ff8f98c83d802950e644a2e3aecebcb48826 Mon Sep 17 00:00:00 2001 From: Philippe Lafreniere Date: Tue, 3 Nov 2020 15:59:46 -0500 Subject: [PATCH 1/7] WIP --- .../spatial-filter-item.component.html | 10 ++--- .../spatial-filter-item.component.ts | 45 ++++++++++++++++--- .../spatial-filter-list.component.ts | 22 ++++++--- .../spatial-filter-tool.component.html | 4 ++ .../spatial-filter-tool.component.ts | 2 + 5 files changed, 66 insertions(+), 17 deletions(-) diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html index fb17da457d..cdbea2823a 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html @@ -132,13 +132,13 @@
- + diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.ts b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.ts index d244b16aaa..1e55ee2163 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.ts +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.ts @@ -144,6 +144,15 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { } private _thematicLength: number; + @Input() + get active(): boolean { + return this._active; + } + set active(value: boolean) { + this._active = value; + } + private _active = false; + @Output() toggleSearch = new EventEmitter(); @Output() itemTypeChange = new EventEmitter(); @@ -166,6 +175,7 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { @Output() export = new EventEmitter(); @Output() openWorkspace = new EventEmitter(); + @Output() activeEvent = new EventEmitter(); public itemType: SpatialFilterItemType[] = [SpatialFilterItemType.Address, SpatialFilterItemType.Thematics]; public selectedItemType: SpatialFilterItemType = SpatialFilterItemType.Address; @@ -268,9 +278,13 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { if (value) { this.value$.next(value); this.drawZone = this.formControl.value as Feature; + this.active = true; + this.activeEvent.emit(true); } else { this.value$.next(undefined); this.drawZone = undefined; + this.active = false; + this.activeEvent.emit(false); } }); @@ -290,24 +304,24 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { distinctUntilChanged() ) .subscribe((value) => { - if (this.measureUnit === MeasureLengthUnit.Meters && value > 0 && value < 100000) { + if (this.measureUnit === MeasureLengthUnit.Meters && value > 0 && value <= 100000) { this.buffer = value; this.bufferEvent.emit(value); this.zoneWithBuffer = buffer(turf.polygon(this.drawZone.coordinates), this.bufferFormControl.value / 1000, {units: 'kilometers'}); this.zoneWithBufferChange.emit(this.zoneWithBuffer); - } else if (this.measureUnit === MeasureLengthUnit.Kilometers && value > 0 && value < 100) { + } else if (this.measureUnit === MeasureLengthUnit.Kilometers && value > 0 && value <= 100) { this.buffer = value; this.bufferEvent.emit(value); this.zoneWithBuffer = buffer(turf.polygon(this.drawZone.coordinates), this.bufferFormControl.value, {units: 'kilometers'}); this.zoneWithBufferChange.emit(this.zoneWithBuffer); - } else if (value === 0 && value === this.bufferFormControl.value) { + } else if (value === 0 && value === this.bufferFormControl.value && this.active) { this.buffer = value; this.bufferEvent.emit(value); this.drawZoneEvent.emit(this.drawZone); } else if ( value < 0 || - (this.measureUnit === MeasureLengthUnit.Meters && value >= 100000) || - (this.measureUnit === MeasureLengthUnit.Kilometers && value >= 100)) { + (this.measureUnit === MeasureLengthUnit.Meters && value > 100000) || + (this.measureUnit === MeasureLengthUnit.Kilometers && value > 100)) { this.bufferFormControl.setValue(0); this.messageService.alert(this.languageService.translate.instant('igo.geo.spatialFilter.bufferAlert'), this.languageService.translate.instant('igo.geo.spatialFilter.warning')); @@ -559,16 +573,29 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { */ clearButton() { this.loading = true; - this.loading = false; if (this.store) { this.store.clear(); } if (this.isPoint() || this.isPolygon()) { this.drawZone = undefined; - this.bufferFormControl.setValue(0); this.formControl.reset(); } + this.active = false; + this.activeEvent.emit(false); + this.bufferFormControl.setValue(0); + this.buffer = 0; + this.bufferEvent.emit(0); this.clearButtonEvent.emit(); + this.loading = false; + } + + clearDrawZone() { + this.formControl.reset(); + this.active = false; + this.activeEvent.emit(false); + this.bufferFormControl.setValue(0); + this.buffer = 0; + this.bufferEvent.emit(0); } /** @@ -576,7 +603,11 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { */ clearSearch() { this.selectedThematics.clear(); + this.active = false; + this.activeEvent.emit(false); this.bufferFormControl.setValue(0); + this.buffer = 0; + this.bufferEvent.emit(0); this.thematicChange.emit([]); this.clearSearchEvent.emit(); } diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts index c2e78baa28..fedd494576 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts @@ -58,6 +58,15 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { } private _zone; + @Input() + get active(): boolean { + return this._active; + } + set active(value: boolean) { + this._active = value; + } + private _active = false; + public zoneWithBuffer; public selectedZone; @@ -79,6 +88,7 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { @Output() zoneWithBufferChange = new EventEmitter(); @Output() bufferChange = new EventEmitter(); @Output() measureUnitChange = new EventEmitter(); + @Output() activeEvent = new EventEmitter(); formValueChanges$$: Subscription; bufferValueChanges$$: Subscription; @@ -105,21 +115,21 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { distinctUntilChanged() ) .subscribe((value) => { - if (this.measureUnit === MeasureLengthUnit.Meters && value > 0 && value < 100000) { + if (this.measureUnit === MeasureLengthUnit.Meters && value > 0 && value <= 100000) { this.bufferChange.emit(value); this.zoneWithBuffer = buffer(this.selectedZone, this.bufferFormControl.value / 1000, {units: 'kilometers'}); this.zoneWithBufferChange.emit(this.zoneWithBuffer); - } else if (this.measureUnit === MeasureLengthUnit.Kilometers && value > 0 && value < 100) { + } else if (this.measureUnit === MeasureLengthUnit.Kilometers && value > 0 && value <= 100) { this.bufferChange.emit(value); this.zoneWithBuffer = buffer(this.selectedZone, this.bufferFormControl.value, {units: 'kilometers'}); this.zoneWithBufferChange.emit(this.zoneWithBuffer); - } else if (value === 0) { + } else if (value === 0 && this.active) { this.bufferChange.emit(value); this.zoneWithBufferChange.emit(this.selectedZone); } else if ( value < 0 || - (this.measureUnit === MeasureLengthUnit.Meters && value >= 100000) || - (this.measureUnit === MeasureLengthUnit.Kilometers && value >= 100)) { + (this.measureUnit === MeasureLengthUnit.Meters && value > 100000) || + (this.measureUnit === MeasureLengthUnit.Kilometers && value > 100)) { this.bufferFormControl.setValue(0); this.messageService.alert(this.languageService.translate.instant('igo.geo.spatialFilter.bufferAlert'), this.languageService.translate.instant('igo.geo.spatialFilter.warning')); @@ -136,6 +146,8 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { } onZoneChange(feature) { + this.active = true; + this.activeEvent.emit(true) this.bufferFormControl.setValue(0); if (feature && this.queryType) { this.spatialFilterService.loadItemById(feature, this.queryType) diff --git a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.html b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.html index 440f1fff7c..a42a28028e 100644 --- a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.html +++ b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.html @@ -3,10 +3,12 @@ [store]="spatialListStore" [selectedQueryType]="queryType" [zone]="zone" + [active]="active" (eventType)="getOutputType($event)" (eventQueryType)="getOutputQueryType($event)" (zoneChange)="onZoneChange($event)" (zoneWithBufferChange)="onZoneChange($event, true)" + (activeEvent)="active = $event" (bufferChange)="buffer = $event" (measureUnitChange)="measureUnit = $event"> @@ -16,6 +18,7 @@ [queryType]="queryType" [map]="map" [zone]="zone" + [active]="active" [loading]="loading" [store]="store" [layers]="activeLayers" @@ -25,6 +28,7 @@ (measureUnitChange)="measureUnit = $event" (freehandControl)="freehandDrawIsActive = $event" (drawZoneEvent)="zone = $event" + (activeEvent)="active = $event" (zoneWithBufferChange)="onZoneChange($event, true)" (itemTypeChange)="itemType = $event" (thematicChange)="thematics = $event" diff --git a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts index 928f32e71a..5b38893cc6 100644 --- a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts +++ b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts @@ -63,6 +63,8 @@ export class SpatialFilterToolComponent implements OnDestroy { public layers: Layer[] = []; public activeLayers: Layer[] = []; + public active = false; + public queryType: SpatialFilterQueryType; public thematics: SpatialFilterThematic[]; public zone: Feature; From 489e732a0db8b48ed74dda0164db1f7dcd851976 Mon Sep 17 00:00:00 2001 From: Philippe Lafreniere Date: Wed, 4 Nov 2020 08:02:29 -0500 Subject: [PATCH 2/7] lint --- .../spatial-filter-list/spatial-filter-list.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts index fedd494576..a0bc65ded9 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts @@ -147,7 +147,7 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { onZoneChange(feature) { this.active = true; - this.activeEvent.emit(true) + this.activeEvent.emit(true); this.bufferFormControl.setValue(0); if (feature && this.queryType) { this.spatialFilterService.loadItemById(feature, this.queryType) From a350aee57e7994f2ece76a7d69b0148dfa9c40e9 Mon Sep 17 00:00:00 2001 From: Philippe Lafreniere Date: Wed, 4 Nov 2020 16:01:52 -0500 Subject: [PATCH 3/7] WIP --- .../spatial-filter-item.component.html | 4 +- .../spatial-filter-item.component.ts | 42 ++++++++----------- .../spatial-filter-list.component.html | 2 +- .../spatial-filter-list.component.ts | 15 ++----- .../spatial-filter-type.component.html | 1 + .../spatial-filter-type.component.ts | 3 ++ .../spatial-filter-tool.component.html | 5 +-- .../spatial-filter-tool.component.ts | 2 - 8 files changed, 28 insertions(+), 46 deletions(-) diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html index cdbea2823a..a8ea712c38 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html @@ -132,7 +132,7 @@
- @@ -147,7 +147,7 @@ {{'igo.geo.spatialFilter.goSearch' | translate}} - diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.ts b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.ts index 1e55ee2163..e5409455b1 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.ts +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.ts @@ -133,7 +133,7 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { return [MeasureLengthUnit.Meters, MeasureLengthUnit.Kilometers]; } - @Input() layers: Layer[]; + @Input() layers: Layer[] = []; @Input() get thematicLength(): number { @@ -144,15 +144,6 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { } private _thematicLength: number; - @Input() - get active(): boolean { - return this._active; - } - set active(value: boolean) { - this._active = value; - } - private _active = false; - @Output() toggleSearch = new EventEmitter(); @Output() itemTypeChange = new EventEmitter(); @@ -175,7 +166,6 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { @Output() export = new EventEmitter(); @Output() openWorkspace = new EventEmitter(); - @Output() activeEvent = new EventEmitter(); public itemType: SpatialFilterItemType[] = [SpatialFilterItemType.Address, SpatialFilterItemType.Thematics]; public selectedItemType: SpatialFilterItemType = SpatialFilterItemType.Address; @@ -278,13 +268,13 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { if (value) { this.value$.next(value); this.drawZone = this.formControl.value as Feature; - this.active = true; - this.activeEvent.emit(true); + if (this.buffer !== 0) { + this.drawZoneEvent.emit(this.drawZone); + this.bufferFormControl.setValue(this.buffer); + } } else { this.value$.next(undefined); this.drawZone = undefined; - this.active = false; - this.activeEvent.emit(false); } }); @@ -300,8 +290,7 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { this.bufferChanges$$ = this.bufferFormControl.valueChanges .pipe( - debounceTime(500), - distinctUntilChanged() + debounceTime(500) ) .subscribe((value) => { if (this.measureUnit === MeasureLengthUnit.Meters && value > 0 && value <= 100000) { @@ -314,7 +303,7 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { this.bufferEvent.emit(value); this.zoneWithBuffer = buffer(turf.polygon(this.drawZone.coordinates), this.bufferFormControl.value, {units: 'kilometers'}); this.zoneWithBufferChange.emit(this.zoneWithBuffer); - } else if (value === 0 && value === this.bufferFormControl.value && this.active) { + } else if (value === 0) { this.buffer = value; this.bufferEvent.emit(value); this.drawZoneEvent.emit(this.drawZone); @@ -323,6 +312,7 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { (this.measureUnit === MeasureLengthUnit.Meters && value > 100000) || (this.measureUnit === MeasureLengthUnit.Kilometers && value > 100)) { this.bufferFormControl.setValue(0); + this.buffer = 0; this.messageService.alert(this.languageService.translate.instant('igo.geo.spatialFilter.bufferAlert'), this.languageService.translate.instant('igo.geo.spatialFilter.warning')); } @@ -580,8 +570,6 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { this.drawZone = undefined; this.formControl.reset(); } - this.active = false; - this.activeEvent.emit(false); this.bufferFormControl.setValue(0); this.buffer = 0; this.bufferEvent.emit(0); @@ -591,11 +579,8 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { clearDrawZone() { this.formControl.reset(); - this.active = false; - this.activeEvent.emit(false); this.bufferFormControl.setValue(0); this.buffer = 0; - this.bufferEvent.emit(0); } /** @@ -603,8 +588,6 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { */ clearSearch() { this.selectedThematics.clear(); - this.active = false; - this.activeEvent.emit(false); this.bufferFormControl.setValue(0); this.buffer = 0; this.bufferEvent.emit(0); @@ -641,6 +624,15 @@ export class SpatialFilterItemComponent implements OnDestroy, OnInit { return true; } + disabledClearSearch() { + let disable = true; + this.selectedItemType === SpatialFilterItemType.Address ? + disable = this.queryType === undefined : + disable = this.queryType === undefined && this.selectedThematics.selected.length === 0; + + return disable; + } + /** * Manage radius value at user change */ diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.html b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.html index ffa0f97c4c..fcd6e76b6c 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.html +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.html @@ -15,7 +15,7 @@
+ [value]="0" [readonly]="!zone">
diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts index a0bc65ded9..4edc744e21 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts @@ -17,6 +17,7 @@ import { Feature } from '../../../feature'; import { MeasureLengthUnit } from '../../../measure/shared'; import { LanguageService, MessageService } from '@igo2/core'; import buffer from '@turf/buffer'; +import { Layer } from '../../../layer'; @Component({ selector: 'igo-spatial-filter-list', @@ -58,14 +59,7 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { } private _zone; - @Input() - get active(): boolean { - return this._active; - } - set active(value: boolean) { - this._active = value; - } - private _active = false; + @Input() layers: Layer[] = []; public zoneWithBuffer; public selectedZone; @@ -88,7 +82,6 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { @Output() zoneWithBufferChange = new EventEmitter(); @Output() bufferChange = new EventEmitter(); @Output() measureUnitChange = new EventEmitter(); - @Output() activeEvent = new EventEmitter(); formValueChanges$$: Subscription; bufferValueChanges$$: Subscription; @@ -123,7 +116,7 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { this.bufferChange.emit(value); this.zoneWithBuffer = buffer(this.selectedZone, this.bufferFormControl.value, {units: 'kilometers'}); this.zoneWithBufferChange.emit(this.zoneWithBuffer); - } else if (value === 0 && this.active) { + } else if (value === 0 && this.layers.length > 0) { this.bufferChange.emit(value); this.zoneWithBufferChange.emit(this.selectedZone); } else if ( @@ -146,8 +139,6 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { } onZoneChange(feature) { - this.active = true; - this.activeEvent.emit(true); this.bufferFormControl.setValue(0); if (feature && this.queryType) { this.spatialFilterService.loadItemById(feature, this.queryType) diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.html b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.html index 177f49da56..89bd3ab188 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.html +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.html @@ -16,6 +16,7 @@ [store]="store" [queryType]="selectedQueryType" [zone]="zone" + [layers]="layers" (zoneChange)="zoneChange.emit($event)" (zoneWithBufferChange)="zoneWithBufferChange.emit($event)" (bufferChange)="bufferChange.emit($event)" diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.ts b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.ts index 07036e4ff0..1b490cf215 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.ts +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.ts @@ -11,6 +11,7 @@ import { FormControl } from '@angular/forms'; import { EntityStore } from '@igo2/common'; import { Feature } from '../../../feature'; import { MeasureLengthUnit } from '../../../measure'; +import { Layer } from '../../../layer'; /** * Spatial Filter Type @@ -47,6 +48,8 @@ export class SpatialFilterTypeComponent implements OnInit { @Input() zone: Feature; + @Input() layers: Layer[] = []; + public type: SpatialFilterType; @Output() eventType = new EventEmitter(); diff --git a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.html b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.html index a42a28028e..2fc23822e3 100644 --- a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.html +++ b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.html @@ -3,12 +3,11 @@ [store]="spatialListStore" [selectedQueryType]="queryType" [zone]="zone" - [active]="active" + [layers]="activeLayers" (eventType)="getOutputType($event)" (eventQueryType)="getOutputQueryType($event)" (zoneChange)="onZoneChange($event)" (zoneWithBufferChange)="onZoneChange($event, true)" - (activeEvent)="active = $event" (bufferChange)="buffer = $event" (measureUnitChange)="measureUnit = $event"> @@ -18,7 +17,6 @@ [queryType]="queryType" [map]="map" [zone]="zone" - [active]="active" [loading]="loading" [store]="store" [layers]="activeLayers" @@ -28,7 +26,6 @@ (measureUnitChange)="measureUnit = $event" (freehandControl)="freehandDrawIsActive = $event" (drawZoneEvent)="zone = $event" - (activeEvent)="active = $event" (zoneWithBufferChange)="onZoneChange($event, true)" (itemTypeChange)="itemType = $event" (thematicChange)="thematics = $event" diff --git a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts index 5b38893cc6..928f32e71a 100644 --- a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts +++ b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts @@ -63,8 +63,6 @@ export class SpatialFilterToolComponent implements OnDestroy { public layers: Layer[] = []; public activeLayers: Layer[] = []; - public active = false; - public queryType: SpatialFilterQueryType; public thematics: SpatialFilterThematic[]; public zone: Feature; From 98328613742905c42c2f9f23a012627e43aa8fb9 Mon Sep 17 00:00:00 2001 From: Philippe Lafreniere Date: Fri, 6 Nov 2020 16:28:18 -0500 Subject: [PATCH 4/7] WIP --- .../spatial-filter-list.component.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts index 4edc744e21..b2021bce08 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts @@ -18,6 +18,7 @@ import { MeasureLengthUnit } from '../../../measure/shared'; import { LanguageService, MessageService } from '@igo2/core'; import buffer from '@turf/buffer'; import { Layer } from '../../../layer'; +import * as multiPolygon from 'ol/geom/MultiPolygon'; @Component({ selector: 'igo-spatial-filter-list', @@ -62,7 +63,7 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { @Input() layers: Layer[] = []; public zoneWithBuffer; - public selectedZone; + public selectedZone: any; public measureUnit: MeasureLengthUnit = MeasureLengthUnit.Meters; @@ -110,8 +111,16 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { .subscribe((value) => { if (this.measureUnit === MeasureLengthUnit.Meters && value > 0 && value <= 100000) { this.bufferChange.emit(value); - this.zoneWithBuffer = buffer(this.selectedZone, this.bufferFormControl.value / 1000, {units: 'kilometers'}); + let bufferFeature = {...this.selectedZone}; + console.log(bufferFeature); + bufferFeature.geometry = multiPolygon.transform('EPSG:4326', 'EPSG:3857'); + console.log(bufferFeature.geometry); + console.log(this.selectedZone.geometry); + this.zoneWithBuffer = buffer(bufferFeature, this.bufferFormControl.value / 1000, {units: 'kilometers'}); + this.zoneWithBuffer.geometry = multiPolygon.transform('EPSG:3857', 'EPSG:4326'); + console.log(this.zoneWithBuffer); this.zoneWithBufferChange.emit(this.zoneWithBuffer); + console.log(this.zoneWithBuffer); } else if (this.measureUnit === MeasureLengthUnit.Kilometers && value > 0 && value <= 100) { this.bufferChange.emit(value); this.zoneWithBuffer = buffer(this.selectedZone, this.bufferFormControl.value, {units: 'kilometers'}); From 08a0012a20f4eb6b86dc2eded5fb143ac277f9ed Mon Sep 17 00:00:00 2001 From: Philippe Lafreniere Date: Tue, 10 Nov 2020 10:03:50 -0500 Subject: [PATCH 5/7] fix(spatial-filter): fix spatial filter for 1.5. Comments for buffer parameter (WIP) --- package-lock.json | 42 ++++++----- package.json | 2 + .../spatial-filter-item.component.html | 4 +- .../spatial-filter-list.component.html | 4 +- .../spatial-filter-list.component.ts | 70 ++++++++++++++++--- .../spatial-filter-tool.component.ts | 3 +- 6 files changed, 96 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7da6a2576b..0bcff36d5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3032,6 +3032,16 @@ "requires": { "@turf/helpers": "^5.1.5" } + }, + "@turf/projection": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-5.1.5.tgz", + "integrity": "sha1-JFF+7rLzaBa6n3EueubWo2jt91c=", + "requires": { + "@turf/clone": "^5.1.5", + "@turf/helpers": "^5.1.5", + "@turf/meta": "^5.1.5" + } } } }, @@ -3220,26 +3230,21 @@ } }, "@turf/projection": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-5.1.5.tgz", - "integrity": "sha1-JFF+7rLzaBa6n3EueubWo2jt91c=", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-6.0.1.tgz", + "integrity": "sha512-Y3RvGT6I53MjYKLG69e9sMk45wJXcLbrEO1t6P3WQQQGqA2gYhhMJyV41vE2Z2llrJpvs2dDx/tIeQzGd0HHMQ==", "requires": { - "@turf/clone": "^5.1.5", - "@turf/helpers": "^5.1.5", - "@turf/meta": "^5.1.5" + "@turf/clone": "6.x", + "@turf/helpers": "6.x", + "@turf/meta": "6.x" }, "dependencies": { - "@turf/helpers": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-5.1.5.tgz", - "integrity": "sha1-FTQFInq5M9AEpbuWQantmZ/L4M8=" - }, - "@turf/meta": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz", - "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=", + "@turf/clone": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-6.0.2.tgz", + "integrity": "sha512-UVpYPnW3wRj3bPncR6Z2PRbowBk+nEdVWgGewPxrKKLfvswtVtG9n/OIyvbU3E3ZOadBVxTH2uAMEMOz4800FA==", "requires": { - "@turf/helpers": "^5.1.5" + "@turf/helpers": "6.x" } } } @@ -11477,6 +11482,11 @@ "verror": "1.10.0" } }, + "jsts": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jsts/-/jsts-2.6.1.tgz", + "integrity": "sha512-+uKq5RhZ2ZBDghNVhd6fnHXPlpuBg5zGln4piL0fWlaWiP91WI4bsOM3BBCbntTvo2iYTQ+Kqrqhes5yPe0s9Q==" + }, "jszip": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.5.0.tgz", diff --git a/package.json b/package.json index 8cca201805..dc64f8a2eb 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "@turf/helpers": "^6.1.4", "@turf/line-intersect": "^6.0.2", "@turf/point-on-feature": "^5.1.5", + "@turf/projection": "^6.0.1", "angular-shepherd": "^0.7.0", "angular2-notifications": "^9.0.0", "bowser": "^2.10.0", @@ -99,6 +100,7 @@ "hammerjs": "^2.0.8", "html2canvas": "^1.0.0-rc.5", "jspdf": "^1.5.3", + "jsts": "^2.6.1", "jszip": "^3.1.5", "jwt-decode": "^2.2.0", "moment": "^2.22.2", diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html index a8ea712c38..82d52eb296 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.html @@ -26,7 +26,7 @@
-
+
diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.html b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.html index fcd6e76b6c..27080f45b7 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.html +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.html @@ -11,7 +11,7 @@ -
+ diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts index b2021bce08..2aad5a2384 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts @@ -17,8 +17,24 @@ import { Feature } from '../../../feature'; import { MeasureLengthUnit } from '../../../measure/shared'; import { LanguageService, MessageService } from '@igo2/core'; import buffer from '@turf/buffer'; +import * as TurfProj from '@turf/projection'; import { Layer } from '../../../layer'; -import * as multiPolygon from 'ol/geom/MultiPolygon'; +import OlPolygon from 'ol/geom/Polygon'; +import * as olproj from 'ol/proj'; +import { + LineString, + MultiLineString, + MultiPoint, + MultiPolygon, + Point, + Polygon, +} from 'ol/geom'; +import LinearRing from 'ol/geom/LinearRing'; +import GeoJSON from 'ol/format/GeoJSON'; +import GeoJSONReader from 'jsts/org/locationtech/jts/io/GeoJSONReader'; +import GeoJSONWriter from 'jsts/org/locationtech/jts/io/GeoJSONWriter'; +import { BufferOp } from 'jsts/org/locationtech/jts/operation/buffer'; +import Parser from 'jsts/org/locationtech/jts/io/OL3Parser'; @Component({ selector: 'igo-spatial-filter-list', @@ -71,6 +87,9 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { public bufferFormControl = new FormControl(); + private reader = new GeoJSONReader(); + private writer = new GeoJSONWriter(); + /** * Available measure units for the measure type given * @internal @@ -111,17 +130,52 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { .subscribe((value) => { if (this.measureUnit === MeasureLengthUnit.Meters && value > 0 && value <= 100000) { this.bufferChange.emit(value); - let bufferFeature = {...this.selectedZone}; + // const bufferFeature = {...this.selectedZone}; + const format = new GeoJSON(); + const bufferFeature = format.readFeature(this.selectedZone, { + featureProjection: 'EPSG:4326', + }); + const parser = new Parser(); + parser.inject( + Point, + LineString, + LinearRing, + Polygon, + MultiPoint, + MultiLineString, + MultiPolygon + ); + console.log(this.selectedZone); console.log(bufferFeature); - bufferFeature.geometry = multiPolygon.transform('EPSG:4326', 'EPSG:3857'); - console.log(bufferFeature.geometry); - console.log(this.selectedZone.geometry); - this.zoneWithBuffer = buffer(bufferFeature, this.bufferFormControl.value / 1000, {units: 'kilometers'}); - this.zoneWithBuffer.geometry = multiPolygon.transform('EPSG:3857', 'EPSG:4326'); + // let bufferFeature = TurfProj.toMercator(this.selectedZone); + // console.log(bufferFeature); + // let jstsGeom = this.reader.read(bufferFeature.geometry); + // console.log(jstsGeom); + // console.log(bufferFeature); + // for (let coordinate of bufferFeature.geometry.coordinates[0][0]) { + // coordinate = olproj.transform(coordinate, 'EPSG:4326', 'EPSG:3857'); + // } + // bufferFeature.geometry = OlPolygon.transform('EPSG:4326', 'EPSG:3857'); + // bufferFeature = jstsGeom.buffer(this.bufferFormControl.value / 1000); + // for (let coordinate of this.zoneWithBuffer.geometry.coordinates[0][0]) { + // coordinate = olproj.transform(coordinate, 'EPSG:3857', 'EPSG:4326'); + // } + + // convert the OpenLayers geometry to a JSTS geometry + const jstsGeom = parser.read(bufferFeature.geometry); + console.log(jstsGeom); + // create a buffer of 40 meters around each line + const buffered = jstsGeom.buffer(this.bufferFormControl.value); + console.log(buffered); + + this.zoneWithBuffer = {...this.selectedZone}; + this.zoneWithBuffer.geometry = parser.write(buffered); + // this.zoneWithBuffer.geometry = this.writer.write(bufferFeature); + // this.zoneWithBuffer = TurfProj.toWgs84(this.zoneWithBuffer); console.log(this.zoneWithBuffer); this.zoneWithBufferChange.emit(this.zoneWithBuffer); - console.log(this.zoneWithBuffer); } else if (this.measureUnit === MeasureLengthUnit.Kilometers && value > 0 && value <= 100) { + console.log('ici'); this.bufferChange.emit(value); this.zoneWithBuffer = buffer(this.selectedZone, this.bufferFormControl.value, {units: 'kilometers'}); this.zoneWithBufferChange.emit(this.zoneWithBuffer); diff --git a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts index 928f32e71a..6fc6435b0f 100644 --- a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts +++ b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts @@ -193,6 +193,7 @@ export class SpatialFilterToolComponent implements OnDestroy { this.iterator = 1; if (this.type !== SpatialFilterType.Predefined) { this.zone = undefined; + this.queryType = undefined; } } @@ -212,7 +213,7 @@ export class SpatialFilterToolComponent implements OnDestroy { if (this.measureUnit === MeasureLengthUnit.Kilometers && this.type !== SpatialFilterType.Point) { this.buffer = this.buffer * 1000; } - + console.log(this.buffer); const observables$: Observable[] = []; thematics.forEach(thematic => { observables$.push( From 35e89d53bb96ade64f4ba0cb37caf7bd121b1f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Barbeau?= Date: Wed, 11 Nov 2020 09:15:58 -0500 Subject: [PATCH 6/7] remove jsts --- package.json | 2 - .../spatial-filter-list.component.ts | 111 ++++++++---------- .../spatial-filter-tool.component.ts | 2 +- 3 files changed, 53 insertions(+), 62 deletions(-) diff --git a/package.json b/package.json index dc64f8a2eb..8cca201805 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,6 @@ "@turf/helpers": "^6.1.4", "@turf/line-intersect": "^6.0.2", "@turf/point-on-feature": "^5.1.5", - "@turf/projection": "^6.0.1", "angular-shepherd": "^0.7.0", "angular2-notifications": "^9.0.0", "bowser": "^2.10.0", @@ -100,7 +99,6 @@ "hammerjs": "^2.0.8", "html2canvas": "^1.0.0-rc.5", "jspdf": "^1.5.3", - "jsts": "^2.6.1", "jszip": "^3.1.5", "jwt-decode": "^2.2.0", "moment": "^2.22.2", diff --git a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts index 2aad5a2384..721f82584b 100644 --- a/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts +++ b/packages/geo/src/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.ts @@ -16,11 +16,9 @@ import { FormControl } from '@angular/forms'; import { Feature } from '../../../feature'; import { MeasureLengthUnit } from '../../../measure/shared'; import { LanguageService, MessageService } from '@igo2/core'; -import buffer from '@turf/buffer'; -import * as TurfProj from '@turf/projection'; +// import buffer from '@turf/buffer'; +// import * as TurfProj from '@turf/projection'; import { Layer } from '../../../layer'; -import OlPolygon from 'ol/geom/Polygon'; -import * as olproj from 'ol/proj'; import { LineString, MultiLineString, @@ -31,10 +29,10 @@ import { } from 'ol/geom'; import LinearRing from 'ol/geom/LinearRing'; import GeoJSON from 'ol/format/GeoJSON'; -import GeoJSONReader from 'jsts/org/locationtech/jts/io/GeoJSONReader'; -import GeoJSONWriter from 'jsts/org/locationtech/jts/io/GeoJSONWriter'; -import { BufferOp } from 'jsts/org/locationtech/jts/operation/buffer'; -import Parser from 'jsts/org/locationtech/jts/io/OL3Parser'; +// import GeoJSONReader from 'jsts/org/locationtech/jts/io/GeoJSONReader'; +// import GeoJSONWriter from 'jsts/org/locationtech/jts/io/GeoJSONWriter'; +// import { BufferOp } from 'jsts/org/locationtech/jts/operation/buffer'; +// import Parser from 'jsts/org/locationtech/jts/io/OL3Parser'; @Component({ selector: 'igo-spatial-filter-list', @@ -87,8 +85,8 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { public bufferFormControl = new FormControl(); - private reader = new GeoJSONReader(); - private writer = new GeoJSONWriter(); + // private reader = new GeoJSONReader(); + // private writer = new GeoJSONWriter(); /** * Available measure units for the measure type given @@ -129,55 +127,50 @@ export class SpatialFilterListComponent implements OnInit, OnDestroy { ) .subscribe((value) => { if (this.measureUnit === MeasureLengthUnit.Meters && value > 0 && value <= 100000) { - this.bufferChange.emit(value); - // const bufferFeature = {...this.selectedZone}; - const format = new GeoJSON(); - const bufferFeature = format.readFeature(this.selectedZone, { - featureProjection: 'EPSG:4326', - }); - const parser = new Parser(); - parser.inject( - Point, - LineString, - LinearRing, - Polygon, - MultiPoint, - MultiLineString, - MultiPolygon - ); - console.log(this.selectedZone); - console.log(bufferFeature); - // let bufferFeature = TurfProj.toMercator(this.selectedZone); - // console.log(bufferFeature); - // let jstsGeom = this.reader.read(bufferFeature.geometry); - // console.log(jstsGeom); - // console.log(bufferFeature); - // for (let coordinate of bufferFeature.geometry.coordinates[0][0]) { - // coordinate = olproj.transform(coordinate, 'EPSG:4326', 'EPSG:3857'); - // } - // bufferFeature.geometry = OlPolygon.transform('EPSG:4326', 'EPSG:3857'); - // bufferFeature = jstsGeom.buffer(this.bufferFormControl.value / 1000); - // for (let coordinate of this.zoneWithBuffer.geometry.coordinates[0][0]) { - // coordinate = olproj.transform(coordinate, 'EPSG:3857', 'EPSG:4326'); - // } - - // convert the OpenLayers geometry to a JSTS geometry - const jstsGeom = parser.read(bufferFeature.geometry); - console.log(jstsGeom); - // create a buffer of 40 meters around each line - const buffered = jstsGeom.buffer(this.bufferFormControl.value); - console.log(buffered); - - this.zoneWithBuffer = {...this.selectedZone}; - this.zoneWithBuffer.geometry = parser.write(buffered); - // this.zoneWithBuffer.geometry = this.writer.write(bufferFeature); - // this.zoneWithBuffer = TurfProj.toWgs84(this.zoneWithBuffer); - console.log(this.zoneWithBuffer); - this.zoneWithBufferChange.emit(this.zoneWithBuffer); - } else if (this.measureUnit === MeasureLengthUnit.Kilometers && value > 0 && value <= 100) { - console.log('ici'); - this.bufferChange.emit(value); - this.zoneWithBuffer = buffer(this.selectedZone, this.bufferFormControl.value, {units: 'kilometers'}); + // this.bufferChange.emit(value); + // // const bufferFeature = {...this.selectedZone}; + // const format = new GeoJSON(); + // const bufferFeature = format.readFeature(this.selectedZone, { + // featureProjection: 'EPSG:4326', + // }); + // const parser = new Parser(); + // parser.inject( + // Point, + // LineString, + // LinearRing, + // Polygon, + // MultiPoint, + // MultiLineString, + // MultiPolygon + // ); + // + // // let bufferFeature = TurfProj.toMercator(this.selectedZone); + // // console.log(bufferFeature); + // // let jstsGeom = this.reader.read(bufferFeature.geometry); + // // console.log(jstsGeom); + // // console.log(bufferFeature); + // // for (let coordinate of bufferFeature.geometry.coordinates[0][0]) { + // // coordinate = olproj.transform(coordinate, 'EPSG:4326', 'EPSG:3857'); + // // } + // // bufferFeature.geometry = OlPolygon.transform('EPSG:4326', 'EPSG:3857'); + // // bufferFeature = jstsGeom.buffer(this.bufferFormControl.value / 1000); + // // for (let coordinate of this.zoneWithBuffer.geometry.coordinates[0][0]) { + // // coordinate = olproj.transform(coordinate, 'EPSG:3857', 'EPSG:4326'); + // // } + // + // // convert the OpenLayers geometry to a JSTS geometry + // const jstsGeom = parser.read(bufferFeature.geometry); + // // create a buffer of 40 meters around each line + // const buffered = jstsGeom.buffer(this.bufferFormControl.value); + // + // this.zoneWithBuffer = {...this.selectedZone}; + // this.zoneWithBuffer.geometry = parser.write(buffered); + // // this.zoneWithBuffer.geometry = this.writer.write(bufferFeature); + // // this.zoneWithBuffer = TurfProj.toWgs84(this.zoneWithBuffer); + // this.zoneWithBufferChange.emit(this.zoneWithBuffer); + // } else if (this.measureUnit === MeasureLengthUnit.Kilometers && value > 0 && value <= 100) { + // this.bufferChange.emit(value); + // this.zoneWithBuffer = buffer(this.selectedZone, this.bufferFormControl.value, {units: 'kilometers'}); this.zoneWithBufferChange.emit(this.zoneWithBuffer); } else if (value === 0 && this.layers.length > 0) { this.bufferChange.emit(value); diff --git a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts index 6fc6435b0f..e504b6adda 100644 --- a/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts +++ b/packages/integration/src/lib/filter/spatial-filter-tool/spatial-filter-tool.component.ts @@ -213,7 +213,7 @@ export class SpatialFilterToolComponent implements OnDestroy { if (this.measureUnit === MeasureLengthUnit.Kilometers && this.type !== SpatialFilterType.Point) { this.buffer = this.buffer * 1000; } - console.log(this.buffer); + const observables$: Observable[] = []; thematics.forEach(thematic => { observables$.push( From e1bdbc641ab58ab8e96b81676e939e4fb05f0d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Barbeau?= Date: Wed, 11 Nov 2020 09:26:03 -0500 Subject: [PATCH 7/7] package --- package-lock.json | 44 +++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0bcff36d5f..df5109fbee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3229,26 +3229,6 @@ } } }, - "@turf/projection": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-6.0.1.tgz", - "integrity": "sha512-Y3RvGT6I53MjYKLG69e9sMk45wJXcLbrEO1t6P3WQQQGqA2gYhhMJyV41vE2Z2llrJpvs2dDx/tIeQzGd0HHMQ==", - "requires": { - "@turf/clone": "6.x", - "@turf/helpers": "6.x", - "@turf/meta": "6.x" - }, - "dependencies": { - "@turf/clone": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-6.0.2.tgz", - "integrity": "sha512-UVpYPnW3wRj3bPncR6Z2PRbowBk+nEdVWgGewPxrKKLfvswtVtG9n/OIyvbU3E3ZOadBVxTH2uAMEMOz4800FA==", - "requires": { - "@turf/helpers": "6.x" - } - } - } - }, "@types/archy": { "version": "0.0.31", "resolved": "https://registry.npmjs.org/@types/archy/-/archy-0.0.31.tgz", @@ -4634,6 +4614,15 @@ "integrity": "sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg==", "dev": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "bl": { "version": "0.9.5", "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz", @@ -8481,6 +8470,12 @@ "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.2.tgz", "integrity": "sha512-Wz3c3XQ5xroCxd1G8b7yL0Ehkf0TC9oYC6buPFkNnU9EnaPlifeAFCyCh+iewXTyFRcg0a6j3J7FmJsIhlhBdw==" }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "optional": true + }, "filename-reserved-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz", @@ -9358,6 +9353,7 @@ "dev": true, "optional": true, "requires": { + "bindings": "^1.5.0", "nan": "^2.12.1" } }, @@ -11482,11 +11478,6 @@ "verror": "1.10.0" } }, - "jsts": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/jsts/-/jsts-2.6.1.tgz", - "integrity": "sha512-+uKq5RhZ2ZBDghNVhd6fnHXPlpuBg5zGln4piL0fWlaWiP91WI4bsOM3BBCbntTvo2iYTQ+Kqrqhes5yPe0s9Q==" - }, "jszip": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.5.0.tgz", @@ -12121,6 +12112,7 @@ "dev": true, "optional": true, "requires": { + "bindings": "^1.5.0", "nan": "^2.12.1" } }, @@ -19992,6 +19984,7 @@ "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "optional": true, "requires": { + "bindings": "^1.5.0", "nan": "^2.12.1" } }, @@ -20381,6 +20374,7 @@ "dev": true, "optional": true, "requires": { + "bindings": "^1.5.0", "nan": "^2.12.1" } },