XPath/XQuery Functions: Geolocation
The following geolocation XPath/XQuery extension functions are supported in the current version of StyleVision and can be used in (i) XPath expressions in an XSLT context, or (ii) XQuery expressions in an XQuery document.
Note about naming of functions and language applicability
Altova extension functions can be used in XPath/XQuery expressions. They provide additional functionality to the functionality that is available in the standard library of XPath, XQuery, and XSLT functions. Altova extension functions are in the Altova extension functions namespace, http://www.altova.com/xslt-extensions, and are indicated in this section with the prefix altova:, which is assumed to be bound to this namespace. Note that, in future versions of your product, support for a function might be discontinued or the behavior of individual functions might change. Consult the documentation of future releases for information about support for Altova extension functions in that release.
|
altova:format-geolocation(Latitude as xs:decimal, Longitude as xs:decimal, GeolocationOutputStringFormat as xs:integer) as xs:string XP3.1 XQ3.1 Takes the latitude and longitude as the first two arguments, and outputs the geolocation as a string. The third argument, GeolocationOutputStringFormat, is the format of the geolocation output string; it uses integer values from 1 to 4 to identify the output string format (see 'Geolocation output string formats' below). Latitude values range from +90 to -90 (N to S). Longitude values range from +180 to -180 (E to W).
Note: The image-exif-data function and the Exif metadata's attributes can be used to supply the input strings.
|
altova:parse-geolocation(GeolocationInputString as xs:string) as xs:decimal+ XP3.1 XQ3.1 Parses the supplied GeolocationInputString argument and returns the geolocation's latitude and longitude (in that order) as a sequence two xs:decimal items. The formats in which the geolocation input string can be supplied are listed below.
Note: The image-exif-data function and the Exif metadata's @Geolocation attribute can be used to supply the geolocation input string (see example below).
| |||||||||||||
altova:geolocation-distance-km(GeolocationInputString-1 as xs:string, GeolocationInputString-2 as xs:string) as xs:decimal XP3.1 XQ3.1 Calculates the distance between two geolocations in kilometers. The formats in which the geolocation input string can be supplied are listed below. Latitude values range from +90 to -90 (N to S). Longitude values range from +180 to -180 (E to W).
Note: The image-exif-data function and the Exif metadata's @Geolocation attribute can be used to supply geolocation input strings.
|
altova:geolocation-distance-mi(GeolocationInputString-1 as xs:string, GeolocationInputString-2 as xs:string) as xs:decimal XP3.1 XQ3.1 Calculates the distance between two geolocations in miles. The formats in which a geolocation input string can be supplied are listed below. Latitude values range from +90 to -90 (N to S). Longitude values range from +180 to -180 (E to W).
Note: The image-exif-data function and the Exif metadata's @Geolocation attribute can be used to supply geolocation input strings.
|
altova:geolocations-bounding-rectangle(Geolocations as xs:sequence, GeolocationOutputStringFormat as xs:integer) as xs:string XP3.1 XQ3.1 Takes a sequence of strings as its first argument; each string in the sequence is a geolocation. The function returns a sequence of two strings which are, respectively, the top-left and bottom-right geolocation coordinates of a bounding rectangle that is optimally sized to enclose all the geolocations submitted in the first argument. The formats in which a geolocation input string can be supplied are listed below (see 'Geolocation input string formats'). Latitude values range from +90 to -90 (N to S). Longitude values range from +180 to -180 (E to W).
The function's second argument specifies the format of the two geolocation strings in the output sequence. The argument takes an integer value from 1 to 4, where each value identifies a different geolocation string format (see 'Geolocation output string formats' below).
Note: The image-exif-data function and the Exif metadata's attributes can be used to supply the input strings.
|
altova:geolocation-within-polygon(Geolocation as xs:string, ((PolygonPoint as xs:string)+)) as xs:boolean XP3.1 XQ3.1 Determines whether Geolocation (the first argument) is within the polygonal area described by the PolygonPoint arguments. If the PolygonPoint arguments do not form a closed figure (formed when the first point and the last point are the same), then the first point is implicitly added as the last point in order to close the figure. All the arguments (Geolocation and PolygonPoint+) are given by geolocation input strings (formats listed below). If the Geolocation argument is within the polygonal area, then the function returns true(); otherwise it returns false(). Latitude values range from +90 to -90 (N to S). Longitude values range from +180 to -180 (E to W).
Note: The image-exif-data function and the Exif metadata's @Geolocation attribute can be used to supply geolocation input strings.
|
altova:geolocation-within-rectangle(Geolocation as xs:string, RectCorner-1 as xs:string, RectCorner-2 as xs:string) as xs:boolean XP3.1 XQ3.1 Determines whether Geolocation (the first argument) is within the rectangle defined by the second and third arguments, RectCorner-1 and RectCorner-2, which specify opposite corners of the rectangle. All the arguments (Geolocation, RectCorner-1 and RectCorner-2) are given by geolocation input strings (formats listed below). If the Geolocation argument is within the rectangle, then the function returns true(); otherwise it returns false(). Latitude values range from +90 to -90 (N to S). Longitude values range from +180 to -180 (E to W).
Note: The image-exif-data function and the Exif metadata's @Geolocation attribute can be used to supply geolocation input strings.
|
[ Top ]