com.gisgraphy.domain.geoloc.service.geoloc
Class GeolocQuery
java.lang.Object
com.gisgraphy.domain.geoloc.service.AbstractGisQuery
com.gisgraphy.domain.geoloc.service.geoloc.GeolocQuery
- Direct Known Subclasses:
- StreetSearchQuery
public class GeolocQuery
- extends AbstractGisQuery
A GeolocQuery Query
- Author:
- David Masclet
- See Also:
Pagination
,
Output
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
DEFAULT_RADIUS
public static final double DEFAULT_RADIUS
- Default radius in meters
- See Also:
- Constant Field Values
GeolocQuery
public GeolocQuery(javax.servlet.http.HttpServletRequest req)
- Parameters:
req
- an HttpServletRequest to construct a GeolocQuery
GeolocQuery
public GeolocQuery(com.vividsolutions.jts.geom.Point point,
double radius,
Pagination pagination,
Output output,
java.lang.Class<? extends GisFeature> placeType)
- Parameters:
point
- the point to query aroundradius
- The radius (distance) in meterspagination
- The pagination specification, if null : use defaultoutput
- Output
The output specification , if null : use
defaultplaceType
- the type of gis to search , if null : search for all place
type.
- Throws:
An
- IllegalArgumentException
if the point is null
GeolocQuery
public GeolocQuery(com.vividsolutions.jts.geom.Point point,
double radius)
- Constructor with default Pagination, Output,
and placetype (see
GisgraphyConfig.defaultGeolocSearchPlaceTypeClass
- Parameters:
point
- The point from which we want to find GIS Objectradius
- The radius (distance) in meters
GeolocQuery
public GeolocQuery(com.vividsolutions.jts.geom.Point point)
- Constructor with default Pagination, Output,
radius and placetype
- Parameters:
point
- The point from which we want to find GIS Object- See Also:
DEFAULT_RADIUS
hashCode
public int hashCode()
- Overrides:
hashCode
in class AbstractGisQuery
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class AbstractGisQuery
getLatitude
public java.lang.Double getLatitude()
- Returns:
- The latitude (north-south) .
- See Also:
getLongitude()
getLongitude
public java.lang.Double getLongitude()
- Returns:
- Returns the longitude (east-West).
- See Also:
getLongitude()
getPoint
public com.vividsolutions.jts.geom.Point getPoint()
- Returns:
- The point from which we want to find GIS Object
getRadius
public double getRadius()
- Returns:
- The radius
isOutputIndented
public boolean isOutputIndented()
- Returns:
- Wether the output will be indented
- See Also:
Output.isIndented()
toString
public java.lang.String toString()
- Overrides:
toString
in class AbstractGisQuery
getPlaceType
public java.lang.Class<? extends GisFeature> getPlaceType()
- Returns:
- the placeType : it limits the search to an object of a specific
class
withPlaceType
public GeolocQuery withPlaceType(java.lang.Class<? extends GisFeature> placeType)
- Parameters:
placeType
- The placeType to set, if null, search for all placetype
- Returns:
- The current query to chain methods
getMaxLimitResult
public int getMaxLimitResult()
- Overrides:
getMaxLimitResult
in class AbstractGisQuery
- Returns:
- the maximum number of results that the query should return
hasDistanceField
public boolean hasDistanceField()
- Returns:
- true if the distance should be calculate or not
withDistanceField
public GeolocQuery withDistanceField(boolean distanceField)
- Parameters:
distanceField
- If the distance should be include or not
- Returns:
- Whether the distance field should be output
Copyright © 2010. All Rights Reserved.