Package provided.owlMaps.utils.impl
Class AOwlMapUtils
java.lang.Object
provided.owlMaps.utils.impl.AOwlMapUtils
- All Implemented Interfaces:
IOwlMapUtils
public abstract class AOwlMapUtils extends java.lang.Object implements IOwlMapUtils
Abstract implementation of IOwlMapUtils
- Author:
- swong
-
Constructor Summary
Constructors Constructor Description AOwlMapUtils() -
Method Summary
Modifier and Type Method Description IPath<ILatLng>convertPointsToLatLng(ILatLng originLatLng, IPath<java.awt.geom.Point2D> pts)Convert a path of Point2D's to a path of ILatLng where the points are relative to the given origin location.IPaths<ILatLng>convertPointsToLatLng(ILatLng originLatLng, IPaths<java.awt.geom.Point2D> pts)Convert paths of Point2D's to paths of ILatLng where the points are relative to the given origin location.doublegetEarthEquatorialRadius()Get the Earth's radius at the equator in the units currently used by the system.doublegetEarthMeanRadius()Get the mean Earth radius in the units currently used by the system.doublegetEarthPolarRadius()Get the Earth's radius at the poles in the units currently used by the system.doublegetEarthRadius(double lat)Get the Earth's radius at the given latitude.doublegetLatFactor(double lat)Get the length per degree factor for length per degree in a fixed latitude line at the given latitude.ILatLnggetLatLngRelativeTo(ILatLng originLatLng, java.awt.geom.Point2D pt)Get the ILatLng that is the vector distance from the given origin ILatLng Assumes that the distances involved are small relative to the size of the Earth or errors will occur due to the ellipsoidal nature of the globe.doublegetLngFactor(double lat)Get the small angle approximation for the length per degree of factor for distances along a fixed longitude line at the given latitude.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface provided.owlMaps.utils.IOwlMapUtils
getSystemLengthUnit
-
Constructor Details
-
AOwlMapUtils
public AOwlMapUtils()
-
-
Method Details
-
convertPointsToLatLng
public IPath<ILatLng> convertPointsToLatLng(ILatLng originLatLng, IPath<java.awt.geom.Point2D> pts)Description copied from interface:IOwlMapUtilsConvert a path of Point2D's to a path of ILatLng where the points are relative to the given origin location. Assumes that the distances involved are small relative to the size of the Earth or errors will occur due to the ellipsoidal nature of the globe. Units are in the currently used system length units.- Specified by:
convertPointsToLatLngin interfaceIOwlMapUtils- Parameters:
originLatLng- The ILatLng designating the originpts- path of points relative to the originLatLng- Returns:
- An IPath of ILatLngs
-
convertPointsToLatLng
public IPaths<ILatLng> convertPointsToLatLng(ILatLng originLatLng, IPaths<java.awt.geom.Point2D> pts)Description copied from interface:IOwlMapUtilsConvert paths of Point2D's to paths of ILatLng where the points are relative to the given origin location. Paths could be a simple IPath or a compound IPaths (path of paths) of points. Assumes that the distances involved are small relative to the size of the Earth or errors will occur due to the ellipsoidal nature of the globe. Units are in the currently used system length units.- Specified by:
convertPointsToLatLngin interfaceIOwlMapUtils- Parameters:
originLatLng- The LatLng designating the originpts- paths of points relative to the originLatLng- Returns:
- An IPaths of ILatLngs
-
getLatLngRelativeTo
Description copied from interface:IOwlMapUtilsGet the ILatLng that is the vector distance from the given origin ILatLng Assumes that the distances involved are small relative to the size of the Earth or errors will occur due to the ellipsoidal nature of the globe.- Specified by:
getLatLngRelativeToin interfaceIOwlMapUtils- Parameters:
originLatLng- The origin coordinatept- A vector from the origin in feet- Returns:
- an ILatLng corresponding to the point relative to the origin.
-
getEarthMeanRadius
public double getEarthMeanRadius()Description copied from interface:IOwlMapUtilsGet the mean Earth radius in the units currently used by the system.- Specified by:
getEarthMeanRadiusin interfaceIOwlMapUtils- Returns:
- The mean Earth radius in the system's current length measurement units.
-
getEarthEquatorialRadius
public double getEarthEquatorialRadius()Description copied from interface:IOwlMapUtilsGet the Earth's radius at the equator in the units currently used by the system.- Specified by:
getEarthEquatorialRadiusin interfaceIOwlMapUtils- Returns:
- The equatorial radius of the Earth
-
getEarthPolarRadius
public double getEarthPolarRadius()Description copied from interface:IOwlMapUtilsGet the Earth's radius at the poles in the units currently used by the system.- Specified by:
getEarthPolarRadiusin interfaceIOwlMapUtils- Returns:
- The polar radius of the Earth
-
getEarthRadius
public double getEarthRadius(double lat)Description copied from interface:IOwlMapUtilsGet the Earth's radius at the given latitude. The Earth's radius depends on latitude because it is an ellipsoid. The units are in the currently used system units.- Specified by:
getEarthRadiusin interfaceIOwlMapUtils- Parameters:
lat- The latitude to measure the radius- Returns:
- The Earth's radius at the given latitude
-
getLatFactor
public double getLatFactor(double lat)Description copied from interface:IOwlMapUtilsGet the length per degree factor for length per degree in a fixed latitude line at the given latitude. The calculation accounts for the dependence of the Earth's radius on latitude. However, caution should be observed for calculations done near the poles as out-of-bounds longitude values could easily occur.- Specified by:
getLatFactorin interfaceIOwlMapUtils- Parameters:
lat- The latitude to calculate the conversion factor at.- Returns:
- length per degree of longitude in the current units used by the system.
-
getLngFactor
public double getLngFactor(double lat)Description copied from interface:IOwlMapUtilsGet the small angle approximation for the length per degree of factor for distances along a fixed longitude line at the given latitude. The calculation assumes that the Earth is a sphere equal to the Earth's radius at the given latitude. This could generate errors if the distances are very large since the Earth is an ellipsoid.- Specified by:
getLngFactorin interfaceIOwlMapUtils- Parameters:
lat- The latitude to calculate the conversion factor at.- Returns:
- length per degree of latitude in the current units used by the system.
-