public void testThatAffineTransformCanBeUsedInstead() { MapGeoCoding mapGeoCoding = createNonRotatedMapGeoCoding(); float x, y, lat, lon, cosa, sina; x = 0.0f; y = 0.0f; lon = +5.6f + (x - -1.2f) * +0.9f; lat = -7.8f - (y - +3.4f) * -1.0f; testPixelToMapTransform(mapGeoCoding, x, y, lat, lon); x = 1.0f; y = -2.0f; lon = +5.6f + (x - -1.2f) * +0.9f; lat = -7.8f - (y - +3.4f) * -1.0f; testPixelToMapTransform(mapGeoCoding, x, y, lat, lon); cosa = (float) Math.cos(Math.toRadians(42)); sina = (float) Math.sin(Math.toRadians(42)); mapGeoCoding = createRotatedMapGeoCoding(); x = 0.0f; y = 0.0f; lon = +5.6f + ((x - -1.2f) * cosa + (y - +3.4f) * sina) * +0.9f; lat = -7.8f - ((x - -1.2f) * -sina + (y - +3.4f) * cosa) * -1.0f; testPixelToMapTransform(mapGeoCoding, x, y, lat, lon); x = 1.0f; y = -2.0f; lon = +5.6f + ((x - -1.2f) * cosa + (y - +3.4f) * sina) * +0.9f; lat = -7.8f - ((x - -1.2f) * -sina + (y - +3.4f) * cosa) * -1.0f; testPixelToMapTransform(mapGeoCoding, x, y, lat, lon); }