public class GeoLocation extends Object implements ICleanable
| Constructor and Description |
|---|
GeoLocation() |
GeoLocation(String place)
Constructor that sets the name of the location.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPolygons(Collection<com.vividsolutions.jts.geom.Geometry> geoList)
Adds a Collection of Geometry objects to the List
of Polygons.
|
protected boolean |
canEqual(Object other) |
boolean |
clean()
Cleans each GeoJson attached to the location.
|
boolean |
equals(Object o) |
com.vividsolutions.jts.geom.Polygon |
getBox()
Retrieves the spatial limits of a box.
|
String |
getPlace()
Retrieves the free text description of the geographic location.
|
com.vividsolutions.jts.geom.Point |
getPoint()
Retrieves the point location in space.
|
Set<com.vividsolutions.jts.geom.Polygon> |
getPolygons()
Retrieves a list of drawn polygon areas, defined by sets of points and
lines connecting the points in closed chains.
|
int |
hashCode() |
boolean |
isValid()
Returns true if the GeoLocation has any geographical data
or at least a textual description.
|
void |
setBox(double westBoundLongitude,
double eastBoundLongitude,
double southBoundLatitude,
double northBoundLatitude)
Changes the spatial limits of a box, defining its shape.
|
void |
setBox(com.vividsolutions.jts.geom.Geometry geometry)
Changes the spatial limits of a box, defining its shape.
|
void |
setPlace(String place)
Sets the free text description of the geographic location.
|
void |
setPoint(double longitude,
double latitude)
Changes the point location in space.
|
void |
setPoint(com.vividsolutions.jts.geom.Point point)
Sets the point location in space.
|
String |
toString() |
public GeoLocation(String place)
place - free text description of the geographic locationpublic GeoLocation()
public void setBox(double westBoundLongitude,
double eastBoundLongitude,
double southBoundLatitude,
double northBoundLatitude)
westBoundLongitude - western longitudinal dimension of the boxeastBoundLongitude - eastern longitudinal dimension of the boxsouthBoundLatitude - southern latitudinal dimension of the boxnorthBoundLatitude - northern latitudinal dimension of the boxpublic void setBox(com.vividsolutions.jts.geom.Geometry geometry)
geometry - a GeoJson object, the bounding box of which becomes the boxpublic void setPoint(double longitude,
double latitude)
longitude - a geographic coordinate that specifies the east-west position of a point on the Earth's surfacelatitude - a geographic coordinate that specifies the north–south position of a point on the Earth's surfacepublic void addPolygons(Collection<com.vividsolutions.jts.geom.Geometry> geoList)
geoList - a collection of Polygons and MultiPolygonspublic boolean clean()
clean in interface ICleanablepublic boolean isValid()
public String getPlace()
public com.vividsolutions.jts.geom.Point getPoint()
public com.vividsolutions.jts.geom.Polygon getBox()
public Set<com.vividsolutions.jts.geom.Polygon> getPolygons()
public void setPlace(String place)
place - the free text description of the geographic locationpublic void setPoint(com.vividsolutions.jts.geom.Point point)
point - a point location in spaceprotected boolean canEqual(Object other)
Copyright © 2017–2019. All rights reserved.