admin:database-geospatial-region-path-index( $pathexpr as xs:string, $coordinate-system as xs:string, $geohash-precision as xs:integer, $invalid-values as xs:string, [$units as xs:string?] ) as element(db:geospatial-region-path-index)
This function constructs a geospatial region path index specification.
Parameters | |
---|---|
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 or ignore .
|
units |
Measure distance and the radii of circles in the specified units.
Allowed values: miles (default), km ,
feet , meters .
|
xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; admin:database-geospatial-region-path-index( "//kml:LinearRing/kml:coordinates", "wgs84", 2, "reject", "miles") (: A geospatial region path index specification :)