Class ShiftedProjecting
- java.lang.Object
-
- org.openstreetmap.josm.data.projection.ShiftedProjecting
-
- All Implemented Interfaces:
Projecting
public class ShiftedProjecting extends java.lang.Object implements Projecting
This is a projecting instance that shifts the projection by a given eastnorth offset.- Since:
- 10805
-
-
Field Summary
Fields Modifier and Type Field Description private Projectingbaseprivate EastNorthoffset
-
Constructor Summary
Constructors Constructor Description ShiftedProjecting(Projecting base, EastNorth offset)Create a newShiftedProjecting
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LatLoneastNorth2latlonClamped(EastNorth en)Convert a east/north coordinate to theLatLoncoordinate.ProjectiongetBaseProjection()Gets the base projection instance used.java.util.Map<ProjectionBounds,Projecting>getProjectingsForArea(ProjectionBounds area)Returns an map or (subarea, projecting) paris that contains projecting instances to convert the coordinates inside the given area.EastNorthlatlon2eastNorth(ILatLon ll)Convert from lat/lon to easting/northing.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.data.projection.Projecting
getCacheKey, latlon2eastNorth
-
-
-
-
Field Detail
-
base
private final Projecting base
-
-
Constructor Detail
-
ShiftedProjecting
public ShiftedProjecting(Projecting base, EastNorth offset)
Create a newShiftedProjecting- Parameters:
base- The base to useoffset- The offset to move base. Subtracted when converting lat/lon → east/north.
-
-
Method Detail
-
latlon2eastNorth
public EastNorth latlon2eastNorth(ILatLon ll)
Description copied from interface:ProjectingConvert from lat/lon to easting/northing. This method uses the newerILatLoninterface.- Specified by:
latlon2eastNorthin interfaceProjecting- Parameters:
ll- the geographical point to convert (in WGS84 lat/lon)- Returns:
- the corresponding east/north coordinates
- See Also:
as shorthand.
-
eastNorth2latlonClamped
public LatLon eastNorth2latlonClamped(EastNorth en)
Description copied from interface:ProjectingConvert a east/north coordinate to theLatLoncoordinate. This method clamps the lat/lon coordinate to the nearest point in the world bounds.- Specified by:
eastNorth2latlonClampedin interfaceProjecting- Parameters:
en- east/north- Returns:
- The lat/lon coordinate.
-
getBaseProjection
public Projection getBaseProjection()
Description copied from interface:ProjectingGets the base projection instance used. This may be the same as this one or a different one if this one is translated in east/north space.- Specified by:
getBaseProjectionin interfaceProjecting- Returns:
- The projection.
-
getProjectingsForArea
public java.util.Map<ProjectionBounds,Projecting> getProjectingsForArea(ProjectionBounds area)
Description copied from interface:ProjectingReturns an map or (subarea, projecting) paris that contains projecting instances to convert the coordinates inside the given area. This can be used by projections to support continuous projections. It is possible that the area covered by the map is bigger than the one given as area. There may be holes.- Specified by:
getProjectingsForAreain interfaceProjecting- Parameters:
area- The base area- Returns:
- a map of non-overlapping
ProjectionBoundsinstances mapped to theProjectingobject to use for that area.
-
-