|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gisgraphy.helper.GeolocHelper
public class GeolocHelper
Provides useful methods for geolocalisation
| Constructor Summary | |
|---|---|
GeolocHelper()
|
|
| Method Summary | |
|---|---|
static com.vividsolutions.jts.geom.Point |
createPoint(java.lang.Float longitude,
java.lang.Float latitude)
Create a JTS point from the specified longitude and latitude for the SRID (aka : Spatial Reference IDentifier) 4326 (WGS84) |
static double |
distance(com.vividsolutions.jts.geom.Point point1,
com.vividsolutions.jts.geom.Point point2)
Calculate the distance between the specified point. |
static java.lang.Class<? extends GisFeature> |
getClassEntityFromString(java.lang.String classNameWithoutPackage)
Return the class corresponding to the specified String or null if not found. |
static float |
parseInternationalDouble(java.lang.String number)
parse a string and return the corresponding double value, it accepts comma or point as decimal separator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GeolocHelper()
| Method Detail |
|---|
public static com.vividsolutions.jts.geom.Point createPoint(java.lang.Float longitude,
java.lang.Float latitude)
longitude - The longitude for the pointlatitude - The latitude for the point
java.lang.IllegalArgumentException - if latitude is not between -90 and 90, or longitude is
not between -180 and 180SRID
public static double distance(com.vividsolutions.jts.geom.Point point1,
com.vividsolutions.jts.geom.Point point2)
point1 - The first JTS pointpoint2 - The second JTS point
public static java.lang.Class<? extends GisFeature> getClassEntityFromString(java.lang.String classNameWithoutPackage)
classNameWithoutPackage - the simple name of the Class we want to retrieve
public static float parseInternationalDouble(java.lang.String number)
throws java.text.ParseException
number - the number with a point or a comma as decimal separator
java.text.ParseException - in case of errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||