Interface Proj

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      Bounds getAlgorithmBounds()
      Return the bounds where this projection is applicable.
      java.lang.String getName()
      Replies a human readable name of this projection.
      java.lang.String getProj4Id()
      Replies the Proj.4 identifier.
      void initialize​(ProjParameters params)
      Initialize the projection using the provided parameters.
      double[] invproject​(double east, double north)
      Convert east/north to lat/lon.
      boolean isGeographic()
      Return true, if a geographic coordinate reference system is represented.
      default boolean lonIsLinearToEast()
      Checks whether the result of projecting a lon coordinate only has a linear relation to the east coordinate and is not related to lat/north at all.
      double[] project​(double latRad, double lonRad)
      Convert lat/lon to east/north.
    • Method Detail

      • getName

        java.lang.String getName()
        Replies a human readable name of this projection.
        Returns:
        The projection name. must not be null.
      • getProj4Id

        java.lang.String getProj4Id()
        Replies the Proj.4 identifier.
        Returns:
        The Proj.4 identifier (as reported by cs2cs -lp). If no id exists, return null.
      • project

        double[] project​(double latRad,
                         double lonRad)
        Convert lat/lon to east/north.
        Parameters:
        latRad - the latitude in radians
        lonRad - the longitude in radians
        Returns:
        array of length 2, containing east and north value in meters, divided by the semi major axis of the ellipsoid.
      • invproject

        double[] invproject​(double east,
                            double north)
        Convert east/north to lat/lon.
        Parameters:
        east - east value in meters, divided by the semi major axis of the ellipsoid
        north - north value in meters, divided by the semi major axis of the ellipsoid
        Returns:
        array of length 2, containing lat and lon in radians.
      • getAlgorithmBounds

        Bounds getAlgorithmBounds()
        Return the bounds where this projection is applicable. This is a fallback for when the projection bounds are not specified explicitly. In this area, the round trip lat/lon → east/north → lat/lon should return the starting value with small error. In addition, regions with extreme distortions should be excluded, if possible. It need not be the absolute maximum, but rather an area that is safe to display in JOSM and contain everything that one would expect to use.
        Returns:
        the bounds where this projection is applicable, null if unknown
      • isGeographic

        boolean isGeographic()
        Return true, if a geographic coordinate reference system is represented. I.e. if it returns latitude/longitude values rather than Cartesian east/north coordinates on a flat surface.
        Returns:
        true, if it is geographic
      • lonIsLinearToEast

        default boolean lonIsLinearToEast()
        Checks whether the result of projecting a lon coordinate only has a linear relation to the east coordinate and is not related to lat/north at all.
        Returns:
        true if lon has a linear relationship to east only.
        Since:
        10805