Database Reference
In-Depth Information
2. ST SPATIAL REFERENCE SYSTEMS describes the available SRSs.
3. ST UNITS OF MEASURE describes the different units of measures that
can be used, for example, to calculate distances, lengths, or areas.
4. ST SIZINGS contains the spatial-specific metavariables and their values.
An example is the maximum length that can be used for a WKT of a
geometry.
To conclude this section, it is important to remark that PostGIS provides
a GEOGRAPHY data type, which uses geodetic coordinates instead of
Cartesian coordinates. Coordinate points in the GEOGRAPHY type are
always represented in the WGS 84 SRS (SRID 4326). Thus, this type can
be used to load data using latitude and longitude coordinates. However, as
many tools do not yet support the GEOGRAPHY data type, in the remainder
of this topic we will only cover the GEOMETRY data type.
11.3.3 Raster Model
The data model that we presented in Sect. 11.1.2 is used to represent
continuous fields at an abstract level. At a logical level, continuous fields
must be represented in a discrete way. For this, we need first to partition the
spatial domain into a finite number of elements. This is called a tessellation .
Then, we must assign a value of the field to a representative point in
each partition element. Furthermore, since values of the field are known
only at a finite number of points (called sampled points), the values at
other points must be inferred using an interpolation function. In practice,
different tessellations and different interpolation functions may be used. The
most popular representation is the raster tessellation, which supports the
raster model . This model is structured as an array of cells, where each cell
represents the value of an attribute for a real-world location. Usually, cells
represent square areas of the underlying space, but other shapes can also
be used.
PostGIS introduces a new data type called RASTER that stores raster data
in a binary format in PostgreSQL. PostGIS provides functions to manipulate
raster data and to combine it with vector data. Rasters are composed of
bands, also called channels. Although rasters can have many bands, they are
normally limited to four, each one storing integers. For example, a picture
such as a JPEG, PNG, or TIFF is generally composed of one to four bands,
expressed as the typical red green blue alpha (RGBA) channels. A pixel in
raster data is generally modeled as a rectangle with a value for each of its
bands. Each rectangle in a raster has a width and a height, both representing
meters/feet/degrees of the geographic space in the SRS.
When raster data are stored in PostGIS, the pixels are allocated to a data
column of type RASTER , similar to how geometries are stored in a column of
type GEOMETRY or GEOGRAPHY . A full raster file can be stored in a single
 
Search WWH ::




Custom Search