Loading TOC...

geo.countDistinctVertices

geo.countDistinctVertices(
   $region as cts.region,
   [$options as String[]]
) as Number

Summary

Return a count of the distinct number of vertices in a region, taking tolerance into account.

Parameters
$region A cts region.
$options

Options include:

"coordinate-system=name"
Use the named coordinate system. Valid names are wgs84 for the WGS84 coordinate system and raw for the unmapped planar coordinate system
"tolerance"
A tolerance value. For the raw coordinate system, use the units of the coordinate system. For other (geodetic) coordinate systems, use the units specified by the units option. If the tolerance is too fine for the precision, inconsistencies may result and a larger tolerance should be used.
"units=miles"
Distance is measured in miles.

Usage Notes

This function returns a count of the distinct number of vertices in a region. It takes into account tolerance. The vertex that closes the ring is only counted once. For a complex polygon this is a count of the vertices in the outer polygon. For points it returns 1, for circles it returns 0, and for boxes it returns the number of distinct points in the set (sw, se, nw, ne).

Example

geo.countDistinctVertices(
  cts.polygon([cts.point(1,2),cts.point(3,4),cts.point(3,4),
               cts.point(4,5), cts.point(1,2)]) )

// => 3

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy