BuildBoundary

The BuildBoundary ISCommand generates the boundary of an image service definition. You can override the parameters and the values by specifying them as options in the command line.

The default command line is:

ISCommand BuildBoundary --ISDef=<PathToISDef> --WhereClause=<query> --MaxNDatasetsForUnion=<number> --BufferDistance=<number> --WeedType=<weedtype> --WeedTolerance=<number> --MaxNVertices=<number> --RemoveSlivers=[True/False] --CheckMinArea=[True|False] --CheckCircularity=[True|False] --MinArea=<number> --MinCircularityRatio=<number> --MinPoints=<number> --DebugMode=[True|False]

The table below defines the variables that are required to use this script. Most variables are defined within the script. You can either make an edit to the script or enter the variable at the command line as shown below.

Variable

Description/Options

Default

Required

ISDef

Path and name of the image service definition file.

User defined

Yes

WhereClause

Defines the selection set to be used building the boundary.

User defined

No

MaxNDatasetsForUnion

The maximum number of records in the service footprint table that are used in the computation of the boundary geometry. For a service with more datasets than the value specified in this property, the boundary geometry is simply defined to be the envelope (bounding box) of the footprint layer.

 

Note that performing all operations necessary for boundary generation might be time-consuming for services containing extremely large numbers of datasets.

10000000

No

BufferDistance

The distance in ground units by which the boundary shape needs to be expanded and then shrunk in order to eliminate slivers. By default (with a value of 0) a distance equal to 1/2000 of the width of the service envelope is used.

 

Although it helps eliminate slivers resulting from the union of butt joined datasets, this option has an smoothening effect at the edges of the boundary shape. Specify -1 to disable this option.

0

No

WeedType

The method by which the boundary shape is weeded in order to remove redundant points that lie "too close". Use "Weed Tolerance" to define a distance that controls when two points are classified as "too close".

 

Simple (default): A single pass is made through the boundary geometry to remove redundant points.

 

Iterative: Multiple passes are made through the boundary geometry with incrementally higher values for WeedTolerance (doubled at each iteration) until the number of vertices in the boundary geometry reduces to a specified value (MaxNVertices).

 

None: No weeding is performed.

Simple

No

WeedTolerance

Defines the distance in ground units below which two points are considered to be redundant and weeded. This value, if left blank or set to zero, defaults to 1/40000th of the width of the service extent.

 

This parameter is used only when the WeedType option is set to enable weeding.

0

No

MaxNVertices

Controls the number of vertices in the boundary geometry at the end of iterative weeding (enabled using the WeedType parameter).

 

This parameter is used only when the WeedType option is set to enable weeding.

1000

No

RemoveSlivers

Indicates whether sliver removal process should be applied to the boundary shape. Properties like area, perimeter, number of points of the geometry are used to classify a polygon as a sliver.

True

No

CheckMinArea

Indicates whether the area of the polygon should be used for identifying slivers. If enabled, all polygons with an area less than a user-specified value for minimum area are considered slivers and removed from the boundary geometry.

 

Due to the fact that slivers are occasionally quite long and might have a large area, this test is not always the best method for identify slivers in a geometry.

 

This parameter is used only if the RemoveSliver option is enabled.

False

No

CheckCircularity

Indicates whether the circularity of the polygon should be considered for identifying slivers. If enabled, all polygons with circularity ratio less than a user-specified value for minimum circularity ratio are considered slivers and removed from the boundary geometry.

 

This parameter is used only if the RemoveSliver option is enabled.

True

No

MinArea

The minimum value of the area (in squared ground units) below which a polygon may be considered a sliver.

 

This parameter is used only if RemoveSliver and CheckMinArea options are enabled.

0

No

MinCircularityRatio

The minimum value of the circularity ratio below which a polygon may be considered a sliver. Circularity ratio is a measure of compactness of a shape and computed using:

(4 * PI * Area) / (Perimeter * Perimeter).

 

This dimensionless value ranges from 1 for a circle to 0 for an infinitely long, infinitely narrow polygon. This parameter is used only if RemoveSliver and CheckCircularity options are enabled.

0.5

No

MinPoints

Allows for an additional check on all polygons classified as slivers using minimum-area and circularity-ratio tests before being removed. All slivers with number of points greater than or equal to this value are not removed from the geometry.

 

This allows you to ensure that large complex shapes, which often get wrongly classified as slivers by the circularity test, are not eliminated from the geometry.

 

A value of zero effectively disables this guardall slivers will then be removed. This parameter is used only if the RemoveSliver option is enabled.

10

No

DebugMode

Allows generation of intermediate files in the 'BuildBoundary' sub-folder inside the ISDef folder. This property is used while troubleshooting the generation of service boundary.

False

No

Example:

ISCommand BuildBoundary --ISDef=c:\Test2.ISDef\ImageService.ISDef --WeedType=Simple