Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api-clients/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
.pytest_cache
__pycache__/
node_modules/

typescript/package-lock.json
2,777 changes: 1,461 additions & 1,316 deletions ui/package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
"@types/jasminewd2": "~2.0.13",
"@types/node": "^25.3.2",
"@types/topojson-specification": "^1.0.5",
"@vitest/browser-playwright": "^4.0.8",
"@vitest/coverage-v8": "^4.0.8",
"@vitest/browser-playwright": "^4.1.9",
"@vitest/coverage-v8": "^4.1.9",
"angular-eslint": "^21.2.0",
"eslint": "^9.39.3",
"eslint-config-prettier": "^10.1.8",
Expand All @@ -118,12 +118,12 @@
"jasmine-core": "~6.1.0",
"jsdom": "^28.1.0",
"ng-packagr": "^21.2.0",
"playwright-ng-schematics": "^21.0.4",
"playwright-ng-schematics": "^21.1.0",
"prettier": "3.8.1",
"ts-node": "~10.9.2",
"typescript": "5.9.3",
"typescript-eslint": "^8.56.1",
"vitest": "^4.0.8"
"vitest": "^4.1.9"
},
"overrides": {
"@angular-devkit/build-angular": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class ColorTableEditorComponent {
const measurement = this.measurement();

if (measurement instanceof ClassificationMeasurement) {
return measurement as ColorAttributeInputHinter;
return measurement;
}

return undefined;
Expand Down
2 changes: 1 addition & 1 deletion ui/projects/common/src/lib/colors/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class Color implements IRgba, RgbaStruct {
}

rgbaStruct(): RgbaStruct {
return this as RgbaStruct;
return this;
}

rgbaTuple(): RgbaTuple {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {ColorBreakpoint} from '../color-breakpoint.model';
import {geoengineValidators} from '../../util/form.validators';
import {UUID} from '../../datasets/dataset.model';
import {WorkflowsService} from '../../workflows/workflows.service';
import {StatisticsDict, StatisticsParams} from '../../operators/operator.model';
import {Workflow} from '@geoengine/api-client';
import {StatisticsDict} from '../../operators/operator.model';
import {SymbologyQueryParams} from '../../symbology/symbology.model';
import {PlotsService} from '../../plots/plots.service';
import {ALL_COLORMAPS} from '../colormaps/colormaps';
Expand Down Expand Up @@ -268,12 +267,12 @@ export class PercentileBreakpointSelectorComponent {
params: {
columnNames: [this.band()],
percentiles,
} as StatisticsParams,
},
sources: {
source: [workflow.operator],
},
} as StatisticsDict,
} as Workflow),
}),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
CollectionItem as LayerCollectionItemDict,
ProviderLayerCollectionId as ProviderLayerCollectionIdDict,
LayerListing as LayerCollectionLayerDict,
LayerCollectionListing as LayerCollectionListingDict,
} from '@geoengine/api-client';
import {BehaviorSubject, Observable, Subject, map} from 'rxjs';
import {LayersService} from '../layers.service';
Expand Down Expand Up @@ -147,12 +146,12 @@ export class LayerCollectionDropdownComponent implements OnInit, OnChanges, OnDe
newSelections.push(found);

if (found.type === 'layer') {
this.layerSelected.emit(found as LayerCollectionLayerDict);
this.layerSelected.emit(found);

break;
}

const collection = found as LayerCollectionListingDict;
const collection = found;

