MarkLogic 9 Product Documentation
geo.boundingBoxesgeo.boundingBoxes(
region as cts.region,
[options as String[]]
) as Sequence
Summary
Returns a sequence of boxes that bound the given region.
Parameters 
region 
A geographic region (box, circle, polygon, or point).

options 
Options for the operation. The default is ().
Options include:
Options include:
 "coordinatesystem=string"
 Use the given coordinate system. Valid values are:
 wgs84
 The WGS84 coordinate system.
 wgs84/double
 The WGS84 coordinate system at double precision.
 etrs89
 The ETRS89 coordinate system.
 etrs89/double
 The ETRS89 coordinate system at double precision.
 raw
 The raw (unmapped) coordinate system.
 raw/double
 The raw coordinate system at double precision.
 "precision=value"
 Use the coordinate system at the given precision. Allowed values:
float and double .
 "units=value"
 Measure distance, radii of circles, and tolerance in the specified units.
Allowed values:
miles (default), km ,
feet , meters .
 "boxpercent=n"
 An integer between 0 and 100 (default is 100) that indicates what
percentage of a polygon's bounding box slivers should be returned.
Lower numbers give fewer, less accurate boxes; larger numbers give
more, more accurate boxes.
 "tolerance=distance"
 Tolerance is the largest allowable variation in geometry calculations.
The bounding boxes will be padded to cover any points within tolerance
of the region. For the raw coordinate system, use the units
of the coordinates. For geographic coordinate systems, use the units
specified by the units option. The default value is 0 (no padding).
 "boundariesincluded"
 Points on boxes', circles', and polygons' boundaries are counted as
matching. This is the default.
 "boundariesexcluded"
 Points on boxes', circles', and polygons' boundaries are not
counted as matching.
 "boundarieslatitudeexcluded"
 Points on boxes' latitude boundaries are not counted as
matching.
 "boundarieslongitudeexcluded"
 Points on boxes' longitude boundaries are not counted as
matching.
 "boundariessouthexcluded"
 Points on the boxes' southern boundaries are not counted as
matching.
 "boundarieswestexcluded"
 Points on the boxes' western boundaries are not counted as
matching.
 "boundariesnorthexcluded"
 Points on the boxes' northern boundaries are not counted as
matching.
 "boundarieseastexcluded"
 Points on the boxes' eastern boundaries are not counted as
matching.
 "boundariescircleexcluded"
 Points on circles' boundary are not counted as matching.
 "boundariesendpointsexcluded"
 Points on linestrings' boundary (the endpoints) are not counted as matching.

Usage Notes
The value of the
precision
option takes precedence over
that implied by the governing coordinate system name, including the
value of the
coordinatesystem
option. For example, if the
governing coordinate system is "wgs84/double" and the
precision
option is "float", then the operation uses single precision.
See Also
Example
geo.boundingBoxes(
cts.polygon("0,0 20,20 10,18 5,5 0,0")
);
// Returns two boxes:
// [10, 0, 5, 18.976505]
// [5, 4.7157488, 20, 20]
// **************
geo.boundingBoxes(
cts.polygon("0,0 20,20 10,18 5,5 0,0"),
"boxpercent=50"
);
// Returns one box:
// [10, 0, 20, 20]
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.