Issue #1260 Fix data loading from NetCDF databases.

Change-Id: I2b4f0e8d99fa6021d187b756fc1c7abb792c7920

Former-commit-id: a982185c63 [formerly 1767d945fc] [formerly 3874ac688b] [formerly ffc8f1567d [formerly 3874ac688b [formerly 8c7eda363e3ad13853bed43d6f2d1eb5f61fab94]]]
Former-commit-id: ffc8f1567d
Former-commit-id: 0c12e001b4c984752c15275ec5ae8741dd1287c7 [formerly 141c47d4e0]
Former-commit-id: 6c4264972f
This commit is contained in:
Ron Anderson 2012-10-25 16:59:25 -05:00
parent 5b3efb85e7
commit 238a1aa07e
3 changed files with 12 additions and 17 deletions

View file

@ -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);
}
}

View file

@ -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();
}

View file

@ -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);
}
}