In the context of spatial databases, the defined space in which geometries are described is called a spatial reference system (SRS). A spatial reference system defines, at minimum:
Units of measure of the underlying coordinate system (degrees, meters, and so on)
Maximum and minimum coordinates (also referred to as the bounds)
Default linear unit of measure
Whether the data is planar or spheroid data
Projection information for transforming the data to other SRSs
Every spatial reference system has an identifier called a Spatial Reference Identifier (SRID). When SQL Anywhere performs operations like finding out if a geometry touches another geometry, it uses the SRID to look up the spatial reference system definition so that it can perform the calculations properly for that spatial reference system. In a SQL Anywhere database, each SRID must be unique.
By default, SQL Anywhere adds the following spatial reference systems to a new database:
Default is a Cartesian spatial reference system that works with data on a flat, two dimensional plane. Any point on the plane can be defined using a single pair of x, y coordinates where x and y have the bounds -1,000,000 to 1,000,000. Distances are measured using perpendicular coordinate axis. This spatial reference system is assigned SRID of 0.
Cartesian is a planar type of spatial reference system.
WGS 84 - SRID 4326 The WGS 84 standard provides a spheroidal reference surface for the Earth. It is the spatial reference system used by the Global Positioning System (GPS). The coordinate origin of WGS 84 is the Earth's center, and is considered accurate up to ±1 meter. WGS stands for World Geodetic System.
WGS 84 Coordinates are in degrees, where the first coordinate is longitude with bounds -180 to 180, and the second coordinate is latitude with bounds -90 to 90.
The default unit of measure for WGS 84 is METRE, and it is a round-Earth type of spatial reference system.
WGS 84 (planar) - SRID 1000004326 WGS 84 (planar) is similar to WGS 84 except that it uses equirectangular projection, which distorts length, area and other computations. For example, at the equator in both SRID 4326 and 1000004326, 1 degree longitude is approximately 111 km. At 80 degrees north, 1 degree of longitude is approximately 19 km in SRID 4326, but SRID 1000004326 treats 1 degree of longitude as approximately 111 km at all latitudes. The amount of distortion of lengths in the SRID 1000004326 is considerable—off by a factor of 10 or more—the distortion factor varies depending on the location of the geometries relative to the equator. Consequently, SRID 1000004326 should not be used for distance and area calculations. It should only be used for relationship predicates such as ST_Contains, ST_Touches, ST_Covers, and so on.
The default unit of measure for WGS 84 (planar) is DEGREE, and it is a flat-Earth type of spatial reference system.
Since you can define a spatial reference system however you want and can assign any SRID number, the spatial reference system definition (projection, coordinate system, and so on) must accompany the data as it moves between databases or is converted to other SRSs. For example, when you unload spatial data to WKT, the definition for the spatial reference system is included at the beginning of the file.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0|