com.shephertz.app42.paas.sdk.jme.geo
Class GeoService

java.lang.Object
  extended by com.shephertz.app42.paas.sdk.jme.geo.GeoService

public class GeoService
extends java.lang.Object

Geo Spatial Service on cloud provides the storage, retrieval, querying and updating geo data. One can store the geo data by unique handler on the cloud and can apply search, update and query on it. Geo spatial query includes finding nearby/In circle target point from given point using geo points stored on the cloud.

See Also:
Geo

Constructor Summary
GeoService(java.lang.String apiKey, java.lang.String secretKey, java.lang.String baseURL)
           
 
Method Summary
 Geo createGeoPoints(java.lang.String geoStorageName, java.util.Vector geoPointsList)
          Stores the geo points with unique handler on the cloud.
 App42Response deleteStorage(java.lang.String storageName)
          Delete the specified Geo Storage from Cloud.
 Geo getAllPoints(java.lang.String storageName)
          Get All Point from storage.
 java.util.Vector getAllStorage()
          Fetch the name of all storage stored on the cloud.
 Geo getNearByPoint(java.lang.String storageName, java.lang.Double lat, java.lang.Double lng, int resultLimit)
          Search the near by point from specified source point.
 Geo getNearByPointsByMaxDistance(java.lang.String storageName, java.lang.Double lat, java.lang.Double lng, java.lang.Double distanceInKM)
          Search the near by point in given range(In KM) from specified source point.
 Geo getPointsWithInCircle(java.lang.String storageName, java.lang.Double lat, java.lang.Double lng, java.lang.Double radiusInKM, int resultLimit)
          Search the near by point from specified source point with in specified radius.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoService

public GeoService(java.lang.String apiKey,
                  java.lang.String secretKey,
                  java.lang.String baseURL)
Method Detail

createGeoPoints

public Geo createGeoPoints(java.lang.String geoStorageName,
                           java.util.Vector geoPointsList)
                    throws App42Exception
Stores the geo points with unique handler on the cloud. Geo point data contains lat, lng and marker of the point.

Parameters:
geoStorageName - - Unique handler for storage name
geoPointsList - - List of Geo Points to be saved
Returns:
Geo object containing List of Geo Points that have been saved
Throws:
App42Exception

deleteStorage

public App42Response deleteStorage(java.lang.String storageName)
                            throws App42Exception
Delete the specified Geo Storage from Cloud.

Parameters:
storageName - - Unique handler for storage name
Returns:
App42Response object containing the name of the storage that has been deleted
Throws:
App42Exception

getAllPoints

public Geo getAllPoints(java.lang.String storageName)
                 throws App42Exception
Get All Point from storage.

Parameters:
storageName - - Unique handler for storage name
Returns:
Geo object containing all the stored Geo Points for the specified storage
Throws:
App42Exception

getAllStorage

public java.util.Vector getAllStorage()
                               throws App42Exception
Fetch the name of all storage stored on the cloud.

Returns:
Geo object containing List of all the storage created
Throws:
App42Exception

getNearByPoint

public Geo getNearByPoint(java.lang.String storageName,
                          java.lang.Double lat,
                          java.lang.Double lng,
                          int resultLimit)
                   throws App42Exception
Search the near by point from specified source point. Points to be searched should already be stored on cloud using unique storage name handler.

Parameters:
storageName - - Unique handler for storage name
lat - - Latitude of source point
lng - - Longitude of source point
resultLimit - - Maximum number of results to be retrieved
Returns:
Geo object containing the target points in ascending order of distance from source point.
Throws:
App42Exception

getNearByPointsByMaxDistance

public Geo getNearByPointsByMaxDistance(java.lang.String storageName,
                                        java.lang.Double lat,
                                        java.lang.Double lng,
                                        java.lang.Double distanceInKM)
                                 throws App42Exception
Search the near by point in given range(In KM) from specified source point. Points to be searched should already be stored on cloud using unique storage name handler.

Parameters:
storageName - - Unique handler for storage name
lat - - Latitude of source point
lng - - Longitude of source point
distanceInKM - - Range in KM
Returns:
Geo object containing the target points in ascending order of distance from source point.
Throws:
App42Exception

getPointsWithInCircle

public Geo getPointsWithInCircle(java.lang.String storageName,
                                 java.lang.Double lat,
                                 java.lang.Double lng,
                                 java.lang.Double radiusInKM,
                                 int resultLimit)
                          throws App42Exception
Search the near by point from specified source point with in specified radius. Points to be searched should already be stored on cloud using unique storage name handler.

Parameters:
storageName - - Unique handler for storage name
lat - - Lattitude of source point
lng - - Longitude of source point
radiusInKM - - Radius in KM
resultLimit - - Maximum number of results to be retrieved
Returns:
Geo object containing the target points in ascending order of distance from source point.
Throws:
App42Exception