You are here:
Geodatabases and ArcSDE
>
Working with geodatabases using SQL
Spatial operations are functions that create new spatial data from specified input data. They are functions that form important components of an underlying model that takes input data, performs analysis on it, and assimilates the data to produce output information.
The following operations can be used to create new data from input data.
-
Minimum distance
The minimum distance separating disjoint features represents the shortest distance between two locations (as the crow flies). For instance, this is not the distance you would have to travel if you drive from one location to the other, but the distance you would calculate if you drew a straight line between two locations on a map. The ST_Distance function reports the minimum distance separating two disjoint geometries. If the geometries are not disjoint (e.g. coincident), the function will report a zero minimum distance.
-
Union of geometries
The ST_Union function returns the union set of two geometries-the Boolean logical OR of space. The source geometries must have the same dimension. ST_Union always returns the result as a collection.
NOTE: In the next four diagrams, the first input geometries are black and the second input geometries are orange.
-
Intersection of geometries
The ST_Intersection function returns the intersection set of two geometries. The intersection set is always returned as a collection that is the minimum dimension of the source geometries. For example, for an ST_LineString that intersects an ST_Polygon, the ST_Intersection function returns that portion of the ST_LineString common to the interior and boundary of the ST_Polygon as a ST_MultiLineString. The ST_MultiLineString contains more than one ST_LineString if the source ST_LineString intersected the ST_Polygon with two or more discontinuous segments. If the geometries do not intersect or if the intersection results in a dimension less than both source geometries, an empty geometry is returned. The figure below illustrates some examples of the ST_Intersection function.
-
Difference of geometries
The ST_Difference function returns the portion of the primary geometry that is not intersected by the secondary geometry-the logical AND NOT of space. The ST_Difference function only operates on geometries of similar dimension and returns a collection that has the same dimension as the source geometries. In the event that the source geometries are equal, an empty geometry is returned.
-
Symmetric difference of geometries
The ST_SymmetricDiff function returns the symmetric difference of two geometries-the logical XOR of space. The source geometries must have the same dimension. If the geometries are equal, the ST_SymmetricDiff function returns an empty geometry; otherwise, the function returns the result as a collection.
-
Buffering geometry
The ST_Buffer function generates a geometry by encircling a geometry at a specified distance. A single polygon results when a primary geometry is buffered or when the buffer polygons of a collection are close enough to overlap. When enough separation exists between the elements of a buffered collection, individual buffer ST_Polygons will result in an ST_MultiPolygon.
The ST_Buffer function accepts both positive and negative distances, but only geometries with a dimension of 2-ST_Polygon and ST_MultiPolygon-can apply a negative buffer. The absolute value of the buffer distance is used when the dimension of the source geometry is less than 2, in other words, all geometries that are neither ST_Polygon nor ST_MultiPolygon. Generally speaking, positive buffer distances generate polygon rings that are away from the center of the source geometry and-for the exterior ring of an ST_Polygon or ST_MultiPolygon-toward the center when the distance is negative. For interior rings of an ST_Polygon or ST_MultiPolygon, the buffer ring is toward the center when the buffer distance is positive and away from the center when it is negative.
The buffering process merges buffer polygons that overlap. Negative distances greater than one-half the maximum interior width of a polygon result in an empty geometry.
-
ConvexHull
The ST_ConvexHull function returns the convex hull polygon of any geometry that has at least three vertices forming a convex. If vertices of the geometry do not form a convex, ST_ConvexHull returns a null. Creating a convex hull is often the first step when tessellating a set of points to create a triangulated irregular network (TIN).
Please visit the
Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.