Class GeoCoordsUtils


  • public class GeoCoordsUtils
    extends java.lang.Object
    Provides helper methods to convert geographical coordinates into graph viewer coordinates.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static double MAX_LAT  
      private static double MAX_LON  
      private static double MIN_LAT  
      private static double MIN_LON  
    • Constructor Summary

      Constructors 
      Constructor Description
      GeoCoordsUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int[] convertToCartesian​(GeoCoords coords)
      Converts geographical coordinates into screen coordinates in a range [0, 100].
      private static int latToX​(double lat)
      Converts latitude into x-coordinate of the viewer.
      private static int lonToY​(double lon)
      Converts longtitude into y-coordinate of the viewer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GeoCoordsUtils

        public GeoCoordsUtils()
    • Method Detail

      • latToX

        private static int latToX​(double lat)
        Converts latitude into x-coordinate of the viewer.
      • lonToY

        private static int lonToY​(double lon)
        Converts longtitude into y-coordinate of the viewer.
      • convertToCartesian

        public static int[] convertToCartesian​(GeoCoords coords)
        Converts geographical coordinates into screen coordinates in a range [0, 100]. Returns [Y, X]