diff --git a/cave/com.raytheon.viz.hydro/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.hydro/META-INF/MANIFEST.MF index 05a92fd114..e229dbee43 100644 --- a/cave/com.raytheon.viz.hydro/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.hydro/META-INF/MANIFEST.MF @@ -19,7 +19,7 @@ Require-Bundle: org.eclipse.ui, javax.measure;bundle-version="1.0.0", com.raytheon.uf.viz.app.launcher;bundle-version="1.11.4", com.raytheon.uf.common.hydro;bundle-version="1.11.13", - com.raytheon.uf.common.dataplugin.grib;bundle-version="1.11.17", + com.raytheon.uf.common.dataplugin.grid, com.raytheon.edex.meteolib;bundle-version="1.11.17", com.raytheon.viz.grid;bundle-version="1.11.17", com.raytheon.uf.common.dissemination;bundle-version="1.0.0", diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/flashfloodguidance/FlashFloodGuidanceDataManager.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/flashfloodguidance/FlashFloodGuidanceDataManager.java index 1b0642d0a3..96db3484ed 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/flashfloodguidance/FlashFloodGuidanceDataManager.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/flashfloodguidance/FlashFloodGuidanceDataManager.java @@ -21,7 +21,6 @@ package com.raytheon.viz.hydro.flashfloodguidance; import java.io.FileNotFoundException; import java.text.SimpleDateFormat; -import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -29,17 +28,19 @@ import java.util.Map; import java.util.TimeZone; import com.raytheon.uf.common.dataplugin.PluginException; -import com.raytheon.uf.common.dataplugin.grib.GribRecord; +import com.raytheon.uf.common.dataplugin.grid.GridConstants; +import com.raytheon.uf.common.dataplugin.grid.GridRecord; +import com.raytheon.uf.common.dataquery.requests.RequestConstraint; +import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType; import com.raytheon.uf.common.datastorage.StorageException; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; +import com.raytheon.uf.viz.core.catalog.DbQuery; import com.raytheon.uf.viz.core.catalog.DirectDbQuery; import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage; import com.raytheon.uf.viz.core.exception.VizException; -import com.raytheon.viz.hydro.Activator; import com.raytheon.viz.hydrocommon.HydroConstants; -import com.raytheon.viz.hydrocommon.constants.StatusConstants; /** * Class for managing database query calls. FlashFloodGuidanceDataManager.java @@ -62,11 +63,8 @@ public class FlashFloodGuidanceDataManager { /** Instance of this class */ private static FlashFloodGuidanceDataManager instance = null; - /** Query to find available gridded data */ - private static final String AVAILABLE_DATA_QUERY = "select grib_models.modelname, grib_models.parameterabbreviation, grib.reftime, grib.datauri, grib.id from grib, grib_models where grib_models.modelname like 'FFG%' and grib_models.id = grib.modelinfo_id and grib.gridversion = 0 order by grib_models.modelname, grib_models.parameterabbreviation, grib.reftime asc"; - private static final String LINESEGS_QUERY = "select hrap_row, hrap_beg_col, " - + "hrap_end_col, area from linesegs"; + + "hrap_end_col, area from linesegs"; /** RFC Site name to RFC lookup map */ public static Map RFCMAP = new HashMap(); @@ -130,15 +128,28 @@ public class FlashFloodGuidanceDataManager { * * @return ArrayList of data */ - public ArrayList getGriddedDataList() { - ArrayList rs = null; + public List getGriddedDataList() { + List rs = null; + /** Query to find available gridded data */ + DbQuery query = new DbQuery(GridRecord.class, "metadata"); + query.addColumn(GridConstants.DATASET_ID); + query.addColumn(GridConstants.PARAMETER_ABBREVIATION); + query.addColumn("dataTime.refTime"); + query.addColumn("dataURI"); + query.addColumn("id"); + query.addConstraint(GridConstants.DATASET_ID, new RequestConstraint( + "FFG%", ConstraintType.LIKE)); + query.addConstraint(GridConstants.SECONDARY_ID, "Version0"); + query.addOrderBy(GridConstants.DATASET_ID); + query.addOrderBy(GridConstants.PARAMETER_ABBREVIATION); + query.addOrderBy("dataTime.refTime"); try { - rs = (ArrayList) DirectDbQuery.executeQuery( - AVAILABLE_DATA_QUERY, "metadata", QueryLanguage.SQL); + rs = query.performQuery(); } catch (VizException e) { + e.printStackTrace(); statusHandler.handle(Priority.PROBLEM, "Data Query:" - + " Error querying Metadata for FFG data."); + + " Error querying Metadata for FFG data."); } return rs; @@ -163,20 +174,20 @@ public class FlashFloodGuidanceDataManager { return null; } - public GribRecord getGribRecord(String uri) throws PluginException, + public GridRecord getGridRecord(String uri) throws PluginException, FileNotFoundException, StorageException { StringBuilder query = new StringBuilder(); query.append("from " - + com.raytheon.uf.common.dataplugin.grib.GribRecord.class + + com.raytheon.uf.common.dataplugin.grid.GridRecord.class .getName()); - GribRecord gr = null; + GridRecord gr = null; try { - List results = DirectDbQuery.executeQuery(query - .toString(), "metadata", QueryLanguage.HQL); - gr = (GribRecord) results.get(0)[0]; + List results = DirectDbQuery.executeQuery( + query.toString(), "metadata", QueryLanguage.HQL); + gr = (GridRecord) results.get(0)[0]; } catch (VizException e) { statusHandler.handle(Priority.PROBLEM, "FFG Query" - + " Error querying for areal FFG"); + + " Error querying for areal FFG"); } return gr; @@ -190,19 +201,19 @@ public class FlashFloodGuidanceDataManager { HydroConstants.IHFS, QueryLanguage.SQL); } catch (VizException e) { statusHandler.handle(Priority.PROBLEM, "FFG Query" - + " Error querying GeoArea table"); + + " Error querying GeoArea table"); } return rs; } - + public List getContingencyValue(String areaId, int duration, Date refTime) { List rs = null; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); sdf.setTimeZone(TimeZone.getTimeZone("GMT")); - + String date = sdf.format(refTime); - duration = duration / (1000*60*60); + duration = duration / (1000 * 60 * 60); int dur = 1001; if (duration == 1) { dur = 1001; @@ -226,20 +237,19 @@ public class FlashFloodGuidanceDataManager { HydroConstants.IHFS, QueryLanguage.SQL); } catch (VizException e) { statusHandler.handle(Priority.PROBLEM, "FFG Query" - + " Error querying ContingencyValue table"); + + " Error querying ContingencyValue table"); e.printStackTrace(); } - return rs; + return rs; } - + public List getContingencyValue(String boundaryType) { List rs = null; String where = " where pe='PP' and ts='CF' and lid in (select area_id from " + "GeoArea where boundary_type = '" + boundaryType.toUpperCase() + "') order by validtime desc, dur asc"; - String sql = "select distinct(validtime), dur from contingencyvalue"; try { @@ -247,7 +257,7 @@ public class FlashFloodGuidanceDataManager { HydroConstants.IHFS, QueryLanguage.SQL); } catch (VizException e) { statusHandler.handle(Priority.PROBLEM, "FFG Query" - + " Error querying ContingencyValue table"); + + " Error querying ContingencyValue table"); e.printStackTrace(); } diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/flashfloodguidance/FlashFloodGuidanceDlg.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/flashfloodguidance/FlashFloodGuidanceDlg.java index b91ddd7bbb..5f6efb7dad 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/flashfloodguidance/FlashFloodGuidanceDlg.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/flashfloodguidance/FlashFloodGuidanceDlg.java @@ -787,7 +787,7 @@ public class FlashFloodGuidanceDlg extends CaveSWTDialog { /* Check the FFG mode. */ if (ffgAreaCbo.getItem(ffgAreaCbo.getSelectionIndex()).equals("RFC")) { - ArrayList rs = dman.getGriddedDataList(); + java.util.List rs = dman.getGriddedDataList(); if ((rs != null) && (rs.size() > 0)) { for (Object[] oa : rs) { @@ -904,16 +904,21 @@ public class FlashFloodGuidanceDlg extends CaveSWTDialog { String fileWfo = xmrg.getName().substring(0, 3); int index = xmrg.getName().indexOf("20"); /* Parse the filename for duration and time stamp here. */ - String year = xmrg.getName().substring(index, index + 4); - String month = xmrg.getName().substring(index + 4, index + 6); - String day = xmrg.getName().substring(index + 6, index + 8); - String hour = xmrg.getName().substring(index + 8, index + 10); - String durString = xmrg.getName().substring(index + 10, index + 12); -// String year = xmrg.getName().substring(3, 7); -// String month = xmrg.getName().substring(7, 9); -// String day = xmrg.getName().substring(9, 11); -// String hour = xmrg.getName().substring(11, 13); -// String durString = xmrg.getName().substring(13, 15); + String year = xmrg.getName() + .substring(index, index + 4); + String month = xmrg.getName().substring(index + 4, + index + 6); + String day = xmrg.getName().substring(index + 6, + index + 8); + String hour = xmrg.getName().substring(index + 8, + index + 10); + String durString = xmrg.getName().substring(index + 10, + index + 12); + // String year = xmrg.getName().substring(3, 7); + // String month = xmrg.getName().substring(7, 9); + // String day = xmrg.getName().substring(9, 11); + // String hour = xmrg.getName().substring(11, 13); + // String durString = xmrg.getName().substring(13, 15); Calendar cal = Calendar.getInstance(TimeZone .getTimeZone("GMT")); @@ -1126,7 +1131,8 @@ public class FlashFloodGuidanceDlg extends CaveSWTDialog { String day = parts[2]; String date = parts[3]; String hour = parts[4]; - duration = Integer.parseInt(durationStr) * FFGConstants.SECONDS_PER_HOUR; + duration = Integer.parseInt(durationStr) + * FFGConstants.SECONDS_PER_HOUR; String paramAbr = "FFG" + durationStr + "24hr"; diff --git a/cave/com.raytheon.viz.hydrocommon/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.hydrocommon/META-INF/MANIFEST.MF index 4802255702..632efee340 100644 --- a/cave/com.raytheon.viz.hydrocommon/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.hydrocommon/META-INF/MANIFEST.MF @@ -20,7 +20,7 @@ Require-Bundle: org.eclipse.ui, com.raytheon.uf.common.colormap;bundle-version="1.11.13", com.raytheon.uf.common.mpe;bundle-version="1.11.13", com.raytheon.uf.viz.core.maps;bundle-version="1.0.0", - com.raytheon.uf.common.dataplugin.grib, + com.raytheon.uf.common.dataplugin.grid, com.raytheon.uf.common.dataplugin.shef;bundle-version="1.12.1174", com.raytheon.uf.common.gridcoverage;bundle-version="1.0.0" Bundle-ActivationPolicy: lazy @@ -46,6 +46,5 @@ Export-Package: com.raytheon.viz.hydrocommon, com.raytheon.viz.hydrocommon.util, com.raytheon.viz.hydrocommon.whfslib, com.raytheon.viz.hydrocommon.whfslib.colorthreshold -Import-Package: com.raytheon.uf.common.dataplugin.grib, - com.raytheon.uf.common.ohd, +Import-Package: com.raytheon.uf.common.ohd, com.raytheon.viz.grid.rsc diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/HydroDisplayManager.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/HydroDisplayManager.java index 73f86d2d0b..a08f5278f8 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/HydroDisplayManager.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/HydroDisplayManager.java @@ -35,7 +35,8 @@ import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IEditorPart; import com.raytheon.uf.common.dataplugin.PluginDataObject; -import com.raytheon.uf.common.dataplugin.grib.GribRecord; +import com.raytheon.uf.common.dataplugin.grid.GridConstants; +import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.common.dataplugin.shef.tables.Colorvalue; import com.raytheon.uf.common.dataquery.requests.RequestConstraint; import com.raytheon.uf.common.datastorage.records.FloatDataRecord; @@ -298,13 +299,12 @@ public class HydroDisplayManager { // Get the Grib data Map reqMap = new HashMap(); - reqMap.put("pluginName", new RequestConstraint("grib")); - reqMap.put("modelInfo.parameterAbbreviation", + reqMap.put(GridConstants.PLUGIN_NAME, new RequestConstraint(GridConstants.GRID)); + reqMap.put(GridConstants.PARAMETER_ABBREVIATION, new RequestConstraint(paramAbr)); reqMap.put("dataTime.refTime", new RequestConstraint(sdf.format(date))); - reqMap.put("modelInfo.modelName", new RequestConstraint("FFG-" - + rfc)); + reqMap.put(GridConstants.DATASET_ID, new RequestConstraint("FFG-" + rfc)); try { LayerProperty lp = new LayerProperty(); @@ -312,10 +312,10 @@ public class HydroDisplayManager { lp.setEntryQueryParameters(reqMap, false); List dataList = DataCubeContainer.getData(lp, 30); - GribRecord gr = null; + GridRecord gr = null; int i = 0; for (Object o : dataList) { - gr = (GribRecord) o; + gr = (GridRecord) o; IDataRecord[] recArr = DataCubeContainer .getDataRecord((PluginDataObject) o); gr.setMessageData(((FloatDataRecord) recArr[0]) @@ -465,13 +465,12 @@ public class HydroDisplayManager { // Get the Grib data Map reqMap = new HashMap(); - reqMap.put("pluginName", new RequestConstraint("grib")); - reqMap.put("modelInfo.parameterAbbreviation", + reqMap.put(GridConstants.PLUGIN_NAME, new RequestConstraint(GridConstants.GRID)); + reqMap.put(GridConstants.PARAMETER_ABBREVIATION, new RequestConstraint(paramAbr)); reqMap.put("dataTime.refTime", new RequestConstraint(sdf.format(date))); - reqMap.put("modelInfo.modelName", new RequestConstraint("FFG-" - + rfc)); + reqMap.put(GridConstants.DATASET_ID, new RequestConstraint("FFG-" + rfc)); try { LayerProperty lp = new LayerProperty(); @@ -479,10 +478,10 @@ public class HydroDisplayManager { lp.setEntryQueryParameters(reqMap, false); List dataList = DataCubeContainer.getData(lp, 30); - GribRecord gr = null; + GridRecord gr = null; int i = 0; for (Object o : dataList) { - gr = (GribRecord) o; + gr = (GridRecord) o; IDataRecord[] recArr = DataCubeContainer .getDataRecord((PluginDataObject) o); gr.setMessageData(((FloatDataRecord) recArr[0]) diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/FFGGridResource.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/FFGGridResource.java index 6d12ba1311..d85b19f8b1 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/FFGGridResource.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/FFGGridResource.java @@ -43,10 +43,10 @@ import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.datum.PixelInCell; import org.opengis.referencing.operation.TransformException; -import com.raytheon.uf.common.dataplugin.shef.tables.Colorvalue; import com.raytheon.uf.common.colormap.Color; import com.raytheon.uf.common.colormap.ColorMap; -import com.raytheon.uf.common.dataplugin.grib.GribRecord; +import com.raytheon.uf.common.dataplugin.grid.GridRecord; +import com.raytheon.uf.common.dataplugin.shef.tables.Colorvalue; import com.raytheon.uf.common.geospatial.MapUtil; import com.raytheon.uf.common.geospatial.ReferencedCoordinate; import com.raytheon.uf.common.hydro.spatial.HRAP; @@ -128,7 +128,7 @@ public class FFGGridResource extends private boolean isInterpolated; - private GribRecord gr; + private GridRecord gr; private Rectangle rfcExtent; @@ -147,7 +147,7 @@ public class FFGGridResource extends } private void loadData() { - gr = resourceData.getGribRecord(); + gr = resourceData.getGridRecord(); if (gr == null) { return; @@ -201,7 +201,7 @@ public class FFGGridResource extends parameters.setDataMin(0); cvt = parameters.getDataToImageConverter(); - gridGeometry = gr.getModelInfo().getLocation().getGridGeometry(); + gridGeometry = gr.getLocation().getGridGeometry(); try { data = new float[((float[]) gr.getMessageData()).length]; @@ -222,10 +222,10 @@ public class FFGGridResource extends HRAP hrap; Coordinate org = MapUtil.gridCoordinateToLatLon( new Coordinate(0, 0), PixelOrientation.LOWER_LEFT, - gr.getSpatialObject()); + gr.getLocation()); - int nx = gr.getSpatialObject().getNx(); - int ny = gr.getSpatialObject().getNy(); + int nx = gr.getLocation().getNx(); + int ny = gr.getLocation().getNy(); hrap = HRAP.getInstance(); @@ -348,8 +348,8 @@ public class FFGGridResource extends Map values = new HashMap(); try { - int nx = gr.getSpatialObject().getNx(); - int ny = gr.getSpatialObject().getNy(); + int nx = gr.getLocation().getNx(); + int ny = gr.getLocation().getNy(); Coordinate gridCell = coord.asGridCell(HRAP.getInstance() .getGridGeometry(), PixelInCell.CELL_CORNER); diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/FFGGridResourceData.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/FFGGridResourceData.java index a3c853c4e5..4e1d5dbbb6 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/FFGGridResourceData.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/FFGGridResourceData.java @@ -23,7 +23,7 @@ import java.util.Date; import javax.xml.bind.annotation.XmlType; -import com.raytheon.uf.common.dataplugin.grib.GribRecord; +import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.viz.core.drawables.IDescriptor; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.rsc.AbstractResourceData; @@ -35,38 +35,38 @@ import com.raytheon.viz.hydrocommon.constants.FFGConstants.ResolutionLevel; * FFG Resource Data. * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Oct 14, 2009 2256       mpduff     Initial creation.  Moved here
  *                                    for additional functionality.
- *
+ * 
  * 
- * + * * @author mpduff - * @version 1.0 + * @version 1.0 */ -@XmlType(name="ffgGridResourceData") +@XmlType(name = "ffgGridResourceData") public class FFGGridResourceData extends AbstractResourceData { private int duration; - - private GribRecord gribRecord; - + + private GridRecord gridRecord; + private ResolutionLevel resolution; - + private Date dataDate; - + public FFGGridResourceData() { - + } - - public FFGGridResourceData(int duration, GribRecord gr, + + public FFGGridResourceData(int duration, GridRecord gr, ResolutionLevel resolution, Date dataDate) { this.setDuration(duration); - this.setGribRecord(gr); + this.setGridRecord(gr); this.setResolution(resolution); this.setDataDate(dataDate); } @@ -88,7 +88,7 @@ public class FFGGridResourceData extends AbstractResourceData { @Override public AbstractVizResource construct(LoadProperties loadProperties, IDescriptor descriptor) throws VizException { - + return new FFGGridResource(this, loadProperties); } @@ -98,7 +98,7 @@ public class FFGGridResourceData extends AbstractResourceData { @Override public void update(Object updateData) { // TODO Auto-generated method stub - + } /** @@ -118,15 +118,15 @@ public class FFGGridResourceData extends AbstractResourceData { /** * @param gribRecord the gribRecord to set */ - public void setGribRecord(GribRecord gribRecord) { - this.gribRecord = gribRecord; + public void setGridRecord(GridRecord gridRecord) { + this.gridRecord = gridRecord; } /** * @return the gribRecord */ - public GribRecord getGribRecord() { - return gribRecord; + public GridRecord getGridRecord() { + return gridRecord; } /** @@ -142,7 +142,7 @@ public class FFGGridResourceData extends AbstractResourceData { public ResolutionLevel getResolution() { return resolution; } - + /** * @param dataDate the dataDate to set */ diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/RFCGriddedBasinFFGResource.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/RFCGriddedBasinFFGResource.java index 976ab83f02..67479e3502 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/RFCGriddedBasinFFGResource.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/RFCGriddedBasinFFGResource.java @@ -41,10 +41,10 @@ import org.opengis.metadata.spatial.PixelOrientation; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.datum.PixelInCell; -import com.raytheon.uf.common.dataplugin.shef.tables.Colorvalue; import com.raytheon.uf.common.colormap.Color; import com.raytheon.uf.common.colormap.ColorMap; -import com.raytheon.uf.common.dataplugin.grib.GribRecord; +import com.raytheon.uf.common.dataplugin.grid.GridRecord; +import com.raytheon.uf.common.dataplugin.shef.tables.Colorvalue; import com.raytheon.uf.common.geospatial.MapUtil; import com.raytheon.uf.common.geospatial.ReferencedCoordinate; import com.raytheon.uf.common.hydro.spatial.HRAP; @@ -116,7 +116,7 @@ public class RFCGriddedBasinFFGResource extends private Rectangle rfcExtent; - private GribRecord gr; + private GridRecord gr; private float minArea = 9.0f; @@ -148,7 +148,7 @@ public class RFCGriddedBasinFFGResource extends private void loadData() { initColorMapParams(); - gridGeometry = gr.getModelInfo().getLocation().getGridGeometry(); + gridGeometry = gr.getLocation().getGridGeometry(); try { data = new float[((float[]) gr.getMessageData()).length]; @@ -161,10 +161,10 @@ public class RFCGriddedBasinFFGResource extends HRAP hrap; Coordinate org = MapUtil.gridCoordinateToLatLon( new Coordinate(0, 0), PixelOrientation.CENTER, - gr.getSpatialObject()); + gr.getLocation()); - int nx = gr.getSpatialObject().getNx(); - int ny = gr.getSpatialObject().getNy(); + int nx = gr.getLocation().getNx(); + int ny = gr.getLocation().getNy(); hrap = HRAP.getInstance(); diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/RFCGriddedBasinFFGResourceData.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/RFCGriddedBasinFFGResourceData.java index 56d233dc27..aff3caad1f 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/RFCGriddedBasinFFGResourceData.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/resource/RFCGriddedBasinFFGResourceData.java @@ -22,8 +22,8 @@ package com.raytheon.viz.hydrocommon.resource; import java.util.Date; import java.util.List; +import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.common.dataplugin.shef.tables.Colorvalue; -import com.raytheon.uf.common.dataplugin.grib.GribRecord; import com.raytheon.uf.viz.core.drawables.IDescriptor; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.rsc.AbstractResourceData; @@ -51,12 +51,14 @@ import com.raytheon.viz.hydrocommon.constants.FFGConstants.ResolutionLevel; public class RFCGriddedBasinFFGResourceData extends AbstractResourceData { private ResolutionLevel resolution; + private int duration; + private Date dataDate; - - private GribRecord gr; - - public RFCGriddedBasinFFGResourceData(int duration, GribRecord gr, + + private GridRecord gr; + + public RFCGriddedBasinFFGResourceData(int duration, GridRecord gr, ResolutionLevel resolution, Date dataDate) { this.duration = duration; this.gr = gr; @@ -126,14 +128,14 @@ public class RFCGriddedBasinFFGResourceData extends AbstractResourceData { /** * @return the gr */ - public GribRecord getGr() { + public GridRecord getGr() { return gr; } /** * @param gr the gr to set */ - public void setGr(GribRecord gr) { + public void setGr(GridRecord gr) { this.gr = gr; }