Element: entity.invalidity

Type

numeric

Description

Whether or not the entity has valid geometry and if not why. This has a value 0 for valid, n for invalid, where n will vary according to entity type and why it is invalid. Although an entity may have been created succesfully, subsequent changes to its properties may render it invalid when it comes to be drawn, or when other operations are performed on it.

The following entities can be considered "invalid":

All other entities are considered to be "valid" with an invalidity value n of 0.

This element is read-only and cannot be changed directly.

Polygon Invalidity

The value n for an invalid polygon is a combination of integers (a mask), each integer corresponding to a specific invalidity, since polygons may have multiple reasons for invalidity.

Value

Meaning

Graphic

1

The polygon has one or more slivers.

2

The polygon has one or more coincident vertices.

4

One or more of its edges cross.

8

One or more of its edges overlap.

16

One or more of its edges cross an edge
of a parent or child polygon.

32

One or more of its edges overlap an edge
of a parent or child polygon.

64

The polygon itself is valid but one of its child
polygons is invalid for reasons 1,2,4 or 8.

 

As an example, a polygon with a sliver and crossing edges would have an invalidity value of 5.