Getting started

Shape Validation

A shape is the memory structure ArcSDE allocates to hold geometry. The shape class serves as the base class ArcSDE allocates to work with point, line and polygon geometry types. A number of properties and methods are common to all shapes. Each shape reports its type, the spatial reference system it belongs to, and the minimum bounding box it occupies in coordinate space. In addition, shapes can be defined as nil, to hold a empty or NULL geometry. Shapes can have multiple parts to hold homogeneous geometry collections. For example, a shape may contain several unconnected lines which represent an intermittent stream.

General coordinate validation rules

ArcSDE applies the following internal integer coordinate rules to geometry coordinates:

 

Small polygon factor: Area geometry with an area less than 0.5 integer units are deleted.

                     

area < 0.5

 

Sliver polygon factor: Long thin polygons (slivers) are deleted when the square of their longest side divided by the polygon area is less than or equal to 1 trillion.

 

                             Longest side ** 2 / area <= 10**12

 

Coordinate snapping factor: Coordinates separated by less than the square root of 2 integer units divided by 2 integer units (approximately 0.707 integer units) are snapped together.

                             

distance separating coordinates <= ( 2**-1 ) / 2

 

These rules can affect the geometry that are created by overlay functions SE_shape_intersect. These factors are more likely to be applied if the system units used to store your geometry are too small.


A point is shape with a dimension of 0 and represents a single location in coordinate space. A point has an x ordinate value and a y ordinate value.

 

(a) A point shape. (b) A multipart point shape with two parts.


line is shape that has a dimension of 1. A line is called a simple line or linestring if it does not intersect itself.

 

(a) A self-intersecting (complex) line. (b) A single-part simple line. (c) A multipart simple line.


An area, or polygon, is a shape with a dimension of 2 and represents a contiguous feature. An area cannot contain any degenerate components or 'dangles'.

 

(a) An area shape. (b) A multipart area shape. (c) An illegal area shape with a number of 'dangles'.


An area shape may have 'holes'.

 

(a) A valid single-part area shape with one hole. (b) A valid two-part area with two inversions. (c) Two invalid area shapes.


ArcSDE shape verification rules

The points of an area shape are stored counterclockwise although the ArcSDE software can return points in either direction. If you generate an area shape whose coordinates are clockwise, the ArcSDE software changes the rotation to ensure that the coordinate list follows a counterclockwise direction.

 

The starting point is 'a' and the correct coordinate description is a,b,c,d,a.

An area shape can have inversions, empty spaces inside the area shape that touch the outer boundary.

 

 

Inverted area shapes have an interior ring that touches the outer boundary. These are not considered donut polygons.

 

When an area shape has a donut hole, the outer boundary is listed first. The points of the holes are stored in opposite direction of the outer boundary.

 

In the figure below, the outer boundary is described as a,b,c,d,a, and the hole is described as e,f,g,h,e. In the coordinate list, the area shape is stored as a,b,c,d,a,e,f,g,h,e.

 

 

For area shapes with holes, the outer boundary is always listed first in the coordinate list, followed by any holes.

 

If two holes touch at one point, they are treated as one hole, not two.

 

 

The two inner areas are a single hole because they share a common point, g.

The combination of area shapes and area shapes with holes can become fairly complex as shown below. The outer boundary is a lake with an island. There is a small lake on the island.

 

One example of representing nested area shapes.

 

It's possible to represent these features as one, two, or three shapes. You could store each feature separately. The larger lake is a donut polygon. The boundary of the large lake is the outer boundary while the island is the boundary of the single donut hole. The island is also a donut polygon. The boundary of the island is the outer boundary while the small lake is the hole. The small lake is a single area shape.

 

If the lakes are the important features, one shape with a hole represents the big lake, while a second shape represents the small lake. You could also use a multipart area shape to represent the feature. The first shape part is the big lake with a donut hole representing the island. The second part is the small lake.

 

Nil shapes act as placeholders, a way to have an attribute row without a corresponding geometry. One example that would result in a nil shape is a request for the intersection of two non-intersecting areas.

 

Because A and B do not touch, the result of an intersection query produces a empty geometry.

 

Shapes have 'dimensions'. A shape with only x,y coordinates is considered two-dimensional. A shape that has z-coordinates or measures is three-dimensional. A shape can also have a nil measure.

 

ArcSDE maintains valid shapes internally by applying a set of rules to each shape type. All ArcSDE commands that create or update shapes use these rules.


Verification rules for point shapes are:

•  The area and length of points are set to 0.0.

•  A single point's envelope is equal to the point's x,y values.

•  The envelope of a multipart point shape is set to the minimum bounding box.


Verification rules for simple lines, or linestring shapes, are:

•  Sequential duplicate points are removed.

•  Each part must have at least two distinct points.

•  Each part may not intersect itself. The start and endpoints may be the same, but the resulting 'ring' is not treated as an area shape.

•  Parts may touch each other at the endpoints.

•  The length is the sum of all the parts.


Verification rules for lines, or spaghetti shapes, are:

•  Lines can intersect themselves.

•  Each part must have at least two distinct points.

•  Sequential duplicate points are deleted.

•  The length is the length of all of its parts added together.


Verification rules and operations on area shapes are:

 

•  Delete duplicate sequential occurrences of a coordinate point.

•  Delete dangles.

•  Verify that the line segments close (z coordinates at start and endpoints must also be the same) and don't cross.

•  Correct rotation to counterclockwise (see the previous section for an explanation of how ArcSDE stores area shapes).

•  For area shapes with holes, ensure that holes reside wholly inside the outer boundary. ArcSDE eliminates any holes that are outside the outer boundary.

•  Convert a hole that touches an outer boundary at a single common point into an inversion of the area shape.

•  Combine multiple holes that touch at common points into a single hole.

•  Multipart area shapes may not overlap. However, two parts may touch at a point.

•  Multipart area shapes may not share a common boundary. Common boundaries are dissolved.

•  If two rings have a common boundary, they are merged into one ring.

•  Calculate the total geometry perimeter, including the boundaries of all holes in donut polygons, and store the perimeter as the length of the geometry.

•  Calculate the area.

•  Calculate the envelope.