Loading TOC...

geo.removeDuplicateVertices

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

Summary

This function removes duplicate (adjacent) vertices. Whether a vertex counts as a duplicate depends on the governing coordinate system. If it is applied to a box, circle, or point, no action is taken and the region is returned unchanged.

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.

Example

geo.removeDuplicateVertices(
  cts.polygon([
    cts.point(40.1234567890,-120.1234567890),
    cts.point(40.123456543,-120.123456543),
    cts.point(40.12455,-120.123467),
    cts.point(40.13456,-120.1455195)]))

// => A cts.region with the following coordinates:
//    40.123457,-120.12346 40.12455,-120.12347 40.13456,-120.14552
//    40.123457,-120.12346"

Comments

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