-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
mapfileTypes.ts
190 lines (166 loc) · 3.93 KB
/
mapfileTypes.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
/**
* The MapfileSymbolset is the root interface of a Symbolset.
*/
export interface MapfileSymbolset {
symbols: MapfileSymbol[];
}
/**
* The Mapfile is the root interface of a Mapfile.
*/
export interface Mapfile {
map: MapfileMap;
}
interface MapfileMap {
web: MapfileWeb;
layers: MapfileLayer[];
reference: MapfileReference;
projection: MapfileProjection;
querymap: MapfileQueryMap;
scalebar: MapfileScaleBar;
symbols: string[] | MapfileSymbol[];
legend: MapfileLegend;
/**
* Filename of the symbolset to use. Can be a path relative to the mapfile, or a full path.
*/
symbolset?: string;
/**
* Filename of fontset file to use. Can be a path relative to the mapfile, or a full path.
*/
fontset?: string;
/**
* A map file may have zero, one or more OUTPUTFORMAT object declarations
*/
outputformats?: MapfileOutputformat[];
}
interface MapfileWeb {
validation: MapfileValidation;
metadata: MapfileMetadata;
}
export interface MapfileLayer {
labelmaxscaledenom: number;
labelminscaledenom: number;
type: string;
classitem: string;
labelitem: string;
name: string;
group: string;
cluster: MapfileCluster;
validation: MapfileValidation;
grid: MapfileGrid;
projection: MapfileProjection;
scaletoken: MapfileScaleToken;
composite: MapfileComposite;
join: MapfileJoin;
metadata: MapfileMetadata;
classes: MapfileClass[];
feature: MapfileFeature;
processings: string[];
}
interface MapfileReference {}
interface MapfileProjection {}
interface MapfileQueryMap {}
interface MapfileScaleBar {
label: MapfileLabel;
}
export interface MapfileSymbol {
type: string;
points: string;
/**
* Image (GIF or PNG) to use as a marker or brush for type pixmap symbols.
*/
image?: string;
anchorpoint: string;
name: string;
}
interface MapfileLegend {
label: MapfileLabel;
}
interface MapfileValidation {}
interface MapfileMetadata {}
interface MapfileCluster {}
interface MapfileGrid {}
interface MapfileScaleToken {
values: MapfileScaleTokenValue[];
}
interface MapfileComposite {
/**
* Sets the opacity level of all classed pixels for a given layer.
*/
opacity: number;
}
interface MapfileJoin {}
export interface MapfileClass {
minscaledenom?: number;
maxscaledenom?: number;
text: string;
expression: string;
name: string;
styles: MapfileStyle[];
validation: MapfileValidation;
leader: MapfileLeader;
labels: MapfileLabel[];
}
interface MapfileFeature {
points: string;
}
export interface MapfileLabel {
maxscaledenom: number;
minscaledenom: number;
text: string;
angle: number;
color: string;
outlinecolor: string;
outlinewidth: number;
styles?: MapfileStyle[];
}
interface MapfileScaleTokenValue {}
export interface MapfileStyle {
/**
* Height, in layer SIZEUNITS, of the symbol/pattern to be used.
*/
size: number;
/**
* WIDTH refers to the thickness of line work drawn, in layer SIZEUNITS. Default is 1.0.
*/
width: number;
/**
* Sets the line cap type for lines. Default is round.
*/
linecap?: 'butt' | 'round' | 'square';
/**
* Sets the line join type for lines. Default is round.
*/
linejoin?: 'bevel' | 'round' | 'miter' | 'none';
initialgap: number;
symbol: MapfileSymbol;
outlinecolor: string;
outlinewidth: number;
/**
* Used to define a dash pattern for line work (lines, polygon outlines, hatch lines, …).
*/
pattern: string;
color: string;
opacity: number;
angle: number;
minscaledenom: number;
maxscaledenom: number;
/**
* Defines two colors to correspond to the low and high ends of the DATARANGE values.
*/
colorrange: string;
/**
* Defines two values, a low value and a high value, that are mapped to the colorrange.
*/
datarange: string;
}
interface MapfileLeader {
style: MapfileStyle;
}
interface MapfileOutputformat {
name: string;
driver: string;
mimetype: string;
imagemode: string;
extension: string;
fromatoptions: string[];
}