Class SessionReader.SessionViewportData
- java.lang.Object
-
- org.openstreetmap.josm.io.session.SessionReader.SessionViewportData
-
- Enclosing class:
- SessionReader
public static class SessionReader.SessionViewportData extends java.lang.Object
Data class for viewport saved in the session file.
-
-
Field Summary
Fields Modifier and Type Field Description private LatLon
center
private double
meterPerPixel
-
Constructor Summary
Constructors Constructor Description SessionViewportData(LatLon center, double meterPerPixel)
Construct a new SessionViewportData.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LatLon
getCenter()
Get the lat/lon coordinates of the screen center.ViewportData
getEastNorthViewport(Projection proj)
Convert this viewport data to aViewportData
object (with projected coordinates).double
getScale()
Get the scale in meters per pixel.
-
-
-
Field Detail
-
meterPerPixel
private final double meterPerPixel
-
-
Constructor Detail
-
SessionViewportData
public SessionViewportData(LatLon center, double meterPerPixel)
Construct a new SessionViewportData.- Parameters:
center
- the lat/lon coordinates of the screen centermeterPerPixel
- scale in meters per pixel
-
-
Method Detail
-
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
public ViewportData getEastNorthViewport(Projection proj)
Convert this viewport data to aViewportData
object (with projected coordinates).- Parameters:
proj
- the projection to convert from lat/lon to east/north- Returns:
- the corresponding ViewportData object
-
-