Loading TOC...


   $pathexpr as String,
   $coordinate-system as String,
   $geohash-precision as Number,
   $invalid-values as String,
   [$units as String?]
) as element(db.geospatialRegionPathIndex)


This function constructs a geospatial region path index specification.

$pathexpr The path expression for the index. The path should return true from cts:valid-index-path.
$coordinate-system The coordinate system. Must be one of wgs84, wgs84/double, etrs89, etrs89/double, raw, raw/double.
$geohash-precision Specify the precision of the geohashes to use in the index. Higher numbers result in a more precise index and faster queries, at the expense of increased index size and slower ingestion speed. Value must be between 2 and 6 (inclusive) if using a single precision coordinate system; between 3 and 6 if double precision. Ignored for raw and raw/double coordinate systems.
$invalid-values Specify how to handle values that cannot be parsed as regions. Must be one of: reject, ignore.
$units Measure distance and the radii of circles in the specified units. Allowed values: miles (default), km, feet, meters.


const admin = require('/MarkLogic/admin.xqy');

    "//kml.LinearRing/kml.coordinates", "wgs84", 2, "reject", "miles")
 //A geospatial region path index specification 

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.