Omaha #5414 - Allow subgrids to be disabled
Change-Id: I8f111e3e18550080b9b933d46c492d4a0245e065 Former-commit-id: 658eb843c65bf460be49989540c349a0dade0ad7
This commit is contained in:
parent
88493b5ac8
commit
5fd1cea160
2 changed files with 30 additions and 6 deletions
|
@ -82,7 +82,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Jul 21, 2014 3373 bclement JAXB managers only live during initializeGrids()
|
||||
* Mar 04, 2015 3959 rjpeter Update for grid based subgridding.
|
||||
* Sep 28, 2015 4868 rjpeter Allow subgrids to be defined per coverage.
|
||||
* Feb 26, 2016 5414 rjpeter Fix subgrids along boundary.
|
||||
* Feb 26, 2016 5414 rjpeter Fix subgrids along boundary and add check for disabled subgrid.
|
||||
* </pre>
|
||||
*
|
||||
* @author bphillip
|
||||
|
@ -300,7 +300,8 @@ public class GribSpatialCache {
|
|||
.getSubGridDef(modelName, coverage);
|
||||
|
||||
try {
|
||||
if (subGridDef != null) {
|
||||
if ((subGridDef != null)
|
||||
&& (subGridDef.isSubGridDisabled() == false)) {
|
||||
String referenceGrid = subGridDef.getReferenceGrid();
|
||||
GridCoverage referenceCoverage = getGridByName(referenceGrid);
|
||||
if (referenceCoverage == null) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import com.raytheon.uf.common.geospatial.MapUtil;
|
|||
* Jun 25, 2010 rjpeter Initial creation
|
||||
* Oct 15, 2013 2473 bsteffen Remove deprecated ISerializableObject.
|
||||
* Mar 04, 2015 3959 rjpeter Make nx/ny int.
|
||||
* Mar 04, 2016 5414 rjpeter Allow subgrids to be specifically disabled.
|
||||
* </pre>
|
||||
*
|
||||
* @author rjpeter
|
||||
|
@ -53,15 +54,18 @@ public class SubGridDef {
|
|||
@XmlList
|
||||
private List<String> modelNames;
|
||||
|
||||
@XmlElement
|
||||
@XmlElement(required = true)
|
||||
private String referenceGrid;
|
||||
|
||||
@XmlElement(required = true)
|
||||
@XmlElement
|
||||
private int nx;
|
||||
|
||||
@XmlElement(required = true)
|
||||
@XmlElement
|
||||
private int ny;
|
||||
|
||||
@XmlElement
|
||||
private Boolean noSubGrid;
|
||||
|
||||
@XmlElement
|
||||
private Boolean shiftWest;
|
||||
|
||||
|
@ -95,6 +99,25 @@ public class SubGridDef {
|
|||
this.ny = ny;
|
||||
}
|
||||
|
||||
public boolean isSubGridDisabled() {
|
||||
return Boolean.TRUE.equals(noSubGrid) || (nx <= 0) || (ny <= 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the noSubGrid
|
||||
*/
|
||||
public Boolean getNoSubGrid() {
|
||||
return noSubGrid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param noSubGrid
|
||||
* the noSubGrid to set
|
||||
*/
|
||||
public void setNoSubGrid(Boolean noSubGrid) {
|
||||
this.noSubGrid = noSubGrid;
|
||||
}
|
||||
|
||||
public Boolean getShiftWest() {
|
||||
return shiftWest;
|
||||
}
|
||||
|
@ -137,4 +160,4 @@ public class SubGridDef {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue