| 4 | | * intersections (point, line, polygon) |
| | 11 | |
| | 12 | * Distance measurements |
| | 13 | select distance( |
| | 14 | (transform(GeomFromText('Point(lon lat)'), 900913), 26915), |
| | 15 | (transform(GeomFromText('Point(lon lat)'), 900913), 26915); |
| | 16 | |
| | 17 | * intersections |
| | 18 | select name from location where |
| | 19 | GeomFromText('Point(lon lat)',900913) |
| | 20 | && the_geom AND |
| | 21 | within (GeomFromText('Point(lon lat)', 900913), the_geom); |
| | 22 | |
| | 23 | * Point within polygon |
| | 24 | select name from location where |
| | 25 | GeomFromText('Point(lon lat)', 900913) |
| | 26 | && the_geom; |
| | 27 | |
| | 28 | * Spherical distance |
| | 29 | select distance_sphere( |
| | 30 | (transform(GeomFromText('Point(lon lat)'), 900913), |
| | 31 | (transform(GeomFromText('Point(lon lat)'), 900913); |
| | 32 | |
| | 33 | * Spheroid distance |
| | 34 | select distance_spheroid( |
| | 35 | (GeomFromText('Point(lon lat)'), 900913), |
| | 36 | (GeomFromText('Point(lon lat)'), 900913), |
| | 37 | 'SPHEROID["GRS 1980", 6378137, 298.257222101]'); |
| | 38 | |