const collectionItems = await this.layersService.getLayerCollectionItems(
collection.id.providerId,
Expand All @@ -175,11 +174,11 @@ export class LayerCollectionDropdownComponent implements OnInit, OnChanges, OnDe

async selectItem(item: LayerCollectionItemDict, index: number): Promise<void> {
if (item.type === 'layer') {
this.layerSelected.emit(item as LayerCollectionLayerDict);
this.layerSelected.emit(item);
return;
}

const collection = item as LayerCollectionListingDict;
const collection = item;

this.layerSelected.emit(undefined);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import {LayerCollectionSearch} from '../layer-collection.model';
import {
CollectionItem as LayerCollectionItemDict,
ProviderLayerCollectionId as ProviderLayerCollectionIdDict,
LayerListing as LayerCollectionLayerDict,
LayerCollectionListing as LayerCollectionListingDict,
LayerListing,
LayerCollectionListing,
} from '@geoengine/api-client';
Expand Down Expand Up @@ -139,10 +137,10 @@ export class LayerCollectionListComponent implements OnChanges {

trackById(_index: number, item: LayerCollectionItemDict): string {
if (item.type === 'collection') {
const collection = item as LayerCollectionListingDict;
const collection = item;
return collection.id.providerId + collection.id.collectionId;
} else if (item.type === 'layer') {
const layer = item as LayerCollectionLayerDict;
const layer = item;
return layer.id.providerId + layer.id.layerId;
}

Expand Down
4 changes: 2 additions & 2 deletions ui/projects/common/src/lib/layers/layer-metadata.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export abstract class LayerMetadata implements HasLayerType {
): RasterLayerMetadata | VectorLayerMetadata {
switch (dict.type) {
case 'raster':
return RasterLayerMetadata.fromDict(dict as RasterResultDescriptorDict);
return RasterLayerMetadata.fromDict(dict);
case 'vector':
return VectorLayerMetadata.fromDict(dict as VectorResultDescriptorDict);
return VectorLayerMetadata.fromDict(dict);
default:
throw Error(`Unknown result type: ${dict.type}`);
}
Expand Down
2 changes: 1 addition & 1 deletion ui/projects/common/src/lib/spatial-bounds/bounding-box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class BoundingBox2D implements ToDict<BBoxDict> {
* @returns - The OpenLayers extent.
*/
public toOlExtent(): Extent {
return this.inner as Extent;
return this.inner;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import {ColorTableEditorComponent} from '../../colors/color-table-editor/color-t
import {UUID} from '../../datasets/dataset.model';
import {VegaChartData} from '../../plots/plot.model';
import {WorkflowsService} from '../../workflows/workflows.service';
import {HistogramDict, HistogramParams} from '../../operators/operator.model';
import {Workflow} from '@geoengine/api-client';
import {HistogramDict} from '../../operators/operator.model';
import {PlotsService} from '../../plots/plots.service';
import {SymbologyQueryParams} from '../symbology.model';
import {PercentileBreakpointSelectorComponent} from '../../colors/percentile-breakpoint-selector/percentile-breakpoint-selector.component';
Expand Down Expand Up @@ -302,12 +301,12 @@ export class RasterGradientSymbologyEditorComponent {
},
bounds: 'data',
interactive: true,
} as HistogramParams,
},
sources: {
source: workflow.operator,
},
} as HistogramDict,
} as Workflow),
}),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {Colorizer, ColorizerType, LinearGradient, LogarithmicGradient, PaletteCo
import {BLACK, Color, TRANSPARENT, WHITE} from '../../colors/color';
import {ColorBreakpoint} from '../../colors/color-breakpoint.model';
import {BehaviorSubject} from 'rxjs';
import {RasterBandDescriptor, TypedRasterResultDescriptor as RasterResultDescriptorDict} from '@geoengine/api-client';
import {RasterBandDescriptor} from '@geoengine/api-client';
import {WorkflowsService} from '../../workflows/workflows.service';
import {FxLayoutDirective, FxFlexDirective} from '../../util/directives/flexbox-legacy.directive';
import {MatCard, MatCardHeader, MatCardTitleGroup, MatCardTitle, MatCardSubtitle, MatCardContent} from '@angular/material/card';
Expand Down Expand Up @@ -309,7 +309,7 @@ export class RasterSymbologyEditorComponent {
throw Error('expected raster result descriptor');
}

const resultDescriptor = _resultDescriptor as RasterResultDescriptorDict;
const resultDescriptor = _resultDescriptor;

let selectedBand = undefined;
let selectedBand2 = undefined;
Expand Down
2 changes: 1 addition & 1 deletion ui/projects/common/src/lib/symbology/symbology.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ export class DerivedColor implements ColorParam {
}

clone(): ColorParam {
return new DerivedColor(this.attribute, this.colorizer.clone()) as ColorParam;
return new DerivedColor(this.attribute, this.colorizer.clone());
}

toDict(): ColorParamDict {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export class DrawFeaturesComponent implements OnDestroy, OnInit {
return of<UploadResponseDict>(); // filter out
}

const httpResponse: HttpResponse<UploadResponseDict> = event as unknown as HttpResponse<UploadResponseDict>;
const httpResponse: HttpResponse<UploadResponseDict> = event;

if (!httpResponse.body) {
return of<UploadResponseDict>(); // filter out
Expand Down
2 changes: 1 addition & 1 deletion ui/projects/core/src/lib/layers/basemap.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class BasemapService {
this.selectedBasemap.set({
name,
...basemap,
} as NamedBasemap);
});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export class BandNeighborhoodAggregateComponent {
raster: inputWorkflow.operator,
},
} as BandNeighborhoodAggregateDict,
} as WorkflowDict;
};

