1 Guidelines to impliment layers
3 New types of layer can be defined in fgis using
7 They should implement following commands
11 Returns boolean value indicating that certain operation
12 are supported by this layer.
15 opaque - layer could be displayed as base layer in planchet
16 lookable - layer could be inserted in planchet look list
17 legend - legend of this layer can be drawn by drawlegend command
18 limits - layer have working limits command
19 numeric - values of layer are subject of arithmetic operations
20 dimension - returns 0 if layer defined on the set of point,
21 1 on set of lines (i.e. vector file)
22 2 on continuous area (i.e. raster)
23 reclass - if it is raster layer, returns true if counting operation
24 should use reclass table otherwise can return anything
27 Returns TCL script which can be used to reimplement this layer
28 using layer load command.
29 This script would be executed at global level with value of
30 variable fgisLayerName set to desired name of this layer.
31 All objects which could be neccessary for existance of layer
32 (i.e. legends, palettes, pattern sets) should be recreated
33 by this script. (it is assumed that all neccessary files exist
38 Returns value of layer at given point
40 Flag can be one of following
42 -list - return two-element list consisting of layer title and value
43 -titled -return string as you like to appear in look window
45 [join [$layer value $x $y -list] ": "]
46 If layer is not defined in given point, this command should return
51 should record information that layer is visible in specified planchet
52 and optionally create certain items in this planchet which are persistent.
53 These items should have same tag as layer name (may be among other tags)
54 mode is either -base or -overlay
57 removes information that layer is visible in planchet. It is up to
58 planchet to remove all related items
61 Do all neccessary things to redraw itself in planchet, including
62 deletion of items which are no more applicable.
64 7.configure option arg ?option arg?
66 changes properties of layer and issues redraw command for all planchets,
67 where layer is currently visible, if this changes can affect view
70 if [$layer info legend] is true
71 returns list of classes, which should be drawn by drawlegend
72 9 sample canvas index x y ?mode?
73 if [$layer info legend] is true
74 given index from list returned from legclasses, canvas and coordinates
75 should draw sample of itself. All items constituting this sample should
76 have tag $layername$index
77 mode is either -base or -overlay
79 if [$layer info legend] is true
80 returns text to draw near the sample
83 Returns string to draw as title or subtitle of legend
85 given list of two-element lists
87 return list of two-element lists
90 Obligatory - destroys itself