Returns true if the two indicated points are at a lower distance than the previous.
1 geo.isWithinDistance
<geo.isWithinDistance distance='distance'>
<lat1 /> +
<lng1 /> +
<lat2 /> +
<lng2 /> +
</geo.isWithinDistance>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Adistance | decimal | Distance in meters. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Elat1 | decimal | Latitude of the point 1. | |||
Elng1 | decimal | Length of the point 1. | |||
Elat2 | decimal | Latitude of the point 2. | |||
Elng2 | decimal | Lenght of the point 2. |
Example
Calculate if a point is at a lower distance than or equal to another.
Copy
<xsql-script> <body> <return> <geo.isWithinDistance distance="100000"> <number>41.383333</number> <!-- bcn --> <number>2.183333</number> <number>41.984444 </number> <!-- girona --> <number>2.821111</number> </geo.isWithinDistance> </return> </body> </xsql-script>