|
|
cts:arc-intersection(
|
|
$p1 as cts:point,
|
|
$p2 as cts:point,
|
|
$q1 as cts:point,
|
|
$q2 as cts:point,
|
|
[$options as xs:string*]
|
| ) as cts:point |
|
 |
Summary:
Returns the point at the intersection of two arcs. If the arcs do
not intersect, or lie on the same great circle, or if either arc covers
more than 180 degrees, an error is raised.
|
Parameters:
$p1
:
The starting point of the first arc.
|
$p2
:
The ending point of the first arc.
|
$q1
:
The starting point of the second arc.
|
$q2
:
The ending point of the second arc.
|
$options
(optional):
Options for the operation. The default is ().
Options include:
- "coordinate-system=wgs84"
- Use the WGS84 coordinate system.
|
|
Example:
let $sf := cts:point(37, -122)
let $ny := cts:point(40, -73)
let $a := cts:point(35,-100)
let $b := cts:point(41,-70)
return
cts:arc-intersection($sf,$ny,$a,$b)
=> 40.458347,-76.203682
|
|
|
|
cts:polygon(
|
|
$vertices as cts:point*
|
| ) as cts:polygon |
|
 |
Summary:
Returns a geospatial polygon value.
|
Parameters:
$vertices
:
The vertices of the polygon, given in order. No edge may cover
more than 180 degrees of either latitude or longitude.
The polygon as a whole may not encompass both
poles. These constraints are necessary to ensure an unambiguous
interpretation of the polygon. There must be at least three vertices.
The first vertex should be identical to the last vertex to close the
polygon.
vertexes.
|
|
Example:
(: this polygon approximates the 94041 zip code :)
let $points := (cts:point(0.373899653086420E+02, -0.122078578406509E+03),
cts:point(0.373765400000000E+02, -0.122063772000000E+03),
cts:point(0.373781400000000E+02, -0.122067972000000E+03),
cts:point(0.373825650000000E+02, -0.122068365000000E+03),
cts:point(0.373797400000000E+02, -0.122072172000000E+03),
cts:point(0.373899400000000E+02, -0.122092573000000E+03),
cts:point(0.373941400000000E+02, -0.122095573000000E+03),
cts:point(0.373966400000000E+02, -0.122094173000000E+03),
cts:point(0.373958400000000E+02, -0.122092373000000E+03),
cts:point(0.374004400000000E+02, -0.122091273000000E+03),
cts:point(0.374004400000000E+02, -0.122091273000000E+03),
cts:point(0.373873400000000E+02, -0.122057872000000E+03),
cts:point(0.373873400000000E+02, -0.122057872000000E+03),
cts:point(0.373854400000000E+02, -0.122052672000000E+03),
cts:point(0.373833400000000E+02, -0.122053372000000E+03),
cts:point(0.373819400000000E+02, -0.122057572000000E+03),
cts:point(0.373775400000000E+02, -0.122060872000000E+03),
cts:point(0.373765400000000E+02, -0.122063772000000E+03) )
return
cts:polygon($points)
|
|
|
|
cts:polygon-vertices(
|
|
$polygon as cts:polygon
|
| ) as cts:point* |
|
 |
Summary:
Returns a polygon's vertices.
The first vertex and last vertex will always be the same.
|
Parameters:
$polygon
:
The polygon.
|
|
Example:
let $node :=
<polygon zip="94041">
0.373899653086420E+02, -0.122078578406509E+03
0.373765400000000E+02, -0.122063772000000E+03
0.373781400000000E+02, -0.122067972000000E+03
0.373825650000000E+02, -0.122068365000000E+03
0.373797400000000E+02, -0.122072172000000E+03
0.373899400000000E+02, -0.122092573000000E+03
0.373941400000000E+02, -0.122095573000000E+03
0.373966400000000E+02, -0.122094173000000E+03
0.373958400000000E+02, -0.122092373000000E+03
0.374004400000000E+02, -0.122091273000000E+03
0.374004400000000E+02, -0.122091273000000E+03
0.373873400000000E+02, -0.122057872000000E+03
0.373873400000000E+02, -0.122057872000000E+03
0.373854400000000E+02, -0.122052672000000E+03
0.373833400000000E+02, -0.122053372000000E+03
0.373819400000000E+02, -0.122057572000000E+03
0.373775400000000E+02, -0.122060872000000E+03
0.373765400000000E+02, -0.122063772000000E+03
</polygon>
return
cts:polygon-vertices(cts:polygon(fn:data($node)))
|
|
|