Omaha #2866 Calculate subgrid size to limit response sizes
Change-Id: I3ccc8f7fa6e63f9bf5bf3bc7487aa38df3cc76c1 Former-commit-id: 6620a7bdc7da9d1c2edcb49b710db425f5a1c110
This commit is contained in:
parent
8fc27da665
commit
a7353a5ff0
1 changed files with 25 additions and 8 deletions
|
@ -74,6 +74,7 @@ import com.raytheon.uf.common.util.StringUtil;
|
|||
* Oct 31, 2013 2508 randerso Change to use DiscreteGridSlice.getKeys()
|
||||
* Feb 04, 2014 2672 bsteffen Enable requesting subgrids.
|
||||
* Jul 30, 2014 3184 njensen Renamed valid identifiers to optional
|
||||
* Feb 10, 2015 2866 nabowle Overwrite subgrid size estimation.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -204,6 +205,22 @@ public class GFEGridFactory extends AbstractGridDataPluginFactory implements
|
|||
return constraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* Estimates the subgrid memory size using the grid geometry's size because
|
||||
* {@link #getDataSource(PluginDataObject, SubGridGeometryCalculator)} uses
|
||||
* an {@link OffsetDataSource} that holds the full grid data in memory.
|
||||
*
|
||||
* @param gridGeom
|
||||
* @param subGrid
|
||||
* @return
|
||||
*/
|
||||
protected long estimateSubgridSize(GridGeometry2D gridGeom,
|
||||
SubGridGeometryCalculator subGrid) {
|
||||
long size = gridGeom.getGridRange().getSpan(0)
|
||||
* gridGeom.getGridRange().getSpan(1);
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DataSource getDataSource(PluginDataObject pdo,
|
||||
SubGridGeometryCalculator subGrid) {
|
||||
|
|
Loading…
Add table
Reference in a new issue