Changes between Version 7 and Version 8 of WKTRaster/SeamlessArchitecture


Ignore:
Timestamp:
Jul 18, 2011, 1:49:35 PM (13 years ago)
Author:
bnordgren
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SeamlessArchitecture

    v7 v8  
    3535=== Associations: the building blocks ===
    3636
    37 Each individual association is represented by a <code>CV_GeometryValuePair</code>, or one of its children. Children of <code>CV_GeometryValuePair</code> set limits on the spatial information allowed, and specific coverage types (e.g., point coverages) are composed of associations formed by one of these children (e.g., <code>CV_PointValuePair</code>). The hierarchy is given in the following figure.
     37Each individual association is represented by a `CV_GeometryValuePair`, or one of its children. Children of `CV_GeometryValuePair` set limits on the spatial information allowed, and specific coverage types (e.g., point coverages) are composed of associations formed by one of these children (e.g., `CV_PointValuePair`). The hierarchy is given in the following figure.
    3838
    3939[[Image(orig-gvp.png)]]
    4040
    41 This architecture does not require a full implementation of the entire hierarchy. Only two data types are required: <code>CV_GeometryValuePair</code> and <code>CV_GridPointValuePair</code>. The names of the implementing data types are unimportant, they must simply occupy the roles in the above diagram. Rigid adherence to the UML diagram would require that a <code>CV_DomainObject</code> be explicitly represented. This architecture specification allows the direct substitution of a geometry object for the cases where a temporal component is not part of the domain. If the domain is to include temporal information, however, a domain object with both a spatial and temporal component must be defined.
    42 
    43 The "value" field of the <code>CV_GeometryValuePair</code> must be constrained to be a list of numeric types (each member of the list may have different types). Alternatively, a data structure type, such as "<code>struct</code>" in C, may be used, provided that all the fields are numeric. When applied to a raster, the "value" field represents the information in all the raster's bands (or a subset thereof), in order.
     41This architecture does not require a full implementation of the entire hierarchy. Only two data types are required: `CV_GeometryValuePair` and `CV_GridPointValuePair`. The names of the implementing data types are unimportant, they must simply occupy the roles in the above diagram. Rigid adherence to the UML diagram would require that a `CV_DomainObject` be explicitly represented. This architecture specification allows the direct substitution of a geometry object for the cases where a temporal component is not part of the domain. If the domain is to include temporal information, however, a domain object with both a spatial and temporal component must be defined.
     42
     43The "value" field of the `CV_GeometryValuePair` must be constrained to be a list of numeric types (each member of the list may have different types). Alternatively, a data structure type, such as "`struct`" in C, may be used, provided that all the fields are numeric. When applied to a raster, the "value" field represents the information in all the raster's bands (or a subset thereof), in order.
    4444
    4545=== A raster is a CV_Grid ===
     
    4949[[Image(grid.png)]]
    5050
    51 A <code>CV_Grid</code> by itself consists only of the metadata necessary to define a regular grid: number of dimensions, extent along each axis, and names for the axes. This constitutes basic header metadata only. There is no geospatial information at all. The data are also absent. All instances of <code>CV_Grid</code> may be related to certain other basic structures, as shown in the figure. However, the meaning of these structures and the extent to which they are populated with information, may vary depending on the information available.
    52 
    53 Children of <code>CV_Grid</code> add functionality. Children in the "Positioning" box add georeferencing information and capabilities. Children in the "Valuation" box add the raster data itself, as well as the ability to access it. Each child in the "Positioning" box represents a ''type'' of geolocation, adding the ability to translate back and forth between grid indices and location on the ground. This is equivilent to loading a header with geotags which specify the projection type as well as supplying all the parameters necessary to calculate position. An instance of a child in the "Valuation" box understands how to access the data, whether in memory or in a file. For the purposes of this architecture specification, a '''raster''' is the union of a member in the Positioning box with a member of the Valuation box: representing a fully georeferenced grid type with full access to the gridded data (whether that data is on disk or in memory).
    54 
    55 The <code>CV_GridPoint</code>, articulated in the above figure, differs from a <code>CV_DomainObject</code> only in the ability to store the grid coordinates ''as well as the geolocation''. This is not considered critical. The associations with other pieces of information (such as <code>CV_Footprint</code> or <code>CV_GridCell</code>) need not be explicitly maintained so long as they can be calculated. This architecture specification does not require the explicit implementation of a separate <code>CV_GridPoint</code> type. In fact, a loose interpretation of ISO 19123 is encouraged in this case, particularly due to the fact that raster cells may be interpreted as points or as cell areas. It is explicitly considered permissible to construct an association between the polygon forming the outline of the grid cell and the cell's values (as a <code>CV_GeometryValuePair</code>), instead of using the prescribed <code>CV_GridPointValuePair</code>. If it is necessary to represent the gridded data using these individual associations, the spatial object should accurately reflect the point or area to which the values apply.
    56 
    57 It is rarely necessary or desirable to represent a raster as a collection of <code>CV_GeometryValuePairs</code>, however it is useful to explicitly articulate the fact that the raster is composed of these individual associations. It is also useful to explicitly acknowledge that each grid point has a footprint, and each grid cell is bounded by four grid points (again, loosely interpreting this to mean that grid points may constitute the ''center'' of four grid cells instead of the four corners of a single cell.) Calculating the footprint of an individual cell may be a useful utility to include in a software package. Internally representing the gridded data in this structure is generally not necessary because the spatial location is generally trivial to compute on the fly.
     51A `CV_Grid` by itself consists only of the metadata necessary to define a regular grid: number of dimensions, extent along each axis, and names for the axes. This constitutes basic header metadata only. There is no geospatial information at all. The data are also absent. All instances of `CV_Grid` may be related to certain other basic structures, as shown in the figure. However, the meaning of these structures and the extent to which they are populated with information, may vary depending on the information available.
     52
     53Children of `CV_Grid` add functionality. Children in the "Positioning" box add georeferencing information and capabilities. Children in the "Valuation" box add the raster data itself, as well as the ability to access it. Each child in the "Positioning" box represents a ''type'' of geolocation, adding the ability to translate back and forth between grid indices and location on the ground. This is equivilent to loading a header with geotags which specify the projection type as well as supplying all the parameters necessary to calculate position. An instance of a child in the "Valuation" box understands how to access the data, whether in memory or in a file. For the purposes of this architecture specification, a '''raster''' is the union of a member in the Positioning box with a member of the Valuation box: representing a fully georeferenced grid type with full access to the gridded data (whether that data is on disk or in memory).
     54
     55The `CV_GridPoint`, articulated in the above figure, differs from a `CV_DomainObject` only in the ability to store the grid coordinates ''as well as the geolocation''. This is not considered critical. The associations with other pieces of information (such as `CV_Footprint` or `CV_GridCell`) need not be explicitly maintained so long as they can be calculated. This architecture specification does not require the explicit implementation of a separate `CV_GridPoint` type. In fact, a loose interpretation of ISO 19123 is encouraged in this case, particularly due to the fact that raster cells may be interpreted as points or as cell areas. It is explicitly considered permissible to construct an association between the polygon forming the outline of the grid cell and the cell's values (as a `CV_GeometryValuePair`), instead of using the prescribed `CV_GridPointValuePair`. If it is necessary to represent the gridded data using these individual associations, the spatial object should accurately reflect the point or area to which the values apply.
     56
     57It is rarely necessary or desirable to represent a raster as a collection of `CV_GeometryValuePairs`, however it is useful to explicitly articulate the fact that the raster is composed of these individual associations. It is also useful to explicitly acknowledge that each grid point has a footprint, and each grid cell is bounded by four grid points (again, loosely interpreting this to mean that grid points may constitute the ''center'' of four grid cells instead of the four corners of a single cell.) Calculating the footprint of an individual cell may be a useful utility to include in a software package. Internally representing the gridded data in this structure is generally not necessary because the spatial location is generally trivial to compute on the fly.
    5858
    5959=== Top level coverage ===
     
    6363[[Image(coverage.png)]]
    6464
    65 Coverages add value over a simple collection of geometry-value pairs. They ensure that the collection of geometry-value pairs has a consistent value (e.g., values in the coverage have the same "type" everywhere). Three methods (<code>find</code>, <code>select</code>, and <code>list</code>) are shown on the Coverage type itself. Another method, an important method, is not shown on this diagram: <code>evaluate</code>.
     65Coverages add value over a simple collection of geometry-value pairs. They ensure that the collection of geometry-value pairs has a consistent value (e.g., values in the coverage have the same "type" everywhere). Three methods (`find`, `select`, and `list`) are shown on the Coverage type itself. Another method, an important method, is not shown on this diagram: `evaluate`.
    6666
    6767{|
     
    6969| '''Description'''
    7070|-
    71 | <code>evaluate</code>
     71| `evaluate`
    7272| returns a set of values for a given point.
    7373|-
    74 | <code>select</code>
     74| `select`
    7575| returns all the geometry-value pairs which "lie within" the provided geometry
    7676|-
    77 | <code>find</code>
     77| `find`
    7878| returns a list of geometry-value pairs, in order of distance from the provided point
    7979|-
    80 | <code>list</code>
     80| `list`
    8181| returns a list of all the constituent geometry-value pairs which make up the coverage
    8282|-
    83 | <code>evaluateInverse</code>
     83| `evaluateInverse`
    8484| returns a set of locations which match a particular set of values
    8585|}
    8686
    87 These methods are the same for all coverages, regardless of type. The two main children of a <code>CV_Coverage</code> create a distinction between ''discrete coverages'', which are simple aggregations of individual geometry-value pairs; and ''continuous coverages'', which are capable of interpolating between geometry-value pairs. Both types of coverages are defined by geometry-value pairs.
     87These methods are the same for all coverages, regardless of type. The two main children of a `CV_Coverage` create a distinction between ''discrete coverages'', which are simple aggregations of individual geometry-value pairs; and ''continuous coverages'', which are capable of interpolating between geometry-value pairs. Both types of coverages are defined by geometry-value pairs.
    8888
    8989=== Summary ===
     
    103103=== Spatial information with associated numeric value ===
    104104
    105 Vectors represent combined spatial and value information with a structure, record, datatype, or class which has a geometry part and a value part. In [http://docs.codehaus.org/download/attachments/31212/ISO19123 Primer.pdf ISO 19123] this is represented as the type <code>CV_GeometryValuePair</code>. In the postgis raster extension, there is a <code>geomval</code> type. Any data structure which enforces a one-to-one relationship between a particular geometry and a particular list of values will accomplish this end. Using such a structure, there is a clear separation: the geometry conveys the spatial information and the value conveys the value information.
     105Vectors represent combined spatial and value information with a structure, record, datatype, or class which has a geometry part and a value part. In [http://docs.codehaus.org/download/attachments/31212/ISO19123 Primer.pdf ISO 19123] this is represented as the type `CV_GeometryValuePair`. In the postgis raster extension, there is a `geomval` type. Any data structure which enforces a one-to-one relationship between a particular geometry and a particular list of values will accomplish this end. Using such a structure, there is a clear separation: the geometry conveys the spatial information and the value conveys the value information.
    106106
    107107Rasters have the ability to store one or more numeric values at each cell. The number of values present at each cell is exactly equal to the number of bands present in the overall raster. Each band may have a different numeric type, and the bands are ordered. Spatial information is conveyed by "nodata" values: cells containing the "nodata" value are equivalent to cells in a mask containing "false" values. Conversely, cells containing any value ''other than'' the "nodata" value are equivalent to cells in a mask containing true values. Each band may possess a unique "nodata" value which applies only to that band.
     
    166166|}
    167167
    168 A "Pure Spatial" information type may be represented by either a geometry or by a mask (a special case of the raster data type). The Spatial Value information type may be represented by either a non-mask raster, or by a datatype which implements the <code>CV_GeometryValuePair</code> from ISO 19123. The following table describes the mapping between information types and data types.
     168A "Pure Spatial" information type may be represented by either a geometry or by a mask (a special case of the raster data type). The Spatial Value information type may be represented by either a non-mask raster, or by a datatype which implements the `CV_GeometryValuePair` from ISO 19123. The following table describes the mapping between information types and data types.
    169169
    170170{|
     
    174174|-
    175175| '''Vector'''
    176 | <code>CV_DomainObject</code> or <code>GM_Object</code>
    177 | <code>CV_GeometryValuePair</code>
     176| `CV_DomainObject` or `GM_Object`
     177| `CV_GeometryValuePair`
    178178|-
    179179| '''Raster'''
    180 | <code>CV_Grid</code> (mask)
    181 | <code>CV_Grid</code> (values)
    182 |}
    183 
    184 Note that the same data type (an implementation of <code>CV_Grid</code> from ISO 19123) is capable of communicating both Pure Spatial and Spatial Value information for "Raster" data. The difference is in the values of the grid cells, not in the type of the data. This reduces the number of required data types from four to three. <code>CV_Grid</code> will be referred to as raster, <code>GM_Object</code> will be referred to as "geometry", and <code>CV_GeometryValuePair</code> will be referred to as "geomval".
     180| `CV_Grid` (mask)
     181| `CV_Grid` (values)
     182|}
     183
     184Note that the same data type (an implementation of `CV_Grid` from ISO 19123) is capable of communicating both Pure Spatial and Spatial Value information for "Raster" data. The difference is in the values of the grid cells, not in the type of the data. This reduces the number of required data types from four to three. `CV_Grid` will be referred to as raster, `GM_Object` will be referred to as "geometry", and `CV_GeometryValuePair` will be referred to as "geomval".
    185185
    186186<blockquote>
     
    337337A very generic core utility could be provided with the definition of:
    338338
    339  1. Input extension points defined for <code>geometry</code>, <code>geomval</code>, and <code>raster</code> data types.
     339 1. Input extension points defined for `geometry`, `geomval`, and `raster` data types.
    340340 1. Spatial operation extension points defined for common operations: difference, intersection, symmetric difference, and union.
    341341 1. Value computation extension points defined for: mask value, copy value from input 1 (preferred) or input 2 (if necessary), expression evaluation.