Changes between Version 3 and Version 4 of UsersWikiCoveragesAndPostgis


Ignore:
Timestamp:
Jul 21, 2011, 3:09:42 PM (13 years ago)
Author:
bnordgren
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiCoveragesAndPostgis

    v3 v4  
    2929In PostGIS, you can implement a continuous coverage simply by writing a function which calculates a value based on location, or which interpolates the values stored in a table. Such a function is the `evaluate` method of a continuous coverage. If you would like your coverage to have an inverse method, you could write another function to calculate the inverse. In the case of the interpolated "Temperature" coverage above, a reasonable "inverse" method would be to allow the user to request the isotherm of a particular temperature.
    3030
     31== Discrete Coverages ==
     32
     33If the easiest way to think of continuous coverages is to think of continuously varying coverages, then the easiest way to think of discrete coverages is to envision a coverage which is not continuously variable. In short: the values "jump" suddenly from one value to another. The coverage does not look "smooth" when displayed in a viewer.
     34
     35Discrete coverages are not typically implemented by an equation, but are usually based on a collection of data. The collection of data is self-consistent, meaning that all data items in the collection have the same types. As the terms are commonly used, raster and vector coverages are both ''types of'' discrete coverage. They differ only in how they store and manage their collection of data. Since they are almost invariably based on a collection of data, discrete coverages offer additional functionality related to querying the data for items which match a specific criteria:
     36
     37 * `find()` locates the nearest data items to a given point.
     38 * `select()` locates all the data items within a given region.
     39 * `list()` returns all the data items in the collection.
     40
     41The most important concept of this section is that a coverage is not the same thing as the data upon which it is based. Using the same term for two different things may have been acceptable in the past, but now that raster is here, it is important to learn the difference. The differences are subtle, and it is important to master these subtleties.
     42
     43Two main types of discrete coverages, in the common parlance, are "vector" and "raster". These are not distinctions present in ISO 19123, which has served as the basis of this document up to this point. We introduce the notions of vector and raster simply because the terms have a notional value, and we wish to place them in context with respect to a larger framework.
     44
     45=== Vector Coverages ===
     46
     47Vector coverages are probably the most familiar type of coverage to the majority of users. The collection of data items upon which the coverage is based is usually a table. Individual data items are individual rows in the table. The columns of the table ensure that the collection is self-consistent Each data item (row) may fill in values for each column: text may be placed in text columns, numbers in numeric columns, geometries in geometry columns, etc. The only requirement a table must fulfill in order to have the potential to supply information to a coverage is that it must have at least one `geometry` column.
     48
     49The following table could serve as a collection of data items upon which a coverage could be built. Note that it has a `geometry` column (geom), two text columns (Name and Mayor), and two numeric columns (Elevation and Population). Each row is a data item, and each relates a point to a consistent set of values, defined by the columns.
     50
     51[[Image(Cities.png)]]
     52
     53This single table could back any number of coverages. It could back a "Population" coverage simply by returning the value in the Population column whenever the query point intersects the geometry.