Class SessionReader.SessionViewportData

java.lang.Object
org.openstreetmap.josm.io.session.SessionReader.SessionViewportData
Enclosing class:
SessionReader

public static class SessionReader.SessionViewportData extends Object
Data class for viewport saved in the session file.
  • Field Details

  • Constructor Details

    • SessionViewportData

      public SessionViewportData(LatLon center, double meterPerPixel)
      Construct a new SessionViewportData.
      Parameters:
      center - the lat/lon coordinates of the screen center
      meterPerPixel - scale in meters per pixel
  • Method Details

    • getCenter

      public LatLon getCenter()
      Get the lat/lon coordinates of the screen center.
      Returns:
      lat/lon coordinates of the screen center
    • getScale

      public double getScale()
      Get the scale in meters per pixel.
      Returns:
      scale in meters per pixel
    • getEastNorthViewport

      Convert this viewport data to a ViewportData object (with projected coordinates).
      Parameters:
      proj - the projection to convert from lat/lon to east/north
      Returns:
      the corresponding ViewportData object