title: X,Y image coordinate to Latitude and Longitude with rotation
body: <p>ok, i have these image overlay data from Google Earth, like this:</p>
  
  <pre><code>North: -7.340917
  South: -7.34100
  East: 112.751217
  West: 112.751167
  Rotation: 25.0000
  </code></pre>
  
  <p>and i have successfully converted my image point (x,y) to Lat, Lng with these functions:</p>
  
  <pre><code>static Double DEGREES_PER_RADIAN = 180 / Math.PI;
  static Double RADIAN_PER_DEGREES = Math.PI / 180;
  
  public static double Gudermannian(double y)
  {
      return Math.atan(Math.sinh(y)) * DEGREES_PER_RADIAN;
  }
  
  public static double GudermannianInv(double latitude)
  {
      double sign = Math.signum(latitude);
      double sin = Math.sin(latitude * RADIAN_PER_DEGREES * sign);
      return sign * (Math.log((1.0 + sin) / (1.0 - sin)) / 2.0);
  }
  
  Double mapLatNorth = -7.340917;
  Double mapLatSouth = -7.34100;
  Double mapLonWest = 112.751167;
  Double mapLonEast = 112.751217;
  
  Double ymax = GudermannianInv(mapLatNorth);
  Double ymin = GudermannianInv(mapLatSouth);                 
  Float latPoint = (float) Gudermannian(ymax - ( ((double) pointY / imgHeight) * (ymax - ymin) )) ;
  
  Double mapLonDelta = mapLonEast - mapLonWest;
  Float lngPoint = (float) (mapLonWest + pointX / imgWidth * mapLonDelta);
  </code></pre>
  
  <p>the values i get from </p>
  
  <pre><code>latPoint
  </code></pre>
  
  <p>and  </p>
  
  <pre><code>lngPoint
  </code></pre>
  
  <p>is correct, however it is not rotated yet.
  my question is: how to rotate those Lat/Lng values 25 degrees?</p>
  
  <p>i have failed to get Latitude/Longitude value from Ewan Todd 's answer at <a href="https://stackoverflow.com/a/1624732/1128395">Calculate lat/lng of corners of ground overlay from kml-file</a></p>