Issue #1872 Fix compile errors
Change-Id: Ic70a61c30bbe8ff4768a8079beb5be5f9336876a Former-commit-id:7cf482512d
[formerly 2b84d1a58c99858784294bf32b293f8a54c38ecd] Former-commit-id:06e6d84273
This commit is contained in:
parent
8c5f3fb8f7
commit
add67ae3dc
3 changed files with 2 additions and 99 deletions
|
@ -24,7 +24,6 @@ import java.nio.Buffer;
|
|||
import java.nio.FloatBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
|
||||
import com.raytheon.uf.common.colormap.image.ColorMapData.ColorMapDataType;
|
||||
import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSDataRecord;
|
||||
import com.raytheon.uf.common.datastorage.Request;
|
||||
import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
|
||||
|
@ -44,6 +43,7 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 30, 2011 mschenke Initial creation
|
||||
* Apr 04, 2013 djohnson Remove color import.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
|
|
@ -20,7 +20,6 @@ Require-Bundle: com.raytheon.uf.common.dataquery;bundle-version="1.0.0",
|
|||
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
|
||||
org.geotools;bundle-version="2.6.4",
|
||||
com.raytheon.uf.common.localization;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.spatial,
|
||||
com.raytheon.uf.common.util
|
||||
Export-Package: com.raytheon.uf.edex.database,
|
||||
com.raytheon.uf.edex.database.cluster,
|
||||
|
|
|
@ -35,7 +35,6 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.geotools.coverage.grid.GridCoverage2D;
|
||||
import org.geotools.geometry.jts.ReferencedEnvelope;
|
||||
import org.opengis.referencing.FactoryException;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
|
@ -70,8 +69,6 @@ import com.raytheon.uf.common.localization.LocalizationFile;
|
|||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.spatial.reprojection.DataReprojector;
|
||||
import com.raytheon.uf.common.spatial.reprojection.ReferencedDataRecord;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.common.util.FileUtil;
|
||||
import com.raytheon.uf.edex.core.EdexException;
|
||||
|
@ -82,8 +79,6 @@ import com.raytheon.uf.edex.database.purge.PurgeLogger;
|
|||
import com.raytheon.uf.edex.database.purge.PurgeRule;
|
||||
import com.raytheon.uf.edex.database.purge.PurgeRuleSet;
|
||||
import com.raytheon.uf.edex.database.query.DatabaseQuery;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
import com.vividsolutions.jts.geom.Envelope;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
import com.vividsolutions.jts.geom.Polygon;
|
||||
|
||||
|
@ -107,6 +102,7 @@ import com.vividsolutions.jts.geom.Polygon;
|
|||
* Feb 12, 2013 #1608 randerso Changed to call deleteDatasets
|
||||
* Mar 27, 2013 1821 bsteffen Remove extra store in persistToHDF5 for
|
||||
* replace only operations.
|
||||
* Apr 04, 2013 djohnson Remove formerly removed methods that won't compile.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1597,94 +1593,6 @@ public abstract class PluginDao extends CoreDao {
|
|||
return (List<PersistableDataObject>) this.queryByCriteria(dbQuery);
|
||||
}
|
||||
|
||||
public double getHDF5Value(PluginDataObject pdo,
|
||||
CoordinateReferenceSystem crs, Coordinate coord,
|
||||
double defaultReturn) throws Exception {
|
||||
IDataStore store = getDataStore((IPersistable) pdo);
|
||||
// TODO a cache would probably be good here
|
||||
double rval = defaultReturn;
|
||||
if (pdo instanceof ISpatialEnabled) {
|
||||
ISpatialObject spat = getSpatialObject(pdo);
|
||||
DataReprojector reprojector = getDataReprojector(store);
|
||||
ReferencedEnvelope nativeEnv = getNativeEnvelope(spat);
|
||||
IDataRecord data = reprojector.getProjectedPoints(pdo.getDataURI(),
|
||||
spat, nativeEnv, crs, new Coordinate[] { coord });
|
||||
Double res = extractSingle(data);
|
||||
if (res != null) {
|
||||
rval = res;
|
||||
}
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param record
|
||||
* @param crs
|
||||
* target crs for projected data
|
||||
* @param envelope
|
||||
* bounding box in target crs
|
||||
* @return null if envelope is disjoint with data bounds
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReferencedDataRecord getProjected(PluginDataObject record,
|
||||
CoordinateReferenceSystem crs, Envelope envelope) throws Exception {
|
||||
ReferencedEnvelope targetEnv = new ReferencedEnvelope(
|
||||
envelope.getMinX(), envelope.getMaxX(), envelope.getMinY(),
|
||||
envelope.getMaxY(), crs);
|
||||
return getProjected(record, targetEnv);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param record
|
||||
* @param crs
|
||||
* target crs for projected data
|
||||
* @param envelope
|
||||
* bounding box in target crs
|
||||
* @return null if envelope is disjoint with data bounds
|
||||
* @throws Exception
|
||||
*/
|
||||
public GridCoverage2D getProjectedCoverage(PluginDataObject record,
|
||||
CoordinateReferenceSystem crs, Envelope envelope) throws Exception {
|
||||
ReferencedEnvelope targetEnv = new ReferencedEnvelope(
|
||||
envelope.getMinX(), envelope.getMaxX(), envelope.getMinY(),
|
||||
envelope.getMaxY(), crs);
|
||||
return getProjectedCoverage(record, targetEnv);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param record
|
||||
* @param targetEnvelope
|
||||
* bounding box in target crs
|
||||
* @return null if envelope is disjoint with data bounds
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReferencedDataRecord getProjected(PluginDataObject record,
|
||||
ReferencedEnvelope targetEnvelope) throws Exception {
|
||||
ISpatialObject spatial = getSpatialObject(record);
|
||||
IDataStore store = getDataStore((IPersistable) record);
|
||||
DataReprojector reprojector = getDataReprojector(store);
|
||||
ReferencedEnvelope nativeEnvelope = getNativeEnvelope(spatial);
|
||||
return reprojector.getReprojected(record.getDataURI(), spatial,
|
||||
nativeEnvelope, targetEnvelope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param record
|
||||
* @param targetEnvelope
|
||||
* bounding box in target crs
|
||||
* @return null if envelope is disjoint with data bounds
|
||||
* @throws Exception
|
||||
*/
|
||||
public GridCoverage2D getProjectedCoverage(PluginDataObject record,
|
||||
ReferencedEnvelope envelope) throws Exception {
|
||||
ISpatialObject spatial = getSpatialObject(record);
|
||||
IDataStore store = getDataStore((IPersistable) record);
|
||||
DataReprojector reprojector = getDataReprojector(store);
|
||||
ReferencedEnvelope nativeEnvelope = getNativeEnvelope(spatial);
|
||||
return reprojector.getReprojectedCoverage(record.getDataURI(), spatial,
|
||||
nativeEnvelope, envelope);
|
||||
}
|
||||
|
||||
protected ISpatialObject getSpatialObject(PluginDataObject record)
|
||||
throws Exception {
|
||||
if (record instanceof ISpatialEnabled) {
|
||||
|
@ -1694,10 +1602,6 @@ public abstract class PluginDao extends CoreDao {
|
|||
}
|
||||
}
|
||||
|
||||
protected DataReprojector getDataReprojector(IDataStore dataStore) {
|
||||
return new DataReprojector(dataStore);
|
||||
}
|
||||
|
||||
protected ReferencedEnvelope getNativeEnvelope(ISpatialObject spatial)
|
||||
throws FactoryException {
|
||||
CoordinateReferenceSystem crs = spatial.getCrs();
|
||||
|
|
Loading…
Add table
Reference in a new issue