return this.projectService.registerWorkflow(workflow);
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export class BandwiseExpressionOperatorComponent implements AfterViewInit {
raster: inputWorkflow.operator,
},
} as BandwiseExpressionDict,
} as WorkflowDict;
};

return this.projectService.registerWorkflow(workflow);
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {ProjectService} from '../../../project/project.service';
import {map, mergeMap, tap} from 'rxjs/operators';
import {
ClassHistogramDict,
ClassHistogramParams,
ClassificationMeasurement,
Layer,
NotificationService,
Expand Down Expand Up @@ -185,7 +184,7 @@ export class ClassHistogramOperatorComponent implements AfterViewInit, OnDestroy
type: 'ClassHistogram',
params: {
columnName: attributeName,
} as ClassHistogramParams,
},
sources: {
source: inputWorkflow.operator,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {BackendService} from '../../../backend/backend.service';
import {
ColumnRangeFilterDict,
HistogramDict,
HistogramParams,
Layer,
RandomColorService,
ResultTypes,
Expand Down Expand Up @@ -259,7 +258,7 @@ export class ColumnRangeFilterComponent implements OnDestroy {
* creates a new layer with the filtered values
*/
add(): void {
const name = this.form.get('name')?.value ?? ('Filtered Layer' as string);
const name = this.form.get('name')?.value ?? 'Filtered Layer';
const inputLayer = this.form.controls['layer'].value!;
const filterValues = this.filters.value;

Expand Down Expand Up @@ -303,7 +302,7 @@ export class ColumnRangeFilterComponent implements OnDestroy {
vector: this.createWorkflow(filterValues, ++index, inputWorkflow).operator,
},
} as ColumnRangeFilterDict,
} as WorkflowDict;
};
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down Expand Up @@ -401,7 +400,7 @@ export class ColumnRangeFilterComponent implements OnDestroy {
maxNumberOfBuckets: 100,
},
interactive: true,
} as HistogramParams,
},
sources: {
source: workflow.operator,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export class ExpressionOperatorComponent implements AfterViewInit {
raster: inputWorkflow.operator,
},
} as ExpressionDict,
} as WorkflowDict;
};

return this.projectService.registerWorkflow(workflow);
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import {
ResultTypes,
UnitlessMeasurement,
} from '@geoengine/common';
import {RasterBandDescriptor} from '@geoengine/api-client';

describe('MultiLayerSelectionComponent', () => {
let component: MultiLayerSelectionComponent;
let fixture: ComponentFixture<MultiLayerSelectionComponent>;
Expand Down Expand Up @@ -119,9 +117,6 @@ describe('MultiLayerSelectionComponent', () => {
projectServiceSpy = {
getLayerStream: vi.fn().mockName('ProjectService.getLayerStream'),
getLayerMetadata: vi.fn().mockName('ProjectService.getLayerMetadata'),
} as {
getLayerStream: Mock;
getLayerMetadata: Mock;
};

/** ProjectService returns Mock Layers **/
Expand All @@ -131,7 +126,7 @@ describe('MultiLayerSelectionComponent', () => {
new RasterLayerMetadata(
RasterDataTypes.Byte,
WGS_84.spatialReference,
[{name: 'band', measurement: new UnitlessMeasurement().toDict()} as RasterBandDescriptor],
[{name: 'band', measurement: new UnitlessMeasurement().toDict()}],
new SpatialGridDescriptor(
new SpatialGridDefinition(
new GeoTransform(new Coordinate2D([0.0, 0.0]), 1.0, -1.0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class LineSimplificationComponent implements OnInit {
vector: sourceWorkflow.operator,
},
} as LineSimplificationDict,
} as WorkflowDict;
};
return this.projectService.registerWorkflow(workflow);
}),
mergeMap((workflowId) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {ProjectService} from '../../../project/project.service';
import {map, mergeMap, tap} from 'rxjs/operators';
import {
NotificationService,
PieChartCountParams,
PieChartDict,
Plot,
ResultTypes,
Expand Down Expand Up @@ -166,7 +165,7 @@ export class PieChartComponent implements AfterViewInit, OnDestroy {
type: pieChartType,
columnName,
donut,
} as PieChartCountParams,
},
sources: {
vector: inputWorkflow.operator,
},
Expand Down
Loading
Loading