-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathlayer-tile-config.json
More file actions
761 lines (761 loc) · 29.4 KB
/
layer-tile-config.json
File metadata and controls
761 lines (761 loc) · 29.4 KB
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
{
"tabs": [
{
"name": "Core",
"rows": [
{
"forceHeight": "64px",
"components": [
{
"field": "type",
"name": "Layer Type",
"description": "",
"type": "dropdown",
"width": 2,
"options": [
"data",
"header",
"image",
"model",
"query",
"tile",
"vector",
"vectortile",
"velocity"
]
},
{
"field": "name",
"name": "Layer Name",
"description": "",
"type": "textnotrim",
"width": 4
},
{
"field": "visibility",
"name": "Initially On",
"description": "",
"type": "checkbox",
"width": 2,
"defaultChecked": false
},
{
"type": "map",
"width": 4,
"height": "615px"
}
]
},
{
"subname": "Source",
"components": [
{
"field": "sourceType",
"name": "Source Type",
"description": "What the 'Source URL' is meant to reference. See the 'Source URL' description for more.",
"type": "dropdown",
"width": 2,
"options": ["url", "COG", "stac-collection"]
},
{
"field": "url",
"name": "Source URL",
"description": "<strong>• URL: '{url}'</strong> A path that points to a tileset, service, or file. If the path is relative, it will be relative to the mission's /Missions/{mission} directory.\n\t<strong>• URL (TMS):</strong> Tile Map Service tiles are 256x256 sized images hierarchically organized by zoom level and referenced with x and y coordinates. These are the standard format for web tiles and are the format that MMGIS's auxiliary tiling scripts output. Append /{z}/{x}/{y}.png to your URL.\n\t<strong>• URL (WMTS):</strong> Web Map Tile Service is the same exact concept as TMS but it has an inverted Y-axis. Just like TMS, append /{z}/{x}/{y}.png to your URL.\n\t<strong>• URL (WMS):</strong> Web Map Service tiles are a popular way of publishing maps by professional GIS software. This format is similar to the previous two formats, but more generic and not so well optimized for use in web maps. A WMS image is defined by the coordinates of its corners. A layer (or list of layers) should be provided as an options by appending ?layers=<your_layer_name><,another_if_you _want> to your URL. To override WMS parameters append &<wms_param>=<value> again to the URL after the 'layers' parameters. If desired, use &TILESIZE= to change the tile size of the request and layer away from the default of 256. Example URL: http://ows.mundialis.de/services/service?layers=TOPO-WMS,OSM-Overlay-WMS\n\t<strong>• URL (GeoTiff): '{url_to_tif.tif}'</strong> A URL to the .tif. Note that this is not tiled and clients will download the entire file.\n<strong>• COG: '{url_to_cog.tif}'</strong> A URL to the .tif and make sure the 'Use TiTiler' option is enabled.\n<strong>• 'STAC-COLLECTION: '{name_of_an_mmgis_stac_collection}'</strong> - If titiler-pgstac is available, the tileset is the mosaicked COGs within the specified STAC collection.",
"type": "text",
"width": 6
}
]
},
{
"components": [
{
"field": "tileformat",
"name": "Tile Format",
"description": "See URL description above. If a COG and 'Use TiTiler' is enabled, this format is overrided to be 'WMTS'.",
"type": "dropdown",
"width": 4,
"options": ["tms", "wmts", "wms"]
},
{
"field": "controlled",
"name": "Controlled",
"description": "Whether external code (such as when MMGIS is in an iframe), manages this layer through thr JavaScript API.",
"type": "checkbox",
"width": 2,
"defaultChecked": false
},
{
"field": "initialOpacity",
"name": "Initial Opacity",
"description": "0 (transparent) to 1 (opaque)",
"type": "number",
"min": 0,
"width": 2
}
]
},
{
"components": [
{
"field": "minZoom",
"name": "Minimum Zoom",
"description": "The lowest (smallest number) zoom level of the tile set.\nNote: This field can be automatically populate with 'Populate from XML'. 'Populate from XML' uses looks for a tilemapresource.xml in the tileset directory specified by the URL field.",
"type": "number",
"min": 0,
"step": 1,
"width": 3
},
{
"field": "maxNativeZoom",
"name": "Maximum Native Zoom",
"description": "The highest (largest number) zoom level of the tile set.\nNote: This field can be automatically populate with 'Populate from XML'. 'Populate from XML' uses looks for a tilemapresource.xml in the tileset directory specified by the URL field.",
"type": "number",
"min": 0,
"step": 1,
"width": 2
},
{
"field": "maxZoom",
"name": "Maximum Zoom",
"description": "The highest (largest number) zoom level to see in MMGIS. This value is at least as high as Maximum Native Zoom. This allows zooms level higher than that of the tileset. Instead of rendering new tile image, it scales them in instead.",
"type": "number",
"min": 0,
"step": 1,
"width": 3
}
]
},
{
"name": "Cloud-Optimized GeoTiffs (COG)",
"components": [
{
"field": "throughTileServer",
"name": "Use TiTiler",
"description": "Uses the TiTiler service to serve tiles if URL is a Cloud-Optimized GeoTiff (COG). TiTiler must be configured via the .env.",
"type": "switch",
"width": 3,
"defaultChecked": false
},
{
"field": "tileMatrixSet",
"name": "Tile Matrix Set",
"description": "If using TiTiler or if using a 'stac-collection:{collection}' URL, specify the projection for which to serve the tiles. Defaults to 'WebMercatorQuad'.",
"type": "dropdown",
"width": 5,
"options": "{{TILE_MATRIX_SETS}}"
},
{
"field": "cogResampling",
"name": "Resampling Method",
"description": "The resampling method for generated tiles through TiTiler. Defaults to 'nearest'.",
"type": "dropdown",
"width": 4,
"options": [
"nearest",
"bilinear",
"cubic",
"cubic_spline",
"lanczos",
"average",
"mode",
"gauss",
"rms"
]
}
]
},
{
"components": [
{
"field": "cogBands",
"name": "Tile Bands",
"description": "Which bands from the COG from which to generate tiles. Defaults to '1,2,3' as RGB or '1' if it's a Transformed 32-bit COG. Can be a single number or a comma-separated list of numbers. Order matters.",
"type": "textarray",
"width": 4
},
{
"field": "cogBandsQuery",
"name": "Query Bands",
"description": "Which bands from the COG upon which to perform queries. Defaults to value of 'Tile Bands'.",
"type": "textarray",
"width": 4
}
]
},
{
"subname": "32-bit COGs",
"components": [
{
"field": "cogTransform",
"name": "Transform 32-bit COG",
"description": "Enable rescaling and coloring 32-bit COGs on the fly. Will use TiTiler.",
"type": "switch",
"width": 3,
"defaultChecked": false
},
{
"field": "cogMin",
"name": "Minimum Pixel Data Value",
"description": "If using TiTiler, STAC and 32-bit COGs, the default minimum value for which to rescale.",
"type": "number",
"width": 2
},
{
"field": "cogMax",
"name": "Maximum Pixel Data Value",
"description": "If using TiTiler, STAC and 32-bit COGs, the default maximum value for which to rescale.",
"type": "number",
"width": 2
},
{
"field": "cogUnits",
"name": "Units",
"description": "Units string by which to suffix values. For instance if the units are meters, use 'm' so that values are displayed as '100m'.",
"type": "textnotrim",
"width": 2
},
{
"field": "cogColormap",
"name": "Colormap",
"description": "",
"type": "colordropdown",
"width": 3,
"options": "{{COLORMAP_NAMES}}"
}
]
},
{
"name": "Digital Elevation Model (DEM) Tiles",
"components": [
{
"field": "demtileurl",
"name": "DEM Tile URL",
"description": "A file path like URL but pointing to a Digital Elevation Map tileset generated by auxillary/1bto4b/rasterstotiles1bto4b.py This is responsible for 3D data in the globe. It would be ideal if this tileset can match the extents of its corresponding raster and has either no nodata or has nodata far lower than that of its lowest point.",
"type": "text",
"width": 10
},
{
"field": "demparser",
"name": "DEM Parser",
"description": "",
"type": "dropdown",
"width": 2,
"options": ["rgba", "tif"]
}
]
},
{
"name": "Other",
"components": [
{
"field": "boundingBox",
"name": "Bounding Box",
"description": "minx,miny,maxx,maxy",
"type": "textarray",
"width": 12
}
]
},
{
"name": "Actions",
"components": [
{
"name": "Populate Fields From tilemapresource.xml or from cog/info",
"description": "If the above URL is relative to the Missions/{mission} directory and the tileset contains a tilemapresource.xml within it, queries that xml and auto-fills the 'Minimum Zoom', 'Maximum Native Zoom' and 'Bounding Box' fields above. If it is a COG and TiTiler is true, the COG's data will be queried instead.",
"type": "button",
"action": "tile-populate-from-x",
"width": 6
}
]
}
]
},
{
"name": "Style",
"rows": [
{
"name": "Filters",
"components": [
{
"field": "style.brightness",
"name": "Brightness",
"description": "The brightness filter applies a linear multiplier over the tile layer, making it appear brighter or darker. A value of 0 renders a completely black image. A value of 1 leaves the image unchanged. A value greater than 1 brightens. Default 1.",
"type": "slider",
"default": 1,
"min": 0,
"max": 3,
"step": 0.05,
"width": 3
},
{
"field": "style.contrast",
"name": "Contrast",
"description": "The contrast filter adjusts the contrast of the tile layer. A value of 0 renders a completely gray image. A value of 1 leaves the image unchanged. A value greater than 1 exaggerates the contrast. Default 1.",
"type": "slider",
"default": 1,
"min": 0,
"max": 4,
"step": 0.05,
"width": 3
},
{
"field": "style.saturation",
"name": "Saturation",
"description": "The saturation filter super-saturates or desaturates the colors of the tile layer. A value of 0 renders a greyscale image. A value of 1 leaves the image unchanged. A value greater than 1 super-saturates. Default 1.",
"type": "slider",
"default": 1,
"min": 0,
"max": 4,
"step": 0.05,
"width": 3
},
{
"field": "style.blend",
"name": "Blend",
"description": "Specifies how this tile layer should blend with the tile layers beneath it. Default 'none'.",
"type": "dropdown",
"width": 3,
"options": ["none", "color", "overlay"]
}
]
}
]
},
{
"name": "Time",
"rows": [
{
"name": "Time",
"components": [
{
"field": "time.enabled",
"name": "Time Enabled",
"description": "True if the layer is time enabled. URLs that contain {time} will be dynamically replaced by their set values when the layer is fetched.",
"type": "switch",
"width": 3,
"defaultChecked": false
},
{
"field": "time.type",
"name": "Time Type",
"description": "Whether the layer should use global time values or function independently with its own time values.",
"type": "dropdown",
"width": 4,
"options": ["requery", "local"]
}
]
},
{
"components": [
{
"field": "time.format",
"name": "Time Format",
"description": "The string format to be used in the URL for {time}. Defaults to %Y-%m-%dT%H:%M:%SZ",
"type": "text",
"width": 6
},
{
"field": "time.compositeTile",
"name": "Composite Time Tiles",
"description": "When using MMGIS-served time tiles (time enabled, {t} in the url, tiles served under /Missions in the format described in Time_Tiles), whether to composite/merge each tile with with the other tiles are the same location across the time query. This is useful when Time Tile data is sparse. It is a more expensive operation. If your Time Tiles are complete (no alpha in a tile), leave this False as merging tiles historically would have no effect.",
"type": "checkbox",
"width": 6,
"defaultChecked": false
}
]
},
{
"components": [
{
"field": "time.refreshIntervalEnabled",
"name": "Refresh Interval Enabled",
"description": "If 'Time Enabled' and 'Refresh Interval Enabled', this layer will automatically refresh/requery its data every 'Refresh Every N Seconds'. This is useful when the layer's data updates at some uniform cadence. Be aware that this may be an expensive operation depending on the amount of data a layer needs and the number of layers that have this enabled.",
"type": "switch",
"width": 5,
"defaultChecked": false
},
{
"field": "time.refreshIntervalAmount",
"name": "Refresh Every N Seconds",
"description": "If 'Time Enabled' and 'Refresh Interval Enabled', this layer will automatically refresh/requery its data every n seconds. If null or 0, defaults to 60.",
"type": "number",
"min": 1,
"width": 3
}
]
}
]
},
{
"name": "Legend",
"rows": [
{
"name": "Legend",
"components": [
{
"new": true,
"field": "legend",
"name": "Legend From URL",
"description": "A URL to a .csv with the following header: 'color,strokecolor,shape,value'. If the path is relative, it will be relative to the mission's directory. This legend is overridden if a legend is also configured below.",
"type": "text",
"width": 12
}
]
},
{
"components": [
{
"field": "variables.legend",
"name": "Legend",
"description": "Configures a legend for the layer. The Legend Tool renders symbologies and gradient scales for any properly configured layer that is on.",
"type": "objectarray",
"width": 12,
"object": [
{
"field": "color",
"name": "Fill Color",
"description": "A color for the main fill of the symbol.",
"type": "colorpicker",
"width": 2
},
{
"field": "strokecolor",
"name": "Border Color",
"description": "A stroke/border color. Note that 'discreet' and 'continuous' shapes have no borders.",
"type": "colorpicker",
"width": 2
},
{
"field": "shape",
"name": "Shape",
"description": "The symbol for which to us for this legend entry. Discreet and continuous describe scales. These scales are broken into groups by a change in shape value. For instance, 'discreet, discreet, discreet, circle, discreet, discreet' represents a discreet scales of three colors, a circle and then a discreet scale of two colors.",
"type": "dropdown",
"width": 5,
"options": [
"circle",
"square",
"rect",
"triangle",
"continuous",
"discreet"
]
},
{
"field": "value",
"name": "Label",
"description": "A label description for this legend entry.",
"type": "text",
"width": 3
}
]
}
]
}
]
},
{
"name": "Interface",
"rows": [
{
"name": "Interface",
"subname": "Key Bindings",
"components": [
{
"field": "variables.shortcutSuffix",
"name": "Alt + {letter} Toggle Shortcut",
"description": "A single letter to 'ALT + {letter}' toggle the layer on and off. Please verify that your chosen shortcut does not conflict with other system or browser-level keyboard shortcuts.",
"type": "text",
"width": 6
}
]
},
{
"subname": "Downloads",
"components": [
{
"field": "variables.downloadURL",
"name": "Download URL",
"description": "Provides a menu option for users to download the specified source data file for the layer.",
"type": "text",
"width": 12
}
]
}
]
},
{
"name": "Information",
"rows": [
{
"name": "Information",
"subname": "Layer Tags",
"subdescription": "Assign tags to this layer so that they may be searched upon through the LayersTool. A category may be specified with the following pattern: 'category:tag'",
"components": [
{
"field": "tags.0",
"name": "Tag",
"description": "",
"type": "text",
"width": 2
},
{
"field": "tags.1",
"name": "Tag",
"description": "",
"type": "text",
"width": 2
},
{
"field": "tags.2",
"name": "Tag",
"description": "",
"type": "text",
"width": 2
},
{
"field": "tags.3",
"name": "Tag",
"description": "",
"type": "text",
"width": 2
},
{
"field": "tags.4",
"name": "Tag",
"description": "",
"type": "text",
"width": 2
},
{
"field": "tags.5",
"name": "Tag",
"description": "",
"type": "text",
"width": 2
}
]
},
{
"components": [
{
"field": "tags.6",
"name": "Tag",
"description": "",
"type": "text",
"width": 2
},
{
"field": "tags.7",
"name": "Tag",
"description": "",
"type": "text",
"width": 2
},
{
"field": "tags.8",
"name": "Tag",
"description": "",
"type": "text",
"width": 2
},
{
"field": "tags.9",
"name": "Tag",
"description": "",
"type": "text",
"width": 2
},
{
"field": "tags.10",
"name": "Tag",
"description": "",
"type": "text",
"width": 2
},
{
"field": "tags.11",
"name": "Tag",
"description": "",
"type": "text",
"width": 2
}
]
},
{
"subname": "Description",
"subdescription": "A freeform markdown description of the layer. In the LayersTool, users may click the information icon beside the layer's name to view this information.",
"components": [
{
"field": "description",
"name": "Description",
"description": "",
"type": "markdown",
"width": 12
}
]
}
]
},
{
"name": "Tool - Identifier",
"rows": [
{
"name": "Tool: Identifier",
"components": [
{
"field": "variables.tools.identifier.data",
"name": "Data",
"description": "Configure this layer for use with the IdentifierTool. Configuring the tool within this layer may override configurations of this layer within the tool itself in the Tools Tab.",
"type": "objectarray",
"width": 12,
"object": [
{
"field": "url",
"name": "URL to .tif",
"description": "This can be a relative path to a file under the Mission name or a full url path. The former is preferred is the file is large. Can use '{starttime}' and '{endtime}' if the layer is time enabled. If this field is left empty, the Identifier Tool will try to best-match the hovered-over pixel color with this layer's legend (if any).",
"type": "text",
"width": 12
},
{
"field": "bands",
"name": "Bands",
"description": "Number of bands from which to query.",
"type": "number",
"min": 0,
"step": 1,
"width": 2
},
{
"field": "sigfigs",
"name": "SigFigs",
"description": "Number of significant figures to use after the decimal of returned values.",
"type": "number",
"min": 0,
"step": 1,
"width": 2
},
{
"field": "unit",
"name": "Unit",
"description": "A string that is appended to your returned value. e.g. ' m' would be appended on a raw value ('41') and show '41 m'. If it was 'm', it would return '41m', without a space.",
"type": "text",
"width": 2
},
{
"field": "scalefactor",
"name": "Scale Factor",
"description": "A number for which to multiply the raw value by for display purposes only. Useful, for instance, if the underlying dataset is in units that are off by factor's of 10 from what's desired to be shown to users.",
"type": "number",
"width": 2
},
{
"field": "timeFormat",
"name": "Time Format",
"description": "A string for formatting the injected '{starttime}' and '{endtime}' in the url. See syntax in <a target='_blank' href='https://d3js.org/d3-time-format#locale_format'>https://d3js.org/d3-time-format#locale_format</a>",
"type": "text",
"width": 4
}
]
}
]
}
]
},
{
"name": "Tool - Measure",
"rows": [
{
"name": "Tool: Measure",
"components": [
{
"field": "variables.tools.measure.layerDems",
"name": "Layer Specific DEMs",
"description": "Object of layer names and the paths to their DEMs. Users may switch between DEMs to profile via a dropdown. The dropdown only renders if there is more than one DEM configured overall. Configuring the tool within this layer may override configurations of this layer within the tool itself in the Tools Tab.",
"type": "objectarray",
"width": 12,
"object": [
{
"field": "layer",
"name": "Layer Name",
"description": "",
"type": "text",
"width": 4
},
{
"field": "dem",
"name": "DEM Path",
"description": "",
"type": "text",
"width": 8
}
]
}
]
}
]
},
{
"name": "URL",
"rows": [
{
"name": "URL",
"components": [
{
"field": "variables.urlReplacements",
"name": "URL Intermediary Replacements",
"description": "For the case where parts or all of a tileset's url comes from intermediary endpoints. For example a service may require sending a query to a server that then returns a uuid and that uuid is required in the tileset's url to query it.",
"type": "objectarray",
"width": 12,
"object": [
{
"field": "replace",
"name": "Replace",
"description": "Name of the '{}' value to replace in the core tileset's URL.",
"type": "text",
"width": 3
},
{
"field": "on",
"name": "Event",
"description": "On which event should the replacement be performed and the tile layer required.",
"type": "dropdown",
"width": 2,
"options": ["timeChange"]
},
{
"field": "url",
"name": "URL",
"description": "The intermediary URL to hit whose return values are to be injected into the core tileset URL.",
"type": "text",
"width": 10
},
{
"field": "type",
"name": "HTTP Method",
"description": "The HTTP request method for URL.",
"type": "dropdown",
"width": 2,
"options": ["GET", "POST"]
},
{
"field": "body",
"name": "Body",
"description": "In the case of a POST request, the body to go along with it. Any and all '{starttime}' and '{endtime}' string parts within the body will be populated with their respective values before being sent.",
"type": "text",
"width": 9
},
{
"field": "return",
"name": "Return",
"description": "The value in the response to replace the value of {'Replace'} by in the core URL. Supports using dot.notation.to.traverse.the.json.response.",
"type": "text",
"width": 3
}
]
}
]
}
]
}
]
}