protected void setStartDate() { String start_datetime = ds.findAttValueIgnoreCase(null, "time_coverage_start", null); if (start_datetime != null) { startDate = DateUnit.getStandardOrISO(start_datetime); return; } else { CoordinateAxis axis = ds.findCoordinateAxis(AxisType.Time); if (axis != null) { double val = axis.getMinValue(); startDate = dateUnits.makeDate(val); return; } } parseInfo.append("*** start_datetime not Found\n"); }
protected void setStartDate() { String start_datetime = ds.findAttValueIgnoreCase(null, "time_coverage_start", null); if (start_datetime != null) { startDate = DateUnit.getStandardOrISO(start_datetime); return; } else { CoordinateAxis axis = ds.findCoordinateAxis(AxisType.Time); if (axis != null) { double val = axis.getMinValue(); startDate = dateUnits.makeDate(val); return; } } parseInfo.append("*** start_datetime not Found\n"); }
protected void setStartDate() { String start_datetime = ds.findAttValueIgnoreCase(null, "time_coverage_start", null); if (start_datetime != null) { startDate = DateUnit.getStandardOrISO(start_datetime); return; } else { CoordinateAxis axis = ds.findCoordinateAxis(AxisType.Time); if (axis != null) { double val = axis.getMinValue(); startDate = dateUnits.makeDate(val); return; } } parseInfo.append("*** start_datetime not Found\n"); }
double startLat = horizYaxis.getMinValue(); double startLon = horizXaxis.getMinValue();
double startLat = horizYaxis.getMinValue(); double startLon = horizXaxis.getMinValue();
mapArea = new ProjectionRect(horizXaxis.getMinValue(), horizYaxis.getMinValue(), horizXaxis.getMaxValue(), horizYaxis.getMaxValue());
mapArea = new ProjectionRect(horizXaxis.getMinValue(), horizYaxis.getMinValue(), horizXaxis.getMaxValue(), horizYaxis.getMaxValue());
mapArea = new ProjectionRect(horizXaxis.getMinValue(), horizYaxis.getMinValue(), horizXaxis.getMaxValue(), horizYaxis.getMaxValue());
private void makeBoundingBox() { // x,y may be 2D if (!(getXHorizAxis() instanceof CoordinateAxis1D) || !(getYHorizAxis() instanceof CoordinateAxis1D)) { CoordinateAxis xaxis = getXHorizAxis(); CoordinateAxis yaxis = getYHorizAxis(); /* could try to optimize this - just get cord=ners or something CoordinateAxis2D xaxis2 = (CoordinateAxis2D) horizXaxis; CoordinateAxis2D yaxis2 = (CoordinateAxis2D) horizYaxis; MAMath.MinMax */ mapArea = new ProjectionRect(xaxis.getMinValue(), yaxis.getMinValue(), xaxis.getMaxValue(), yaxis.getMaxValue()); } else { CoordinateAxis1D xaxis1 = (CoordinateAxis1D) getXHorizAxis(); CoordinateAxis1D yaxis1 = (CoordinateAxis1D) getYHorizAxis(); /* add one percent on each side if its a projection. WHY? double dx = 0.0, dy = 0.0; if (!isLatLon()) { dx = .01 * (xaxis1.getCoordEdge((int) xaxis1.getSize()) - xaxis1.getCoordEdge(0)); dy = .01 * (yaxis1.getCoordEdge((int) yaxis1.getSize()) - yaxis1.getCoordEdge(0)); } mapArea = new ProjectionRect(xaxis1.getCoordEdge(0) - dx, yaxis1.getCoordEdge(0) - dy, xaxis1.getCoordEdge((int) xaxis1.getSize()) + dx, yaxis1.getCoordEdge((int) yaxis1.getSize()) + dy); */ mapArea = new ProjectionRect(xaxis1.getCoordEdge(0), yaxis1.getCoordEdge(0), xaxis1.getCoordEdge((int) xaxis1.getSize()), yaxis1.getCoordEdge((int) yaxis1.getSize())); } }
CoordinateAxis horizYaxis = getYHorizAxis(); if (isLatLon()) { double startLat = horizYaxis.getMinValue(); double startLon = horizXaxis.getMinValue();
private void makeBoundingBox() { // x,y may be 2D if (!(getXHorizAxis() instanceof CoordinateAxis1D) || !(getYHorizAxis() instanceof CoordinateAxis1D)) { CoordinateAxis xaxis = getXHorizAxis(); CoordinateAxis yaxis = getYHorizAxis(); /* could try to optimize this - just get cord=ners or something CoordinateAxis2D xaxis2 = (CoordinateAxis2D) horizXaxis; CoordinateAxis2D yaxis2 = (CoordinateAxis2D) horizYaxis; MAMath.MinMax */ mapArea = new ProjectionRect(xaxis.getMinValue(), yaxis.getMinValue(), xaxis.getMaxValue(), yaxis.getMaxValue()); } else { CoordinateAxis1D xaxis1 = (CoordinateAxis1D) getXHorizAxis(); CoordinateAxis1D yaxis1 = (CoordinateAxis1D) getYHorizAxis(); /* add one percent on each side if its a projection. WHY? double dx = 0.0, dy = 0.0; if (!isLatLon()) { dx = .01 * (xaxis1.getCoordEdge((int) xaxis1.getSize()) - xaxis1.getCoordEdge(0)); dy = .01 * (yaxis1.getCoordEdge((int) yaxis1.getSize()) - yaxis1.getCoordEdge(0)); } mapArea = new ProjectionRect(xaxis1.getCoordEdge(0) - dx, yaxis1.getCoordEdge(0) - dy, xaxis1.getCoordEdge((int) xaxis1.getSize()) + dx, yaxis1.getCoordEdge((int) yaxis1.getSize()) + dy); */ mapArea = new ProjectionRect(xaxis1.getCoordEdge(0), yaxis1.getCoordEdge(0), xaxis1.getCoordEdge((int) xaxis1.getSize()), yaxis1.getCoordEdge((int) yaxis1.getSize())); } }
static public CalendarDateRange extractCalendarDateRange(GridDataset gridDataset) { CalendarDateRange maxDateRange = null; for (GridDataset.Gridset gridset : gridDataset.getGridsets()) { GridCoordSystem gsys = gridset.getGeoCoordSystem(); CalendarDateRange dateRange; CoordinateAxis1DTime time1D = gsys.getTimeAxis1D(); if (time1D != null) { dateRange = time1D.getCalendarDateRange(); } else { CoordinateAxis time = gsys.getTimeAxis(); if (time == null) continue; try { DateUnit du = new DateUnit( time.getUnitsString()); Date minDate = du.makeDate(time.getMinValue()); Date maxDate = du.makeDate(time.getMaxValue()); dateRange = CalendarDateRange.of( minDate, maxDate); } catch (Exception e) { logger.warn("Illegal Date Unit "+time.getUnitsString()); continue; } } if (maxDateRange == null) maxDateRange = dateRange; else maxDateRange.extend( dateRange); } return maxDateRange; }
static public CalendarDateRange extractCalendarDateRange(GridDataset gridDataset) { CalendarDateRange maxDateRange = null; for (GridDataset.Gridset gridset : gridDataset.getGridsets()) { GridCoordSystem gsys = gridset.getGeoCoordSystem(); CalendarDateRange dateRange; CoordinateAxis1DTime time1D = gsys.getTimeAxis1D(); if (time1D != null) { dateRange = time1D.getCalendarDateRange(); } else { CoordinateAxis time = gsys.getTimeAxis(); if (time == null) continue; try { DateUnit du = new DateUnit( time.getUnitsString()); Date minDate = du.makeDate(time.getMinValue()); Date maxDate = du.makeDate(time.getMaxValue()); dateRange = CalendarDateRange.of( minDate, maxDate); } catch (Exception e) { logger.warn("Illegal Date Unit "+time.getUnitsString()); continue; } } if (maxDateRange == null) maxDateRange = dateRange; else maxDateRange = maxDateRange.extend( dateRange); } return maxDateRange; }
CalendarDate minDate = du.makeCalendarDate(time.getMinValue()); CalendarDate maxDate = du.makeCalendarDate(time.getMaxValue()); dateRange = CalendarDateRange.of(minDate, maxDate);
static public CalendarDateRange extractCalendarDateRange(GridDataset gridDataset) { CalendarDateRange maxDateRange = null; for (GridDataset.Gridset gridset : gridDataset.getGridsets()) { GridCoordSystem gsys = gridset.getGeoCoordSystem(); CalendarDateRange dateRange; CoordinateAxis1DTime time1D = gsys.getTimeAxis1D(); if (time1D != null) { dateRange = time1D.getCalendarDateRange(); } else { CoordinateAxis time = gsys.getTimeAxis(); if (time == null) continue; try { DateUnit du = new DateUnit( time.getUnitsString()); Date minDate = du.makeDate(time.getMinValue()); Date maxDate = du.makeDate(time.getMaxValue()); dateRange = CalendarDateRange.of( minDate, maxDate); } catch (Exception e) { logger.warn("Illegal Date Unit "+time.getUnitsString()); continue; } } if (maxDateRange == null) maxDateRange = dateRange; else maxDateRange.extend( dateRange); } return maxDateRange; }
double minLon = xaxis.getMinValue(); minx = LatLonPointImpl.lonNormalFrom( minx, minLon); maxx = LatLonPointImpl.lonNormalFrom( maxx, minLon);
double minLon = xaxis.getMinValue(); minx = LatLonPointImpl.lonNormalFrom( minx, minLon); maxx = LatLonPointImpl.lonNormalFrom( maxx, minLon);
double minLon = xaxis.getMinValue(); minx = LatLonPointImpl.lonNormalFrom( minx, minLon); maxx = LatLonPointImpl.lonNormalFrom( maxx, minLon);
double startLat = horizYaxis.getMinValue(); double startLon = horizXaxis.getMinValue();