Index: /trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java	(revision 12668)
+++ /trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java	(revision 12669)
@@ -1,8 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.data.coor;
-
-import org.openstreetmap.gui.jmapviewer.JMapViewer;
-import org.openstreetmap.gui.jmapviewer.Projected;
-import org.openstreetmap.gui.jmapviewer.interfaces.IProjected;
 
 /**
@@ -29,12 +25,4 @@
     public EastNorth(double east, double north) {
         super(east, north);
-    }
-
-    /**
-     * Constructs a new {@code EastNorth} from {@link IProjected}.
-     * @param p projected coordinates
-     */
-    public EastNorth(IProjected p) {
-        super(p.getEast(), p.getNorth());
     }
 
@@ -188,12 +176,4 @@
     }
 
-    /**
-     * Converts this to a {@link IProjected} instance to be used in the {@link JMapViewer}
-     * @return The projected
-     */
-    public IProjected toProjected() {
-        return new Projected(east(), north());
-    }
-
     @Override
     public String toString() {
Index: /trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 12668)
+++ /trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 12669)
@@ -23,5 +23,4 @@
 import java.util.regex.Pattern;
 
-import org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate;
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
@@ -294,12 +293,4 @@
     }
 
-    /**
-     * Constructs a new object for the given coordinate
-     * @param coor the coordinate
-     */
-    public LatLon(ICoordinate coor) {
-        this(coor.getLat(), coor.getLon());
-    }
-
     @Override
     public double lat() {
@@ -566,12 +557,4 @@
         return Double.compare(that.x, x) == 0 &&
                Double.compare(that.y, y) == 0;
-    }
-
-    /**
-     * Converts this latitude/longitude to an instance of {@link ICoordinate}.
-     * @return a {@link ICoordinate} instance of this latitude/longitude
-     */
-    public ICoordinate toCoordinate() {
-        return new org.openstreetmap.gui.jmapviewer.Coordinate(lat(), lon());
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/imagery/AbstractWMSTileSource.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/AbstractWMSTileSource.java	(revision 12668)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/AbstractWMSTileSource.java	(revision 12669)
@@ -110,5 +110,5 @@
     @Override
     public ICoordinate tileXYToLatLon(int x, int y, int zoom) {
-        return tileProjection.eastNorth2latlon(getTileEastNorth(x, y, zoom)).toCoordinate();
+        return CoordinateConversion.llToCoor(tileProjection.eastNorth2latlon(getTileEastNorth(x, y, zoom)));
     }
 
@@ -179,5 +179,5 @@
                 anchorPosition.north() - y * scale
                 );
-        return tileProjection.eastNorth2latlon(ret).toCoordinate();
+        return CoordinateConversion.llToCoor(tileProjection.eastNorth2latlon(ret));
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/imagery/CoordinateConversion.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/CoordinateConversion.java	(revision 12669)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/CoordinateConversion.java	(revision 12669)
@@ -0,0 +1,56 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.imagery;
+
+import org.openstreetmap.gui.jmapviewer.Coordinate;
+import org.openstreetmap.gui.jmapviewer.Projected;
+import org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate;
+import org.openstreetmap.gui.jmapviewer.interfaces.IProjected;
+import org.openstreetmap.josm.data.coor.EastNorth;
+import org.openstreetmap.josm.data.coor.LatLon;
+
+/**
+ * Allows easy conversion between JMapViewer coordinate types and JOSM coordinate types.
+ * @since 12669
+ */
+public final class CoordinateConversion {
+
+    private CoordinateConversion() {
+        // Hide default constructor for utility classes
+    }
+
+    /**
+     * Converts an {@link EastNorth} to an {@link IProjected} instance.
+     * @param en east/north coordinate
+     * @return {@code IProjected} instance
+     */
+    public static IProjected enToProj(EastNorth en) {
+        return new Projected(en.east(), en.north());
+    }
+
+    /**
+     * Converts an {@link IProjected} to an {@link EastNorth} instance.
+     * @param p projected coordinate
+     * @return {@code EastNorth} instance
+     */
+    public static EastNorth projToEn(IProjected p) {
+        return new EastNorth(p.getEast(), p.getNorth());
+    }
+
+    /**
+     * Converts a {@link LatLon} to an {@link ICoordinate} instance.
+     * @param ll latitude/longitude coordinate
+     * @return {@code ICoordinate} instance
+     */
+    public static ICoordinate llToCoor(LatLon ll) {
+        return new Coordinate(ll.lat(), ll.lon());
+    }
+
+    /**
+     * Converts an {@link ICoordinate} to a {@link LatLon} instance.
+     * @param c coordinate
+     * @return {@code LatLon} instance
+     */
+    public static LatLon coorToLL(ICoordinate c) {
+        return new LatLon(c.getLat(), c.getLon());
+    }
+}
Index: /trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java	(revision 12668)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java	(revision 12669)
@@ -808,9 +808,9 @@
         TileMatrix matrix = getTileMatrix(zoom);
         if (matrix == null) {
-            return tileProjection.getWorldBoundsLatLon().getCenter().toCoordinate();
+            return CoordinateConversion.llToCoor(tileProjection.getWorldBoundsLatLon().getCenter());
         }
         double scale = matrix.scaleDenominator * this.crsScale;
         EastNorth ret = new EastNorth(matrix.topLeftCorner.east() + x * scale, matrix.topLeftCorner.north() - y * scale);
