@lbdudc/gp-gis-dsl 0.3.1 → 0.3.3
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.
- package/.claude/settings.local.json +7 -0
- package/grammar/.antlr/GISGrammar.interp +182 -0
- package/grammar/.antlr/GISGrammar.tokens +73 -0
- package/grammar/.antlr/GISGrammarBaseListener.java +579 -0
- package/grammar/.antlr/GISGrammarLexer.interp +241 -0
- package/grammar/.antlr/GISGrammarLexer.java +686 -0
- package/grammar/.antlr/GISGrammarLexer.tokens +73 -0
- package/grammar/.antlr/GISGrammarListener.java +459 -0
- package/grammar/.antlr/GISGrammarParser.java +2948 -0
- package/grammar/GISGrammar.g4 +313 -313
- package/package.json +1 -1
- package/parse-file.js +73 -0
- package/src/GISVisitorHelper.js +93 -93
- package/src/cli.js +34 -34
- package/src/error/ErrorListener.js +26 -26
- package/src/error/SyntaxGenericError.js +18 -18
- package/src/index.js +4 -1
- package/src/lib/GISGrammar.interp +181 -181
- package/src/lib/GISGrammarLexer.interp +241 -241
- package/src/lib/GISGrammarLexer.js +202 -202
- package/src/lib/GISGrammarListener.js +1 -1
- package/src/lib/GISGrammarParser.js +1 -1
- package/src/lib/GISGrammarVisitor.js +1 -1
- package/src/spl/GIS.js +234 -234
- package/src/spl/GeoJSONLayer.js +21 -21
- package/src/spl/GeoJSONLayerStyle.js +14 -14
- package/src/spl/TileLayer.js +16 -16
- package/src/spl/WMSLayer.js +30 -30
- package/src/spl/WMSStyle.js +13 -13
- package/src/spl/WMSStyleCustom.js +22 -22
- package/src/store.js +74 -74
- package/test-examples.js +120 -0
- package/test-output/agriculture.json +429 -0
- package/test-output/basic.json +315 -0
- package/test-output/complete.json +1259 -0
- package/test-output/emergency.json +755 -0
- package/test-output/environmental.json +591 -0
- package/test-output/gis.json +254 -0
- package/test-output/tourism.json +704 -0
- package/test-output/transportation.json +488 -0
- package/test-output/utilities.json +620 -0
- package/test-output/wms.json +110 -0
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
{
|
|
2
|
+
"features": [
|
|
3
|
+
"MapViewer",
|
|
4
|
+
"ChartViewer",
|
|
5
|
+
"Tools",
|
|
6
|
+
"DM_SpatialDatabase",
|
|
7
|
+
"DM_GenerationType",
|
|
8
|
+
"MV_MapServer",
|
|
9
|
+
"MV_Tools",
|
|
10
|
+
"MV_MapManagement",
|
|
11
|
+
"DM_SD_PostGIS",
|
|
12
|
+
"DM_GT_Sequence",
|
|
13
|
+
"MV_MM_MultipleMapViewer",
|
|
14
|
+
"MV_MM_MMV_MapSelectorInMapViewer",
|
|
15
|
+
"MV_MM_MMV_MapSelectorInMenuElement",
|
|
16
|
+
"MV_MS_GeoServer",
|
|
17
|
+
"GUI_Lists",
|
|
18
|
+
"GUI_L_FormLink",
|
|
19
|
+
"GUI_L_F_BasicSearch",
|
|
20
|
+
"GUI_L_Filterable",
|
|
21
|
+
"GUI_L_Sortable",
|
|
22
|
+
"GUI_L_LocateInMap",
|
|
23
|
+
"GUI_L_ViewListAsMap",
|
|
24
|
+
"MV_ContextInformation",
|
|
25
|
+
"MV_CI_Scale",
|
|
26
|
+
"MV_CI_Map",
|
|
27
|
+
"MV_CI_CenterCoordinates",
|
|
28
|
+
"MV_CI_Dimensions",
|
|
29
|
+
"MV_DetailOnClick",
|
|
30
|
+
"MV_LayerManagement",
|
|
31
|
+
"MV_LM_CenterViewOnLayer",
|
|
32
|
+
"MV_LM_Order",
|
|
33
|
+
"MV_LM_Opacity",
|
|
34
|
+
"MV_LM_HideLayer",
|
|
35
|
+
"MV_LM_Style",
|
|
36
|
+
"MV_LM_ExternalLayer",
|
|
37
|
+
"MV_LM_StylePreview",
|
|
38
|
+
"MV_T_E_Type",
|
|
39
|
+
"MV_T_E_F_URL",
|
|
40
|
+
"MV_T_E_F_PDF",
|
|
41
|
+
"MV_T_E_SetScale",
|
|
42
|
+
"MV_T_E_ShowLegend",
|
|
43
|
+
"MV_T_InformationMode",
|
|
44
|
+
"MV_T_MeasureControl",
|
|
45
|
+
"MV_T_ZoomWindow",
|
|
46
|
+
"MV_T_ViewMapAsList",
|
|
47
|
+
"DM_DataInput",
|
|
48
|
+
"DM_DI_DataFeeding",
|
|
49
|
+
"DM_DI_DF_Shapefile",
|
|
50
|
+
"T_GIS",
|
|
51
|
+
"T_EntitiesInformation",
|
|
52
|
+
"D_C_Postgres",
|
|
53
|
+
"D_C_Geoserver",
|
|
54
|
+
"D_C_Nginx"
|
|
55
|
+
],
|
|
56
|
+
"basicData": {
|
|
57
|
+
"name": "agriculture_system"
|
|
58
|
+
},
|
|
59
|
+
"data": {
|
|
60
|
+
"dataModel": {
|
|
61
|
+
"entities": [
|
|
62
|
+
{
|
|
63
|
+
"name": "Farm",
|
|
64
|
+
"properties": [
|
|
65
|
+
{
|
|
66
|
+
"name": "id",
|
|
67
|
+
"class": "Long (autoinc)",
|
|
68
|
+
"pk": true,
|
|
69
|
+
"required": true,
|
|
70
|
+
"unique": true
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "name",
|
|
74
|
+
"class": "String",
|
|
75
|
+
"required": true
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "owner",
|
|
79
|
+
"class": "String",
|
|
80
|
+
"required": true
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "totalArea",
|
|
84
|
+
"class": "Double"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "registrationDate",
|
|
88
|
+
"class": "LocalDate"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "boundary",
|
|
92
|
+
"class": "MultiPolygon"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "parcels",
|
|
96
|
+
"class": "Parcel",
|
|
97
|
+
"owner": false,
|
|
98
|
+
"bidirectional": "farm",
|
|
99
|
+
"multiple": true,
|
|
100
|
+
"required": true
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "irrigationSystems",
|
|
104
|
+
"class": "IrrigationSystem",
|
|
105
|
+
"owner": false,
|
|
106
|
+
"bidirectional": "farm",
|
|
107
|
+
"multiple": true,
|
|
108
|
+
"required": true
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"displayString": "$name"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "Parcel",
|
|
115
|
+
"properties": [
|
|
116
|
+
{
|
|
117
|
+
"name": "id",
|
|
118
|
+
"class": "Long (autoinc)",
|
|
119
|
+
"pk": true,
|
|
120
|
+
"required": true,
|
|
121
|
+
"unique": true
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "code",
|
|
125
|
+
"class": "String",
|
|
126
|
+
"required": true,
|
|
127
|
+
"unique": true
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "cropType",
|
|
131
|
+
"class": "String",
|
|
132
|
+
"required": true
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "area",
|
|
136
|
+
"class": "Double"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "soilType",
|
|
140
|
+
"class": "String"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "boundary",
|
|
144
|
+
"class": "MultiPolygon"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "farm",
|
|
148
|
+
"class": "Farm",
|
|
149
|
+
"owner": true,
|
|
150
|
+
"bidirectional": "parcels",
|
|
151
|
+
"multiple": false,
|
|
152
|
+
"required": true
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "soilsamples",
|
|
156
|
+
"class": "SoilSample",
|
|
157
|
+
"owner": false,
|
|
158
|
+
"bidirectional": "parcel",
|
|
159
|
+
"multiple": true,
|
|
160
|
+
"required": false
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "cropyields",
|
|
164
|
+
"class": "CropYield",
|
|
165
|
+
"owner": false,
|
|
166
|
+
"bidirectional": "parcel",
|
|
167
|
+
"multiple": true,
|
|
168
|
+
"required": false
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"displayString": "$code"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "IrrigationSystem",
|
|
175
|
+
"properties": [
|
|
176
|
+
{
|
|
177
|
+
"name": "id",
|
|
178
|
+
"class": "Long (autoinc)",
|
|
179
|
+
"pk": true,
|
|
180
|
+
"required": true,
|
|
181
|
+
"unique": true
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "name",
|
|
185
|
+
"class": "String"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "type",
|
|
189
|
+
"class": "String"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "capacity",
|
|
193
|
+
"class": "Double"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "status",
|
|
197
|
+
"class": "String"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"name": "location",
|
|
201
|
+
"class": "Point"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"name": "network",
|
|
205
|
+
"class": "MultiLineString"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "farm",
|
|
209
|
+
"class": "Farm",
|
|
210
|
+
"owner": true,
|
|
211
|
+
"bidirectional": "irrigationSystems",
|
|
212
|
+
"multiple": false,
|
|
213
|
+
"required": false
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"displayString": "$name"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "SoilSample",
|
|
220
|
+
"properties": [
|
|
221
|
+
{
|
|
222
|
+
"name": "id",
|
|
223
|
+
"class": "Long (autoinc)",
|
|
224
|
+
"pk": true,
|
|
225
|
+
"required": true,
|
|
226
|
+
"unique": true
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "sampleDate",
|
|
230
|
+
"class": "LocalDate",
|
|
231
|
+
"required": true
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "pH",
|
|
235
|
+
"class": "Double"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "nitrogen",
|
|
239
|
+
"class": "Double"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"name": "phosphorus",
|
|
243
|
+
"class": "Double"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "potassium",
|
|
247
|
+
"class": "Double"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "location",
|
|
251
|
+
"class": "Point"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "parcel",
|
|
255
|
+
"class": "Parcel",
|
|
256
|
+
"owner": true,
|
|
257
|
+
"bidirectional": "soilsamples",
|
|
258
|
+
"multiple": false,
|
|
259
|
+
"required": true
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "CropYield",
|
|
265
|
+
"properties": [
|
|
266
|
+
{
|
|
267
|
+
"name": "id",
|
|
268
|
+
"class": "Long (autoinc)",
|
|
269
|
+
"pk": true,
|
|
270
|
+
"required": true,
|
|
271
|
+
"unique": true
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "year",
|
|
275
|
+
"class": "Integer",
|
|
276
|
+
"required": true
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"name": "season",
|
|
280
|
+
"class": "String"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"name": "yieldAmount",
|
|
284
|
+
"class": "Double"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "harvestDate",
|
|
288
|
+
"class": "LocalDate"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"name": "parcel",
|
|
292
|
+
"class": "Parcel",
|
|
293
|
+
"owner": true,
|
|
294
|
+
"bidirectional": "cropyields",
|
|
295
|
+
"multiple": false,
|
|
296
|
+
"required": true
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
"enums": []
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"mapViewer": {
|
|
305
|
+
"maps": [
|
|
306
|
+
{
|
|
307
|
+
"name": "agriculture",
|
|
308
|
+
"label": "Agricultural Management",
|
|
309
|
+
"sortable": true,
|
|
310
|
+
"layers": [
|
|
311
|
+
{
|
|
312
|
+
"name": "satellite",
|
|
313
|
+
"baseLayer": true,
|
|
314
|
+
"selected": true
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "farmLayer",
|
|
318
|
+
"baseLayer": false,
|
|
319
|
+
"selected": true
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"name": "parcelLayer",
|
|
323
|
+
"baseLayer": false,
|
|
324
|
+
"selected": true
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "irrigationLayer",
|
|
328
|
+
"baseLayer": false,
|
|
329
|
+
"selected": true
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"name": "soilSampleLayer",
|
|
333
|
+
"baseLayer": false,
|
|
334
|
+
"selected": true
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
],
|
|
339
|
+
"layers": [
|
|
340
|
+
{
|
|
341
|
+
"name": "satellite",
|
|
342
|
+
"type": "tilelayer",
|
|
343
|
+
"label": "Satellite Imagery",
|
|
344
|
+
"url": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "farmLayer",
|
|
348
|
+
"type": "wms",
|
|
349
|
+
"label": "Farms",
|
|
350
|
+
"list": "Farm",
|
|
351
|
+
"layers": [
|
|
352
|
+
"Farm"
|
|
353
|
+
],
|
|
354
|
+
"availableStyles": [
|
|
355
|
+
"farmLayerStyle"
|
|
356
|
+
],
|
|
357
|
+
"defaultStyles": "farmLayerStyle"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"name": "parcelLayer",
|
|
361
|
+
"type": "geojson",
|
|
362
|
+
"label": "Parcels",
|
|
363
|
+
"entityName": "Parcel",
|
|
364
|
+
"editable": true,
|
|
365
|
+
"defaultStyle": "parcelLayerStyle",
|
|
366
|
+
"availableStyles": [
|
|
367
|
+
"parcelLayerStyle"
|
|
368
|
+
]
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"name": "irrigationLayer",
|
|
372
|
+
"type": "geojson",
|
|
373
|
+
"label": "Irrigation Systems",
|
|
374
|
+
"entityName": "IrrigationSystem",
|
|
375
|
+
"editable": true,
|
|
376
|
+
"defaultStyle": "irrigationLayerStyle",
|
|
377
|
+
"availableStyles": [
|
|
378
|
+
"irrigationLayerStyle"
|
|
379
|
+
]
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"name": "soilSampleLayer",
|
|
383
|
+
"type": "geojson",
|
|
384
|
+
"label": "Soil Samples",
|
|
385
|
+
"entityName": "SoilSample",
|
|
386
|
+
"editable": true,
|
|
387
|
+
"defaultStyle": "soilSampleLayerStyle",
|
|
388
|
+
"availableStyles": [
|
|
389
|
+
"soilSampleLayerStyle"
|
|
390
|
+
]
|
|
391
|
+
}
|
|
392
|
+
],
|
|
393
|
+
"styles": [
|
|
394
|
+
{
|
|
395
|
+
"name": "farmLayerStyle",
|
|
396
|
+
"type": "WMSLayerStyle",
|
|
397
|
+
"geometryType": "POLYGON",
|
|
398
|
+
"fillColor": "#90EE90",
|
|
399
|
+
"strokeColor": "#228B22",
|
|
400
|
+
"fillOpacity": 0.6,
|
|
401
|
+
"strokeOpacity": 1
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"name": "parcelLayerStyle",
|
|
405
|
+
"type": "GeoJSONLayerStyle",
|
|
406
|
+
"fillColor": "#FFFFE0",
|
|
407
|
+
"strokeColor": "#FFD700",
|
|
408
|
+
"fillOpacity": "0.5",
|
|
409
|
+
"strokeOpacity": "0.8"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"name": "irrigationLayerStyle",
|
|
413
|
+
"type": "GeoJSONLayerStyle",
|
|
414
|
+
"fillColor": "#4169E1",
|
|
415
|
+
"strokeColor": "#000080",
|
|
416
|
+
"fillOpacity": "0.7",
|
|
417
|
+
"strokeOpacity": "0.9"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "soilSampleLayerStyle",
|
|
421
|
+
"type": "GeoJSONLayerStyle",
|
|
422
|
+
"fillColor": "#8B4513",
|
|
423
|
+
"strokeColor": "#654321",
|
|
424
|
+
"fillOpacity": "0.8",
|
|
425
|
+
"strokeOpacity": "1.0"
|
|
426
|
+
}
|
|
427
|
+
]
|
|
428
|
+
}
|
|
429
|
+
}
|