Issue #2947 Make GridCoverage implement IGridGeometryProvider.

Former-commit-id: a47df3de42 [formerly 22f068481f] [formerly 037ed878b7] [formerly a47df3de42 [formerly 22f068481f] [formerly 037ed878b7] [formerly e911a4c917 [formerly 037ed878b7 [formerly f2a204c593f65c67c87e16fa513d00383ad568e5]]]]
Former-commit-id: e911a4c917
Former-commit-id: 7867d82b5c [formerly a741091a55] [formerly bb6f2e8b4f0dfa4dc0ab16b571703f60f48b59ad [formerly 6666898f1d]]
Former-commit-id: 72bc8945d81fadb8d08dc0a6adf04fa3d21a56d9 [formerly 3555e7767e]
Former-commit-id: 04579d1398
This commit is contained in:
Ben Steffensmeier 2014-04-11 16:43:10 -05:00
parent 2daaee7db2
commit 81aa095fe4
2 changed files with 6 additions and 14 deletions

View file

@ -99,6 +99,8 @@ import com.vividsolutions.jts.simplify.TopologyPreservingSimplifier;
* made init method public for use in GFEDao
* 09/30/13 #2333 mschenke Added method to construct from {@link IGridGeometryProvider}
* 10/22/13 #2361 njensen Remove XML annotations
* 04/11/14 #2947 bsteffen Remove ISpatialObject constructor.
*
*
*
* </pre>
@ -343,19 +345,6 @@ public class GridLocation extends PersistableDataObject<String> implements
"GMT");
}
/**
* @param id
* @param coverage
*/
public GridLocation(String id, ISpatialObject coverage) {
this.siteId = id;
this.crsObject = coverage.getCrs();
this.crsWKT = this.crsObject.toWKT();
this.geometry = (Polygon) coverage.getGeometry();
this.nx = coverage.getNx();
this.ny = coverage.getNy();
}
/**
* @param id
* @param provider

View file

@ -51,6 +51,7 @@ import org.opengis.referencing.operation.MathTransform;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
import com.raytheon.uf.common.geospatial.CRSCache;
import com.raytheon.uf.common.geospatial.IGridGeometryProvider;
import com.raytheon.uf.common.geospatial.ISpatialObject;
import com.raytheon.uf.common.geospatial.MapUtil;
import com.raytheon.uf.common.gridcoverage.exception.GridCoverageException;
@ -77,6 +78,7 @@ import com.vividsolutions.jts.geom.Geometry;
* spatial
* Oct 15, 2013 2473 bsteffen add @XmlSeeAlso for self contained JAXB
* context.
* Apr 11, 2014 2947 bsteffen Implement IGridGeometryProvider.
*
* </pre>
*
@ -93,7 +95,7 @@ import com.vividsolutions.jts.geom.Geometry;
StereographicGridCoverage.class })
@DynamicSerialize
public abstract class GridCoverage extends PersistableDataObject<Integer>
implements ISpatialObject {
implements ISpatialObject, IGridGeometryProvider {
private static final long serialVersionUID = -1355232934065074837L;
@ -394,6 +396,7 @@ public abstract class GridCoverage extends PersistableDataObject<Integer>
this.description = description;
}
@Override
public GridGeometry2D getGridGeometry() {
if (gridGeometry == null) {
gridGeometry = MapUtil.getGridGeometry(this);