-        return tileProjection.eastNorth2latlon(ret).toCoordinate();
+        return CoordinateConversion.llToCoor(tileProjection.eastNorth2latlon(ret));
     }
 
@@ -1014,8 +1014,11 @@
     }
 
+    private EastNorth tileToEastNorth(int x, int y, int z) {
+        return CoordinateConversion.projToEn(this.tileXYtoProjected(x, y, z));
+    }
+
     private ProjectionBounds getTileProjectionBounds(Tile tile) {
-        ProjectionBounds pb = new ProjectionBounds(new EastNorth(
-                this.tileXYtoProjected(tile.getXtile(), tile.getYtile(), tile.getZoom())));
-        pb.extend(new EastNorth(this.tileXYtoProjected(tile.getXtile() + 1, tile.getYtile() + 1, tile.getZoom())));
+        ProjectionBounds pb = new ProjectionBounds(tileToEastNorth(tile.getXtile(), tile.getYtile(), tile.getZoom()));
+        pb.extend(tileToEastNorth(tile.getXtile() + 1, tile.getYtile() + 1, tile.getZoom()));
         return pb;
     }
@@ -1025,6 +1028,5 @@
         ProjectionBounds pbInner = getTileProjectionBounds(inner);
         ProjectionBounds pbOuter = getTileProjectionBounds(outer);
-        // a little tolerance, for when inner tile touches the border of the
-        // outer tile
+        // a little tolerance, for when inner tile touches the border of the outer tile
         double epsilon = 1e-7 * (pbOuter.maxEast - pbOuter.minEast);
         return pbOuter.minEast <= pbInner.minEast + epsilon &&
Index: /trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 12668)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 12669)
@@ -80,4 +80,5 @@
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.imagery.CoordinateConversion;
 import org.openstreetmap.josm.data.imagery.ImageryInfo;
 import org.openstreetmap.josm.data.imagery.OffsetBookmark;
@@ -1135,5 +1136,5 @@
 
     private ICoordinate getShiftedCoord(EastNorth en) {
-        return getShiftedLatLon(en).toCoordinate();
+        return CoordinateConversion.llToCoor(getShiftedLatLon(en));
     }
 
@@ -1284,15 +1285,15 @@
             return new TileSet();
         TileXY t1, t2;
+        IProjected topLeftUnshifted = coordinateConverter.shiftDisplayToServer(bounds.getMin());
+        IProjected botRightUnshifted = coordinateConverter.shiftDisplayToServer(bounds.getMax());
         if (coordinateConverter.requiresReprojection()) {
             Projection projServer = Projections.getProjectionByCode(tileSource.getServerCRS());
             ProjectionBounds projBounds = new ProjectionBounds(
-                    new EastNorth(coordinateConverter.shiftDisplayToServer(bounds.getMin())),
-                    new EastNorth(coordinateConverter.shiftDisplayToServer(bounds.getMax())));
+                    CoordinateConversion.projToEn(topLeftUnshifted),
+                    CoordinateConversion.projToEn(botRightUnshifted));
             ProjectionBounds bbox = projServer.getEastNorthBoundsBox(projBounds, Main.getProjection());
