Class Projection

java.lang.Object
org.oscim.tiling.source.mapfile.Projection

public class Projection extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    latitudeToPixelY(double latitude, int zoomLevel)
    Converts a latitude coordinate (in degrees) to a pixel Y coordinate at a certain zoom level.
    static long
    latitudeToTileY(double latitude, int zoomLevel)
    Converts a latitude coordinate (in degrees) to a tile Y number at a certain zoom level.
    static double
    longitudeToPixelX(double longitude, int zoomLevel)
    Converts a longitude coordinate (in degrees) to a pixel X coordinate at a certain zoom level.
    static long
    longitudeToTileX(double longitude, int zoomLevel)
    Converts a longitude coordinate (in degrees) to the tile X number at a certain zoom level.
    static double
    pixelXToLongitude(double pixelX, int zoomLevel)
    Converts a pixel X coordinate at a certain zoom level to a longitude coordinate.
    static int
    pixelXToTileX(double pixelX, int zoomLevel)
    Converts a pixel X coordinate to the tile X number.
    static double
    pixelYToLatitude(double pixelY, int zoomLevel)
    Converts a pixel Y coordinate at a certain zoom level to a latitude coordinate.
    static int
    pixelYToTileY(double pixelY, int zoomLevel)
    Converts a pixel Y coordinate to the tile Y number.
    static double
    tileXToLongitude(long tileX, int zoomLevel)
    Converts a tile X number at a certain zoom level to a longitude coordinate.
    static double
    tileYToLatitude(long tileY, int zoomLevel)
    Converts a tile Y number at a certain zoom level to a latitude coordinate.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • tileXToLongitude

      public static double tileXToLongitude(long tileX, int zoomLevel)
      Converts a tile X number at a certain zoom level to a longitude coordinate.
      Parameters:
      tileX - the tile X number that should be converted.
      zoomLevel - the zoom level at which the number should be converted.
      Returns:
      the longitude value of the tile X number.
    • tileYToLatitude

      public static double tileYToLatitude(long tileY, int zoomLevel)
      Converts a tile Y number at a certain zoom level to a latitude coordinate.
      Parameters:
      tileY - the tile Y number that should be converted.
      zoomLevel - the zoom level at which the number should be converted.
      Returns:
      the latitude value of the tile Y number.
    • latitudeToTileY

      public static long latitudeToTileY(double latitude, int zoomLevel)
      Converts a latitude coordinate (in degrees) to a tile Y number at a certain zoom level.
      Parameters:
      latitude - the latitude coordinate that should be converted.
      zoomLevel - the zoom level at which the coordinate should be converted.
      Returns:
      the tile Y number of the latitude value.
    • longitudeToTileX

      public static long longitudeToTileX(double longitude, int zoomLevel)
      Converts a longitude coordinate (in degrees) to the tile X number at a certain zoom level.
      Parameters:
      longitude - the longitude coordinate that should be converted.
      zoomLevel - the zoom level at which the coordinate should be converted.
      Returns:
      the tile X number of the longitude value.
    • pixelXToTileX

      public static int pixelXToTileX(double pixelX, int zoomLevel)
      Converts a pixel X coordinate to the tile X number.
      Parameters:
      pixelX - the pixel X coordinate that should be converted.
      zoomLevel - the zoom level at which the coordinate should be converted.
      Returns:
      the tile X number.
    • pixelYToTileY

      public static int pixelYToTileY(double pixelY, int zoomLevel)
      Converts a pixel Y coordinate to the tile Y number.
      Parameters:
      pixelY - the pixel Y coordinate that should be converted.
      zoomLevel - the zoom level at which the coordinate should be converted.
      Returns:
      the tile Y number.
    • pixelXToLongitude

      public static double pixelXToLongitude(double pixelX, int zoomLevel)
      Converts a pixel X coordinate at a certain zoom level to a longitude coordinate.
      Parameters:
      pixelX - the pixel X coordinate that should be converted.
      zoomLevel - the zoom level at which the coordinate should be converted.
      Returns:
      the longitude value of the pixel X coordinate.
    • longitudeToPixelX

      public static double longitudeToPixelX(double longitude, int zoomLevel)
      Converts a longitude coordinate (in degrees) to a pixel X coordinate at a certain zoom level.
      Parameters:
      longitude - the longitude coordinate that should be converted.
      zoomLevel - the zoom level at which the coordinate should be converted.
      Returns:
      the pixel X coordinate of the longitude value.
    • pixelYToLatitude

      public static double pixelYToLatitude(double pixelY, int zoomLevel)
      Converts a pixel Y coordinate at a certain zoom level to a latitude coordinate.
      Parameters:
      pixelY - the pixel Y coordinate that should be converted.
      zoomLevel - the zoom level at which the coordinate should be converted.
      Returns:
      the latitude value of the pixel Y coordinate.
    • latitudeToPixelY

      public static double latitudeToPixelY(double latitude, int zoomLevel)
      Converts a latitude coordinate (in degrees) to a pixel Y coordinate at a certain zoom level.
      Parameters:
      latitude - the latitude coordinate that should be converted.
      zoomLevel - the zoom level at which the coordinate should be converted.
      Returns:
      the pixel Y coordinate of the latitude value.