Simple feature access

from Wikipedia, the free encyclopedia

Simple Feature Access is a specification of the Open Geospatial Consortium that defines a generally applicable architecture for geographic data and their geometries .

The specification describes the storage and access to geometries on the one hand and various spatial operators on the other.

Geometry class model

The model contains the following instantiable classes:

  • Points (point)
  • Lines (LineString)
  • Polygons (polygon)
    • The points on the outer ring are sorted counter-clockwise (counterclockwise).
    • The points of the inner ring (hole) are sorted clockwise (right-handed)
  • Multiple Points (MultiPoint)
  • Multiple lines (MultiLineString)
  • Multiple polygons (MultiPolygon)
  • Collection of these geometries (GeometryCollection)

All geometries are derived from the abstract class Geometry.

Methods on geometry objects

The Simple Feature Access specification distinguishes three different groups of methods:

  1. The first group provides various basic methods such as: B. the query of the geometry type (GeometryType), the query of the extent (Envelope) or the return of the geometry as text (AsText).
  2. In the second group, methods are combined which describe spatial relationships between geometric objects. These methods include B. whether objects are the same (Equals), intersect (Intersects) or touch (Touches).
  3. Finally, the last group includes methods for spatial analysis such as B. Buffer zone (Buffer), intersection (Intersection) or difference (Difference).

Representation of the geometry

Another part of the specification includes the representation of the geometry. These include the so-called well-known text ( WKT ) or the well-known binary ( WKB ) format.

Well-known text

The well-known text representation is mainly used to be able to represent the geometry alphanumerically . Examples of well-known text:

  • Point
Point(10 10)
  • LineString (line with "kink points")
LineString (10 10, 20 20, 30 40)
  • Polygon (area)

a polygon is enclosed in two brackets. Polygon without hole:

Polygon((10 10, 10 20, 20 20, 20 15, 10 10))

with an outer ring and an inner ring (hole)

Polygon((0 0, 0 20, 20 20, 20 0, 0 0),(5 5, 5 15, 15 15, 15 5, 5 5))
  • Multiple polygon

two polygons

MultiPolygon(((10 10, 10 20, 20 20, 20 15, 10 10)),((60 60, 70 70, 80 60, 60 60 )))

two polygons, first polygon with hole:

MultiPolygon(((0 0, 0 20, 20 20, 20 0, 0 0),(5 5, 5 15, 15 15, 15 5, 5 5)),((30 30, 30 40, 40 40, 40 30, 30 30)))

The first bracket envelops the entire multipolygon. The following two brackets enclose the respective polygon. If there is a hole in this polygon, a bracket is closed and the second polygon is separated by a comma. If the second polygon is geometrically inside the first, it represents a hole, if it is geometrically outside the polygon, then it is an exclave .

Well-known binary

The well-known binary representation is a transferable representation of the geometries as a continuous byte data chain. As data types WKB uses integer without sign from one or four bytes and numbers double precision of eight bytes. Example for well-known binary:

  • Point with coordinate 1.1
0101000000000000000000F03F000000000000F03F

This data chain, broken down into parts, means the following:

01 : Byte-Reihenfolge
01000000 : Geometrietyp
000000000000F03F : X
000000000000F03F : Y

Representation of coordinate systems

Simple Feature Access also standardizes the representation of geodetic systems with geographical , projected or geocentric coordinates in an alphanumeric form as well-known text. Examples of the representation of coordinate systems:

  • UTM Zone 10 with the North American date NAD27
 PROJCS["UTM Zone 10, Northern Hemisphere",
   GEOGCS["clark66",
       DATUM["North_American_Datum_1927",
           SPHEROID["clark66",6378206.4,294.9786982]],
       PRIMEM["Greenwich",0],
       UNIT["degree",0.0174532925199433]],
   PROJECTION["Transverse_Mercator"],
   PARAMETER["latitude_of_origin",0],
   PARAMETER["central_meridian",-123],
   PARAMETER["scale_factor",0.9996],
   PARAMETER["false_easting",500000],
   PARAMETER["false_northing",0],
   UNIT["Meter",1]]
  • Geographic coordinate system WGS84
 GEOGCS["wgs84",
   DATUM["WGS_1984",
       SPHEROID["wgs84",6378137,298.257223563],
       TOWGS84[0.000,0.000,0.000]],
   PRIMEM["Greenwich",0],
   UNIT["degree",0.0174532925199433]]

use

The Simple Feature Access specification is widely used in geospatial applications both in open source projects and in proprietary programs. Two well-known LGPL licensed program libraries are the JTS Topology Suite and GEOS . JTS provides an API for Java , while GEOS is an API for C ++ . By using GEOS in PostGIS , WKT / WKB can be used directly in the PostgreSQL database .

Web links