java.lang.Objectcom.ulocate.api.geo.GeoSearch
public class GeoSearch
GeoSearch provides functions for local search. This class is intended to be used
by developers unfamiliar with spatial data and spatial queries who want to
write local search applications/widgets.
The tables to be queried must contain columns for latitude and longitude in decimal degrees and a minimum of one more column.
We recommend to create indexes for the latitude and longitude columns.
The search functions of this class are written for quick development and are not high performance. If you have very large
tables these search functions might take a bit of time.
Use GeoCalc for unit of measurements and distance calculations.
| Constructor Summary | |
|---|---|
GeoSearch()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getWithinDistanceSQL_Accurate(double longitude,
double latitude,
double searchDistance,
double uom,
java.lang.String colReturn,
java.lang.String table,
java.lang.String colLongitude,
java.lang.String colLatitude,
java.lang.String customSQL,
int offset,
int rows)
This function creates a string of a SQL statement. |
java.lang.String |
getWithinDistanceSQL_Approximate(double longitude,
double latitude,
double searchDistance,
double uom,
java.lang.String colReturn,
java.lang.String table,
java.lang.String colLongitude,
java.lang.String colLatitude,
java.lang.String customSQL,
int offset,
int rows)
This function creates a string of a SQL statement. |
java.lang.String |
getWithinDistanceSQL_Mix(double longitude,
double latitude,
double searchDistance,
double uom,
java.lang.String colReturn,
java.lang.String table,
java.lang.String colLongitude,
java.lang.String colLatitude,
java.lang.String customSQL,
int offset,
int rows)
This function creates a string of a SQL statement. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GeoSearch()
| Method Detail |
|---|
public java.lang.String getWithinDistanceSQL_Accurate(double longitude,
double latitude,
double searchDistance,
double uom,
java.lang.String colReturn,
java.lang.String table,
java.lang.String colLongitude,
java.lang.String colLatitude,
java.lang.String customSQL,
int offset,
int rows)
longitude - Longitude of the search center.latitude - Latitude of the search center.searchDistance - Search distance.uom - Unit of measurement for the search distance and the calculated distances.colReturn - The columns to select. Must have at least one column!table - The table containing the points.colLongitude - The column containing the longitude values.colLatitude - The column containing the latitude values.customSQL - Additinal SQL statement for the where clause. For example: "name LIKE '%Starbucks%' OR category = 'Coffee Shops'".offset - Offset for pageing. Set to -1 for no limit.rows - Number of rows to be returned.
public java.lang.String getWithinDistanceSQL_Approximate(double longitude,
double latitude,
double searchDistance,
double uom,
java.lang.String colReturn,
java.lang.String table,
java.lang.String colLongitude,
java.lang.String colLatitude,
java.lang.String customSQL,
int offset,
int rows)
longitude - Longitude of the search center.latitude - Latitude of the search center.searchDistance - Search distance.uom - Unit of measurement for the search distance and the calculated distances.colReturn - The columns to select. Must have at least one column!table - The table containing the points.colLongitude - The column containing the longitude values.colLatitude - The column containing the latitude values.customSQL - Additinal SQL statement for the where clause. For example: "name LIKE '%Starbucks%' OR category = 'Coffee Shops'".offset - Offset for pageing. Set to -1 for no limit.rows - Number of rows to be returned.
public java.lang.String getWithinDistanceSQL_Mix(double longitude,
double latitude,
double searchDistance,
double uom,
java.lang.String colReturn,
java.lang.String table,
java.lang.String colLongitude,
java.lang.String colLatitude,
java.lang.String customSQL,
int offset,
int rows)
longitude - Longitude of the search center.latitude - Latitude of the search center.searchDistance - Search distance.uom - Unit of measurement for the search distance and the calculated distances.colReturn - The columns to select. Must have at least one column!table - The table containing the points.colLongitude - The column containing the longitude values.colLatitude - The column containing the latitude values.customSQL - Additinal SQL statement for the where clause. For example: "name LIKE '%Starbucks%' OR category = 'Coffee Shops'".offset - Offset for pageing. Set to -1 for no limit.rows - Number of rows to be returned.