130 | | '''Example 1:''' Consider the ''intersection'' operation: returning common area between two inputs. The vector support in GIS systems is typically one eighth of the row which specifies that two Pure Spatial inputs result in a Pure Spatial output (combination 1). Typical GIS systems implement one eighth of this row due to the fact that they typically operate only on (and only return) geometry objects. A system implementing seamless vector and raster operations would also provide a means to return a mask, which is a special type of raster. Therefore, in terms of data types, this one line would become the following table. Note that because we are expanding the "Purely Spatial" line in the information type table, all of the rasters are actually masks: they lack value information. Observe also that adding the ability to return as well as accept spatial information using either representation adds support for the last seven lines of the data type table. |
| 130 | || '''Input 1''' || '''Input 2''' || '''Returns''' || |
| 131 | || geometry || geometry || geometry || |
| 132 | || geometry || raster || geometry || |
| 133 | || raster || geometry || geometry || |
| 134 | || raster || raster || geometry || |
| 135 | || geometry || geometry || raster || |
| 136 | || geometry || raster || raster || |
| 137 | || raster || geometry || raster || |
| 138 | || raster || raster || raster || |
132 | | || '''Input 1''' || '''Input 2''' || '''Returns''' || |
133 | | || geometry || geometry || geometry || |
134 | | || geometry || raster || geometry || |
135 | | || raster || geometry || geometry || |
136 | | || raster || raster || geometry || |
137 | | || geometry || geometry || raster || |
138 | | || geometry || raster || raster || |
139 | | || raster || geometry || raster || |
140 | | || raster || raster || raster || |
144 | | '''Example 2:''' Consider an intersection operation returning values from one of the inputs in the common area. This is sometimes known as a "clip" operation. In typical GIS systems, this is usually implemented as an operation which accepts a raster and a vector, returning a raster. In a seamless raster/vector system, the same operation is defined in terms of information type. To be as similar as possible to the traditional GIS implementation would require that the seamless operation support only lines with one Purely Spatial input and one Spatial Value input, returning a Spatial Value result (combinations 6 and 7). To be fully seamless, all variants of the operation listed in the data type table should be implemented. There may be a justification for intentionally supporting a less than fully seamless operation. In this case, implementers may decide to support only those variants which return a raster, as the expected result of a "clip" operation is a grid which only contains values over the spatial intersection of two objects. Alternatively, the same operation having a different return type (or taking different arguments) may be known by different names. These aspects must be considered individually for each operation as they are defined. |
| 143 | || '''Input 1''' || '''Input 2''' || '''Returns''' || '''Comment''' || |
| 144 | || geometry || raster || raster || input 2 must contain values || |
| 145 | || raster || geometry || raster || input 1 must contain values || |
| 146 | || raster || raster || raster || one input must contain values and the other must not || |
| 147 | || geomval || raster || raster || input 2 must be a mask || |
| 148 | || raster || geomval || raster || input 1 must be a mask || |
| 149 | || geometry || geomval || raster || || |
| 150 | || geomval || geometry || raster || || |
| 151 | || geometry || raster || geomval || input 2 must contain values || |
| 152 | || raster || geometry || geomval || input 1 must contain values || |
| 153 | || raster || raster || geomval || one input must contain values and the other must not || |
| 154 | || geomval || raster || geomval || input 2 must be a mask || |
| 155 | || raster || geomval || geomval || input 1 must be a mask || |
| 156 | || geometry || geomval || geomval || || |
| 157 | || geomval || geometry || geomval || || |
146 | | || '''Input 1''' || '''Input 2''' || '''Returns''' || '''Comment''' || |
147 | | || geometry || raster || raster || input 2 must contain values || |
148 | | || raster || geometry || raster || input 1 must contain values || |
149 | | || raster || raster || raster || one input must contain values and the other must not || |
150 | | || geomval || raster || raster || input 2 must be a mask || |
151 | | || raster || geomval || raster || input 1 must be a mask || |
152 | | || geometry || geomval || raster || || |
153 | | || geomval || geometry || raster || || |
154 | | || geometry || raster || geomval || input 2 must contain values || |
155 | | || raster || geometry || geomval || input 1 must contain values || |
156 | | || raster || raster || geomval || one input must contain values and the other must not || |
157 | | || geomval || raster || geomval || input 2 must be a mask || |
158 | | || raster || geomval || geomval || input 1 must be a mask || |
159 | | || geometry || geomval || geomval || || |
160 | | || geomval || geometry || geomval || || |
161 | | |
162 | | </blockquote> |