Class SessionReader.SessionViewportData
java.lang.Object
org.openstreetmap.josm.io.session.SessionReader.SessionViewportData
- Enclosing class:
- SessionReader
Data class for viewport saved in the session file.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSessionViewportData(LatLon center, double meterPerPixel) Construct a new SessionViewportData. -
Method Summary
Modifier and TypeMethodDescriptionGet the lat/lon coordinates of the screen center.Convert this viewport data to aViewportDataobject (with projected coordinates).doublegetScale()Get the scale in meters per pixel.
-
Field Details
-
center
-
meterPerPixel
-
-
Constructor Details
-
SessionViewportData
Construct a new SessionViewportData.- Parameters:
center- the lat/lon coordinates of the screen centermeterPerPixel- scale in meters per pixel
-
-
Method Details
-
getCenter
Get the lat/lon coordinates of the screen center.- Returns:
- lat/lon coordinates of the screen center
-
getScale
Get the scale in meters per pixel.- Returns:
- scale in meters per pixel
-
getEastNorthViewport
Convert this viewport data to aViewportDataobject (with projected coordinates).- Parameters:
proj- the projection to convert from lat/lon to east/north- Returns:
- the corresponding ViewportData object
-