/** * Given the lat/lon, return the row, column. * * @param ll ll.lon has to be in the range of -180.0 to 180.0 * @param rc 1-relative */ public void ll2rc(LL ll, RC rc) { ll2rc(ll.lat, ll.lon, rc); }
/** * Forward project geographical co-ordinates into map co-ordinates. */ public Point2D forward(GeoPos geoPoint, Point2D mapPoint) { if (mapPoint == null) { mapPoint = new Point2D.Float(); } _grid.ll2rc(geoPoint.lat, geoPoint.lon, _rcTemp); final int ncols = _grid.getColumnCount(_rcTemp.row); final double x = _rcTemp.col - 0.5 * ncols; final double y = _rcTemp.row; mapPoint.setLocation(x, y); return mapPoint; }