-            t1 = tileSource.projectedToTileXY(bbox.getMin().toProjected(), zoom);
-            t2 = tileSource.projectedToTileXY(bbox.getMax().toProjected(), zoom);
+            t1 = tileSource.projectedToTileXY(CoordinateConversion.enToProj(bbox.getMin()), zoom);
+            t2 = tileSource.projectedToTileXY(CoordinateConversion.enToProj(bbox.getMax()), zoom);
         } else {
-            IProjected topLeftUnshifted = coordinateConverter.shiftDisplayToServer(bounds.getMin());
-            IProjected botRightUnshifted = coordinateConverter.shiftDisplayToServer(bounds.getMax());
             t1 = tileSource.projectedToTileXY(topLeftUnshifted, zoom);
             t2 = tileSource.projectedToTileXY(botRightUnshifted, zoom);
@@ -1745,5 +1746,5 @@
         for (LatLon point: points) {
             TileXY minTile = tileSource.latLonToTileXY(point.lat() - bufferY, point.lon() - bufferX, currentZoomLevel);
-            TileXY curTile = tileSource.latLonToTileXY(point.toCoordinate(), currentZoomLevel);
+            TileXY curTile = tileSource.latLonToTileXY(CoordinateConversion.llToCoor(point), currentZoomLevel);
             TileXY maxTile = tileSource.latLonToTileXY(point.lat() + bufferY, point.lon() + bufferX, currentZoomLevel);
 
Index: /trunk/src/org/openstreetmap/josm/gui/layer/imagery/ReprojectionTile.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/imagery/ReprojectionTile.java	(revision 12668)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/imagery/ReprojectionTile.java	(revision 12669)
@@ -11,4 +11,5 @@
 import org.openstreetmap.josm.data.ProjectionBounds;
 import org.openstreetmap.josm.data.coor.EastNorth;
+import org.openstreetmap.josm.data.imagery.CoordinateConversion;
 import org.openstreetmap.josm.data.projection.Projection;
 import org.openstreetmap.josm.data.projection.Projections;
@@ -95,4 +96,8 @@
         this.anchor = null;
         this.maxZoomReached = false;
+    }
+
+    private EastNorth tileToEastNorth(int x, int y, int z) {
+        return CoordinateConversion.projToEn(source.tileXYtoProjected(x, y, z));
     }
 
@@ -118,6 +123,6 @@
         Projection projCurrent = Main.getProjection();
         Projection projServer = Projections.getProjectionByCode(source.getServerCRS());
-        EastNorth en00Server = new EastNorth(source.tileXYtoProjected(xtile, ytile, zoom));
-        EastNorth en11Server = new EastNorth(source.tileXYtoProjected(xtile + 1, ytile + 1, zoom));
+        EastNorth en00Server = tileToEastNorth(xtile, ytile, zoom);
+        EastNorth en11Server = tileToEastNorth(xtile + 1, ytile + 1, zoom);
         ProjectionBounds pbServer = new ProjectionBounds(en00Server);
         pbServer.extend(en11Server);
Index: /trunk/src/org/openstreetmap/josm/gui/layer/imagery/TileCoordinateConverter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/imagery/TileCoordinateConverter.java	(revision 12668)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/imagery/TileCoordinateConverter.java	(revision 12669)
@@ -17,4 +17,5 @@
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.imagery.CoordinateConversion;
 import org.openstreetmap.josm.data.projection.Projecting;
 import org.openstreetmap.josm.data.projection.ShiftedProjecting;
@@ -46,9 +47,9 @@
 
     private MapViewPoint pos(ICoordinate ll) {
-        return mapView.getState().getPointFor(new LatLon(ll)).add(settings.getDisplacement());
+        return mapView.getState().getPointFor(CoordinateConversion.coorToLL(ll)).add(settings.getDisplacement());
     }
 
     private MapViewPoint pos(IProjected p) {
-        return mapView.getState().getPointFor(new EastNorth(p)).add(settings.getDisplacement());
+        return mapView.getState().getPointFor(CoordinateConversion.projToEn(p)).add(settings.getDisplacement());
     }
 
@@ -60,5 +61,5 @@
      */
     public IProjected shiftDisplayToServer(EastNorth en) {
-        return en.subtract(settings.getDisplacement()).toProjected();
+        return CoordinateConversion.enToProj(en.subtract(settings.getDisplacement()));
     }
 
@@ -102,5 +103,5 @@
         if (requiresReprojection()) {
             LatLon ll = getProjecting().eastNorth2latlonClamped(mapView.getEastNorth(sx, sy));
-            return tileSource.latLonToTileXY(ll.toCoordinate(), zoom);
+            return tileSource.latLonToTileXY(CoordinateConversion.llToCoor(ll), zoom);
         } else {
             IProjected p = shiftDisplayToServer(mapView.getEastNorth(sx, sy));
@@ -165,11 +166,11 @@
             LatLon topLeft = mapView.getLatLon(0, 0);
             LatLon botRight = mapView.getLatLon(mapView.getWidth(), mapView.getHeight());
-            t1 = tileSource.latLonToTileXY(topLeft.toCoordinate(), zoom);
-            t2 = tileSource.latLonToTileXY(botRight.toCoordinate(), zoom);
+            t1 = tileSource.latLonToTileXY(CoordinateConversion.llToCoor(topLeft), zoom);
+            t2 = tileSource.latLonToTileXY(CoordinateConversion.llToCoor(botRight), zoom);
         } else {
             EastNorth topLeftEN = mapView.getEastNorth(0, 0);
             EastNorth botRightEN = mapView.getEastNorth(mapView.getWidth(), mapView.getHeight());
-            t1 = tileSource.projectedToTileXY(topLeftEN.toProjected(), zoom);
-            t2 = tileSource.projectedToTileXY(botRightEN.toProjected(), zoom);
+            t1 = tileSource.projectedToTileXY(CoordinateConversion.enToProj(topLeftEN), zoom);
+            t2 = tileSource.projectedToTileXY(CoordinateConversion.enToProj(botRightEN), zoom);
         }
         int screenPixels = mapView.getWidth()*mapView.getHeight();
Index: /trunk/test/unit/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSourceTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSourceTest.java	(revision 12668)
+++ /trunk/test/unit/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSourceTest.java	(revision 12669)
@@ -159,5 +159,5 @@
         assertEquals(LatLon.normalizeLon(expected.getLon() - result.lon()), 0.0, 1e-4);
         LatLon tileCenter = new Bounds(result, getTileLatLon(source, x+1, y+1, z)).getCenter();
-        TileXY backwardsResult = source.latLonToTileXY(tileCenter.toCoordinate(), z);
+        TileXY backwardsResult = source.latLonToTileXY(CoordinateConversion.llToCoor(tileCenter), z);
         assertEquals(x, backwardsResult.getXIndex());
         assertEquals(y, backwardsResult.getYIndex());
@@ -179,5 +179,5 @@
                 );
 
