forked from spatialillusions/milgraphics
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.d.ts
99 lines (88 loc) · 3.07 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import { Feature } from "ol";
import Geometry from "ol/geom/Geometry";
import { geometryConverterObject } from "./src/geometryconverter";
import getproperties from "./src/graphic/getproperties";
interface IEditor {
geometry: {
type: string;
};
properties: object;
description: {
base64: string;
};
}
export const editor: {
[x: string]: IEditor & IEditor[];
}
type GeometryType = {
LineString: string;
MultiLineString: string;
Polygon: string;
Point: string;
}
type GeometryOptions = {
additionalInformation?:string;
administrator?: string;
altitudeDepth?: string;
altitudeDepth1?:string,
bearingSpacing?: number;
bearingWidth?: number;
distance?: number;
dtg?: string;
dtg1?: string;
fill?: string;
firingPosition?: string;
name?:string;
sidc: string;
spaceBetween?:number;
uniqueDesignation?: string;
weaponSystemType?: string;
w?: string;
w1?: string;
}
type FeatureColection = {
type: string;
features: Feature<Geometry>[];
}
export class GraphicsLayer {
constructor(
feature: FeatureColection
)
asOpenLayers(): Feature<Geometry>[];
asCesium(): Cesium.EntityCollection;
}
export class Graphic {
constructor(
feature: FeatureColection
)
getProperties(): ReturnType<typeof getproperties>;
isConverted(): boolean;
}
export namespace format {
export function GeoJSON(data: object, mapping?: object): FeatureColection;
export function ArmyXML(xml: string): FeatureColection;
export function NVG(data: any): FeatureColection;
export function SLF(xml: string): FeatureColection;
}
type GeometryObject = {
geometry: Geometry;
annotation?: Geometry;
}
type PointType = [number, number];
export namespace geometry {
export function bearingBetween(point1: PointType, point2: PointType): number;
export function circle(feature: Feature<Geometry>): GeometryObject;
export function circleCorridorPolygon(feature: Feature<Geometry>): GeometryObject;
export function corridor(feature: Feature<Geometry>): GeometryObject;
export function distanceBetween(point1: PointType, point2: PointType): number;
export function isClockwise(points: PointType): boolean;
export function pointBetween(point1: PointType, point2: PointType, fractionalDistance: number): PointType;
export function pointBetweenAbsolute(point1: PointType, point2: PointType, absoluteDistance: number): PointType;
export function rectangle(feature: Feature<Geometry>): GeometryObject;
export function toDistanceBearing(point1: PointType, distance: number, bearing: number): GeometryObject;
export function testGeometry(point1: PointType, point2: PointType, fractionalDistance: number): PointType;
export function addAnnotation(point: PointType, text: string, options: { angle: number; align: string }): Feature<Geometry>;
export function getLeftPoint(coordinates: [PointType[]]): PointType;
export function labeledLine(feature: Feature<Geometry>, text: string): GeometryObject;
}
export type geometryConverter = typeof geometryConverterObject;