Most spatial databases allow the representation of simple geometric objects such as points, lines and polygons.
The Open Geospatial Consortium (OGC) developed the Simple Features specification (first released in 1997)[1] and sets standards for adding spatial functionality to database systems.
[4] Most commonly, a single spatial value would be a geometric primitive (point, line, polygon, etc.)
The datatypes in most spatial databases are based on the OGC Simple Features specification for representing geometric primitives.
The following are a few of the functions built into PostGIS, a free geodatabase which is a PostgreSQL extension (the term 'geometry' refers to a point, line, box or other two or three dimensional shape):[7] Function prototype: functionName (parameter(s)) : return type Thus, a spatial join between a points layer of cities and a polygon layer of countries could be performed in a spatially-extended SQL statement as: SELECT * FROM cities, countries WHERE ST_Contains(countries.shape, cities.shape) The Intersect vector overlay operation (a core element of GIS software) could be replicated as: SELECT ST_Intersection(veg.shape, soil.shape) int_poly, veg.