SQL function
|
Purpose
|
Equivalent solidDB API call
|
---|---|---|
GEO_BLOCKLIST(lat1,lon1,lat2,lon2,scale)
Legal scale values are from 1 to 100.
Example:
SELECT GEO_BLOCKLIST(59.999,60.001,29.999,30.001,1)
Result: udtm6dk,udtm6dm,udtm6dq,udtm6ds,
udtm6dt,udtm6du,udtm6dv,udtm6dw,udtm6dy |
Find the set of geohash blocks that fit inside a boundary that is defined by specified lines of latitude and longitude.
All parameters must be numeric.
Note Depending on the lines of longitude and latitude chosen, the list of blocks can be long. Choose an appropriate scale value to restrict the number of blocks returned.
|
|
GEO_BOUNDARY(lat1,lat2,lon1,lon2)
or
GEO_BOUNDARY(lat1,lat2,lon1,lon2,
latexc1,latexc2,lonexc1,lonexc2,…) Used with GEO_INSIDE in the WHERE clause of a SELECT statement.
Examples:
|
Define a square that is bound by lines of latitude and longitude.
You can provide multiple sequences of four parameters. Subsequent sets of co-ordinates exclude squares within the first set of co-ordinates. Up to five sets of co-ordinates are accepted.
All parameters must be numeric.
|
None
|
GEO_DECODE_LATITUDE(geohash)
GEO_DECODE_LATITUDE_HIGH(geohash)
GEO_DECODE_LATITUDE_LOW(geohash)
GEO_DECODE_LONGITUDE(geohash)
GEO_DECODE_LONGITUDE_HIGH(geohash)
GEO_DECODE_LONGITUDE_LOW(geohash)
GEO_DECODE_PRECISION(geohash)
Example:
SELECT GEO_DECODE_LATITUDE('u6ygjbew')
Result: 61.0
|
Convert a geohash value to coordinates and precision.
The parameter must be a legal geohash value in string format.
|
|
GEO_ENCODE(lat,lon,precision)
Example:
SELECT GEO_ENCODE(61.0,21.0,8)
Result: u6ygjbew
|
Convert co-ordinates to geohash values.
All parameters must be numeric.
|
|
GEO_HASHTOBOUNDARY(geohash)
Example:
SELECT GEO_HASHTOBOUNDARY('u6ygjbew')
Result: 0.999870,61.000042,20.999680,
21.000023 |
Convert a geohash to a boundary that is defined lines of latitude and longitude.
The parameter must be a legal geohash value in string format.
|
|
GEO_INSIDE
Used in the WHERE clause of a SELECT statement.
Example:
SELECT * FROM T WHERE GH GEO_INSIDE GEO_BOUNDARY(-50,-40,-43,-40)
Result: 5pf666yc
|
Find all geohash blocks within a specified boundary that is defined by lines of latitude and longitude.
|
None
|
GEO_NEIGHBOR(geohash,direction)
or
GEO_NEIGHBOUR(geohash,direction)
Example:
SELECT GEO_NEIGHBOR('u6ygjbew',1)
Result: u6ygjbez
|
Find an adjacent geohash block in a given direction.
The parameters must be a legal geohash value in string format and a direction as an integer.
|
|
GEO_NEIGHBORS(geohash)
or
GEO_NEIGHBOURS(geohash)
Example:
SELECT GEO_NEIGHBORHOOD('5pf666y7')
Result: 5pf666yw,5pf666y1,5pf666y2,
5pf666yb,5pf666yc,5pf666ye, 5pf666yf,5pf666yg |
Find adjacent geohash blocks in all 8 directions.
The parameter must be a legal geohash value in string format.
|
|
GEO_NEIGHBORHOODTOBOUNDARY(geohash)
or
GEO_NEIGHBOURHOODTOBOUNDARY(geohash)
Used with GEO_INSIDE in the WHERE clause of a SELECT statement.
Example:
SELECT * FROM T WHERE GH GEO_INSIDE GEO_NEIGHBORHOODTOBOUNDARY('5pf')
Result: 5pf666yc
|
Find the boundary of the geohash neighborhood (the lines of latitude and longitude that define the edges of the area that contains the geohash and its adjacent neighbors).
The parameter must be a legal geohash value in string format.
|