@regionerne/gis-komponent 0.0.119 → 0.0.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import { Feature } from 'ol';
|
|
2
2
|
import { Vector as VectorSource } from 'ol/source';
|
|
3
|
-
import { LineString
|
|
4
|
-
import { Coordinate } from 'ol/coordinate';
|
|
3
|
+
import { LineString } from 'ol/geom';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare class GeometrySplitService {
|
|
7
|
-
private
|
|
6
|
+
private _geometryService;
|
|
7
|
+
private _wktFormat;
|
|
8
8
|
private _featureHelper;
|
|
9
9
|
private _undoRedo;
|
|
10
|
-
|
|
11
|
-
* Split polygons in a vector source using a buffered LineString.
|
|
12
|
-
* @param lineFeature The drawn LineString feature.
|
|
13
|
-
* @param vectorSource The source containing polygons to split.
|
|
14
|
-
* @param bufferMeters Width of the buffer in meters (default: 1).
|
|
15
|
-
*/
|
|
16
|
-
splitPolygonsWithBufferedLine(lineFeature: Feature<LineString>, vectorSource: VectorSource, bufferMeters?: number): void;
|
|
17
|
-
isPointStrictlyInside(geom: Geometry, coord: Coordinate): boolean;
|
|
10
|
+
splitFeatures(lineFeature: Feature<LineString>, vectorSource: VectorSource): void;
|
|
18
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<GeometrySplitService, never>;
|
|
19
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<GeometrySplitService>;
|
|
20
13
|
}
|
|
@@ -6,9 +6,15 @@ export declare class GeometryService {
|
|
|
6
6
|
private _http;
|
|
7
7
|
validate(wkt: string): Observable<ValidationResult | string>;
|
|
8
8
|
dmpValidate(wkt: string): Observable<DMPValidationResult>;
|
|
9
|
+
split(lineStringWkt: string, polygons: PolygonRequestItem[]): Observable<SplitPolygonsResponse>;
|
|
10
|
+
merge(polygon1: PolygonRequestItem, polygon2: PolygonRequestItem): Observable<MergePolygonsResult>;
|
|
9
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<GeometryService, never>;
|
|
10
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<GeometryService>;
|
|
11
13
|
}
|
|
14
|
+
export interface MergePolygonsResult {
|
|
15
|
+
unionOk: boolean;
|
|
16
|
+
polygon?: PolygonResponseItem;
|
|
17
|
+
}
|
|
12
18
|
export interface ValidationResult {
|
|
13
19
|
wasCorrected: boolean;
|
|
14
20
|
correctedGeometries?: string[];
|
|
@@ -25,3 +31,19 @@ export interface DMPValidationErrorDto {
|
|
|
25
31
|
message: string;
|
|
26
32
|
ruleName: string;
|
|
27
33
|
}
|
|
34
|
+
export interface PolygonRequestItem {
|
|
35
|
+
id: string;
|
|
36
|
+
wkt: string;
|
|
37
|
+
}
|
|
38
|
+
export interface SplitPolygonsRequest {
|
|
39
|
+
linestring?: string;
|
|
40
|
+
polygonstring?: string;
|
|
41
|
+
polygons: PolygonRequestItem[];
|
|
42
|
+
}
|
|
43
|
+
export interface PolygonResponseItem {
|
|
44
|
+
id: string;
|
|
45
|
+
wkt: string;
|
|
46
|
+
}
|
|
47
|
+
export interface SplitPolygonsResponse {
|
|
48
|
+
polygons: PolygonResponseItem[];
|
|
49
|
+
}
|