Issue #1260 Fix data loading from NetCDF databases.
Change-Id: I2b4f0e8d99fa6021d187b756fc1c7abb792c7920 Former-commit-id:a982185c63
[formerly1767d945fc
] [formerly3874ac688b
] [formerlyffc8f1567d
[formerly3874ac688b
[formerly 8c7eda363e3ad13853bed43d6f2d1eb5f61fab94]]] Former-commit-id:ffc8f1567d
Former-commit-id: 0c12e001b4c984752c15275ec5ae8741dd1287c7 [formerly141c47d4e0
] Former-commit-id:6c4264972f
This commit is contained in:
parent
5b3efb85e7
commit
238a1aa07e
3 changed files with 12 additions and 17 deletions
|
@ -177,9 +177,9 @@ public class D2DGridDatabase extends VGridDatabase {
|
|||
+ ": GFE domain does not overlap dataset domain.");
|
||||
this.remap = null;
|
||||
} else {
|
||||
this.remap = new RemapGrid(NetCDFUtils.subGridGL(
|
||||
dbId.toString(), this.inputLoc, subdomain),
|
||||
this.outputLoc);
|
||||
GridLocation subGloc = new GridLocation(dbId.toString(),
|
||||
this.inputLoc, subdomain);
|
||||
this.remap = new RemapGrid(subGloc, this.outputLoc);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
**/
|
||||
package com.raytheon.edex.plugin.gfe.server.database;
|
||||
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -51,6 +52,7 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.TimeRange;
|
||||
import com.raytheon.uf.edex.database.DataAccessLayerException;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
|
||||
/**
|
||||
* Database that reads netCDF files like A1
|
||||
|
@ -205,9 +207,13 @@ public class NetCDFGridDatabase extends VGridDatabase {
|
|||
+ ": GFE domain does not overlap dataset domain.");
|
||||
this.remap = null;
|
||||
} else {
|
||||
this.remap = new RemapGrid(NetCDFUtils.subGridGL(
|
||||
this.dbId.toString(), this.inputGloc, this.subdomain),
|
||||
this.outputGloc);
|
||||
GridLocation subGloc = new GridLocation(this.dbId.toString(),
|
||||
this.inputGloc.getProjection(), new Point(
|
||||
this.subdomain.width, this.subdomain.height),
|
||||
new Coordinate(this.subdomain.x, this.subdomain.y),
|
||||
new Coordinate(this.subdomain.width,
|
||||
this.subdomain.height), "GMT");
|
||||
this.remap = new RemapGrid(subGloc, this.outputGloc);
|
||||
}
|
||||
loadParms();
|
||||
}
|
||||
|
|
|
@ -370,15 +370,4 @@ public class NetCDFUtils {
|
|||
|
||||
return rval;
|
||||
}
|
||||
|
||||
public static GridLocation subGridGL(String id, GridLocation igloc,
|
||||
Rectangle subd) {
|
||||
// Coordinate nwo = igloc.worldCoordinate(subd.origin());
|
||||
// Coordinate nwe = igloc.worldCoordinate(subd.upperRight());
|
||||
// CartDomain2D<float> swd (nwo, nwe - nwo);
|
||||
// return GridLocation(igloc.projection()->pdata(),
|
||||
// subd.extent() + Point (1, 1), swd);
|
||||
|
||||
return new GridLocation(id, igloc, subd);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue