Returns the lineal distance between two points located on a perfect sphere of radius = 6370986m. It is more quick than
geo.distanceSpheroid but less accurate.
1 geo.distanceSphere
<geo.distanceSphere
ora_tol='ora_tol'
ora_unit='M|KM|CM|MM|MILE|NAUT_MILE|FOOT|INCH|SQ_KM...'
>
<geom1> *
<geom1 /> *
</geom1>
<geom2> *
<geom1 /> *
</geom2>
</geo.distanceSphere>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aora_tol | decimal | 0.05 | Tolerance. It is only used in oracle. | ||
Aora_unit | string | Unit of measurement. If not specified, ORACLE will use the default unit of the SRID of the geometry. It is only used in oracle. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Egeom1 | geometry | Geometric object type POINT. | |||
Egeom1 | geometry | ||||
Egeom2 | geometry | Geometric object type POINT. | |||
Egeom1 | geometry |
Example
Copy
<select> <columns> <geo.distanceSphere ora_tol=''> <geom1>a.the_geom</geom1> <geom2>a.the_geom</geom2> </geo.distanceSphere> </columns> <from table='points' alias='a' > <join table='points' alias='b'> </join> </from> <where> a.name = 'Barcelona' AND b.name = 'London' </where> </select>