-        TileXY tileIndex = source.latLonToTileXY(location.toCoordinate(), z);
+        TileXY tileIndex = source.latLonToTileXY(CoordinateConversion.llToCoor(location), z);
 
         assertTrue("X index: " + tileIndex.getXIndex() + " greater than tileXmax: " + source.getTileXMax(z) + " at zoom: " + z,
@@ -213,5 +213,5 @@
 
     private LatLon getTileLatLon(TemplatedWMSTileSource source, int x, int y, int z) {
-        return new LatLon(source.tileXYToLatLon(x, y, z));
+        return CoordinateConversion.coorToLL(source.tileXYToLatLon(x, y, z));
     }
 
Index: /trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java	(revision 12668)
+++ /trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java	(revision 12669)
@@ -129,5 +129,5 @@
 
     private void verifyBounds(Bounds bounds, WMTSTileSource testSource, int z, int x, int y) {
-        LatLon ret = new LatLon(testSource.tileXYToLatLon(x, y, z));
+        LatLon ret = CoordinateConversion.coorToLL(testSource.tileXYToLatLon(x, y, z));
         assertTrue(ret.toDisplayString() + " doesn't lie within: " + bounds.toString(), bounds.contains(ret));
         int tileXmax = testSource.getTileXMax(z);
@@ -303,5 +303,5 @@
 
     private void verifyTile(LatLon expected, WMTSTileSource source, int x, int y, int z) {
-        LatLon ll = new LatLon(source.tileXYToLatLon(x, y, z));
+        LatLon ll = CoordinateConversion.coorToLL(source.tileXYToLatLon(x, y, z));
         assertEquals("Latitude", expected.lat(), ll.lat(), 1e-05);
         assertEquals("Longitude", expected.lon(), ll.lon(), 1e-05);
@@ -314,6 +314,6 @@
     private void verifyMercatorTile(WMTSTileSource testSource, int x, int y, int z, int zoomOffset) {
         TemplatedTMSTileSource verifier = new TemplatedTMSTileSource(testImageryTMS);
-        LatLon result = new LatLon(testSource.tileXYToLatLon(x, y, z));
-        LatLon expected = new LatLon(verifier.tileXYToLatLon(x, y, z + zoomOffset));
+        LatLon result = CoordinateConversion.coorToLL(testSource.tileXYToLatLon(x, y, z));
+        LatLon expected = CoordinateConversion.coorToLL(verifier.tileXYToLatLon(x, y, z + zoomOffset));
         assertEquals("Longitude", LatLon.normalizeLon(expected.lon() - result.lon()), 0.0, 1e-04);
         assertEquals("Latitude", expected.lat(), result.lat(), 1e-04);
