code: public static double[] latLonToMeters( double lat, double lon ) {
          double mx = lon * originShift / 180.0;
          double my = Math.log(Math.tan((90 + lat) * Math.PI / 360.0)) / (Math.PI / 180.0);
          my = my * originShift / 180.0;
          return new double[]{mx, my};
      }
docs: Converts given lat/lon in WGS84 Datum to XY in Spherical Mercator
  EPSG:900913
  
  @param lat
  @param lon
  @return