Examination of ABE Layers
ABE layers are not directly viewable in the canvas. ABE layer contents are copied to a Graphics Editor highlight set, from which they can be viewed in the canvas. Additionally, an ABE layer can be queried for the number of tiles on the layer and iterators can be used to identify the location of islands and tiles.
These properties are used for the ABE layer:
-
The
areaproperty for the ABE layer contains the total area of all the tiles in the ABE layer.
The following example copies the shapes in the selected set to ABE layera1, then outputs the number of tiles ona1.abeInit( cv ) a1 = abeLayerFromShapes( geGetSelSet() ) print( a1->
area) -
The
numTilesproperty for the ABE layer contains the number of tiles on the layer.
The following example copies the shapes in the selected set to ABE layera1, then outputs the number of tiles ona1.abeInit( cv ) a1 = abeLayerFromShapes( geGetSelSet() ) print( a1->numTiles )
IfnumTilesis0, the layer is empty.
These iterators are used for the ABE layer:
-
The island iterator returns polygons and rectangles on an ABE layer, with each represented by a list of points. Use
abeIslandIteratorto set up an island iterator for an ABE layer. The?noHolesargument will generate polygons that do not contain holes.
The following example copies the shapes in the selected set to ABE layera1, then iterates through the polygons and rectangles to output the list of points for each shape.abeInit( cv ) a1 = abeLayerFromShapes( geGetSelSet() ) islandItr = abeIslandIterator( a1 ) while( polygon = islandItr->next print( polygon ) )
-
The tile iterator returns the primitive tiles on an ABE layer. The iterator can be restricted to a region of the layer.
The following example copies the shapes in the selected set to ABE layera1, then iterates through the tiles to output the bounding box for each tile.abeInit( cv ) a1 = abeLayerFromShapes( geGetSelSet() ) tileItr = abeTileIterator( a1 ) while( tile = tileItr->next print( tile->bbox ) )
Related Topics
Return to top