0% found this document useful (0 votes)
4 views1 page

Most Used Spatial Functions

The document outlines various spatial functions available in PostGIS, categorized into Geometry Constructors, Accessors, Spatial Relationship Functions, Geometry Measurements, and Processing Functions. It includes functions for creating geometries, accessing geometry properties, testing spatial relationships, measuring geometry attributes, and processing geometries. Each function is briefly described, highlighting its purpose and usage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Most Used Spatial Functions

The document outlines various spatial functions available in PostGIS, categorized into Geometry Constructors, Accessors, Spatial Relationship Functions, Geometry Measurements, and Processing Functions. It includes functions for creating geometries, accessing geometry properties, testing spatial relationships, measuring geometry attributes, and processing geometries. Each function is briefly described, highlighting its purpose and usage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

GeoWebApp Building

Spatial functions in PostGIS


Some commonly used spatial functions in PostGIS:

Geometry Constructors:
ST_MakePoint: Creates a point geometry from X and Y coordinates.
ST_GeomFromText: Creates a geometry from a well-known text
representation.
ST_GeomFromEWKT: Creates a geometry from an extended well-known
text representation.
ST_GeomFromGeoJSON: Creates a geometry from a GeoJSON
representation.

Geometry Accessors:
ST_GeometryType: Returns the geometry type.
ST_SRID: Returns the spatial reference identifier of a geometry.
ST_X: Returns the X coordinate of a point.
ST_Y: Returns the Y coordinate of a point.
ST_Transform: Transforms a geometry from one spatial reference system
(SRS) to another.

Spatial Relationship Functions:


ST_Equals: Tests if two geometries are spatially equal.
ST_Disjoint: Tests if two geometries are spatially disjoint.
ST_Touches: Tests if two geometries share points but do not overlap.
ST_Within: Tests if one geometry is within another.
ST_DWithin: Tests if one geometry is within a specific distance (radius) of
one another.
ST_Contains: Tests if one geometry contains another.
ST_Intersects: Tests if two geometries intersect.
ST_Crosses: Tests if two geometries cross each other.
ST_Overlaps: Tests if two geometries overlap.

Geometry Measurements:
ST_Area: Computes the area of a geometry.
ST_Length: Computes the length of a linestring.
ST_Distance: Computes the distance between two geometries.

Geometry Processing Functions:


ST_Buffer: Computes a buffer around a geometry.
ST_Intersection: Computes the intersection of two geometries.
ST_Union: Computes the union of multiple geometries.
ST_Difference: Computes the difference between two geometries.
ST_Centroid: Computes the centroid (center of mass) of a set of geometries.
ST_ConvexHull: Computes the smallest convex geometry that encloses a
set of geometries.
ST_MinimumBoundingCircle: Computes the minimum bounding circle of a
set of geometries.
ST_Accum: Accumulates values into an array.

You might also like