public double[] getParameterValues() { return new double[]{_grid.getRowCount()}; }
/** * Given the lat/lon, return the bin number. * @param ll ll.lon has to be in the range of -180.0 to 180.0 * @return bin 1-relative */ public int ll2bin(LL ll) { return ll2bin(ll.lat, ll.lon); }
/** * 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; }
/** * Inverse project map co-ordinates into geographical co-ordinates. */ public GeoPos inverse(Point2D mapPoint, GeoPos geoPoint) { if (geoPoint == null) { geoPoint = new GeoPos(); } final int ncols = _grid.getColumnCount(_rcTemp.row); final double x = mapPoint.getX(); final double y = mapPoint.getY(); final int col = (int)Math.floor(x + 0.5 * ncols); final int row = (int)Math.floor(y); _grid.rc2ll(row, col, _llTemp); geoPoint.lon = (float) _llTemp.lon; geoPoint.lat = (float) _llTemp.lat; return geoPoint; }
/** * Given a row/column number, return the bin number (1-relative) */ public int rc2bin(RC rc) { return rc2bin(rc.row, rc.col); }
/** * Given row/column, return lat/lon. * * @param rc 1-relative * @param ll */ public void rc2ll(RC rc, LL ll) { rc2ll(rc.row, rc.col, ll); }
private MT(int rowCount) { Guardian.assertGreaterThan("rowCount", rowCount, 3); _grid = new ISEAG(rowCount); }
public MapTransform createDeepClone() { return new MT(_grid.getRowCount()); } }