cts:geospatial-region-path-reference( $path-expression as xs:string, [$options as xs:string*], [$namespaces as map:map], [$geohash-precision as xs:integer?], [$units as xs:string?], [$invalid-values as xs:string?] ) as cts:reference
Create a reference to a geospatial region path index, for use as a parameter to cts:geospatial-region-query and other query operations on geospatial region indexes. This function throws an exception if the specified region path index does not exist.
precision
option takes precedence over
that implied by the governing coordinate system name, including the
value of the coordinate-system
option. For example, if the
governing coordinate system is "wgs84/double" and the precision
option is "float", then the reference uses single precision. An exception
is thrown if an index with the specified precision does not exist.
cts:geospatial-region-path-reference("//item/region") => A region path index reference of the following form: cts:geospatial-region-path-reference( "//item/region",("coordinate-system=wgs84"))
cts:geospatial-region-path-reference( "//item/region", ("precision=double", "coordinate-system=wgs84") => A region path index reference of the following form: cts:geospatial-region-path-reference( "//item/region",("coordinate-system=wgs84/double"))
cts:geospatial-region-path-reference( "//item/region", ("precision=double", "coordinate-system=wgs84"), (), 4, "miles", "reject") => A region path index reference of the following form: cts:geospatial-region-path-reference( "//item/region",("coordinate-system=wgs84/double"),("geohash-precision=4"),("units=miles"),("invalid-values=0"))
xquery version "1.0-ml"; let $namespaces := map:map() let $_ := map:put($namespaces, "kml", "http://www.opengis.net/kml/2.2") return cts:geospatial-region-path-reference( "//kml:LinearRing/kml:coordinates", (),$namespaces) => A region path index reference of the following form: cts:geospatial-region-path-reference( "//kml:LinearRing/kml:coordinates",("coordinate-system=wgs84"),map:map(...))
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.