Issue #2817 Fix image reproject. Remove deprecated mesh reproject.

Former-commit-id: e27fc9ce71 [formerly 152980350c] [formerly 780dc19fac] [formerly 780dc19fac [formerly 70ae372303]] [formerly e08d4f77c3 [formerly 780dc19fac [formerly 70ae372303] [formerly e08d4f77c3 [formerly 5e5c09b701d44e8cedcad273f301bcf92f5606ec]]]]
Former-commit-id: e08d4f77c3
Former-commit-id: 0378a9aa7d884c75fc24fb82c40926b624e443e8 [formerly c293b1124e59af7c01e948de86093eee22fbb5d9] [formerly 7aca322faa [formerly a6bf896593]]
Former-commit-id: 7aca322faa
Former-commit-id: d27c21b9f6
This commit is contained in:
Ben Steffensmeier 2014-02-21 17:37:19 -06:00
parent f5a21bb41e
commit ce3ced38c7
11 changed files with 96 additions and 122 deletions

View file

@ -61,8 +61,8 @@ import com.raytheon.uf.viz.remote.graphics.events.imagery.PaintImagesEvent;
import com.raytheon.uf.viz.remote.graphics.events.imagery.RenderedImageEvent;
import com.raytheon.uf.viz.remote.graphics.events.imagery.UpdateImageDataEvent;
import com.raytheon.uf.viz.remote.graphics.events.imagery.UpdateSingleColorImage;
import com.raytheon.uf.viz.remote.graphics.events.mesh.CloneMeshEvent;
import com.raytheon.uf.viz.remote.graphics.events.mesh.CreateMeshEvent;
import com.raytheon.uf.viz.remote.graphics.events.mesh.ReprojectMeshEvent;
import com.raytheon.uf.viz.remote.graphics.events.mosaic.CreateMosaicImageEvent;
import com.raytheon.uf.viz.remote.graphics.events.mosaic.UpdateImagesToMosaic;
import com.raytheon.uf.viz.remote.graphics.events.mosaic.UpdateMosaicExtent;
@ -76,9 +76,10 @@ import com.raytheon.uf.viz.remote.graphics.extensions.DispatchingMosaicOrderedEx
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 16, 2012 mschenke Initial creation
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Apr 16, 2012 mschenke Initial creation
* Feb 21, 2014 2817 bsteffen Fix mesh cloning.
*
* </pre>
*
@ -319,12 +320,13 @@ public class ImagingRenderingHandler extends CollaborationRenderingHandler {
}
@Subscribe
public void reprojectMesh(ReprojectMeshEvent event) {
IMesh mesh = dataManager.getRenderableObject(event.getObjectId(),
public void cloneMesh(CloneMeshEvent event) {
IMesh mesh = dataManager.getRenderableObject(event.getSourceObjectId(),
IMesh.class);
if (mesh != null) {
try {
mesh.reproject(event.getTargetGeometry());
mesh = mesh.clone(event.getTargetGeometry());
dataManager.putRenderableObject(event.getObjectId(), mesh);
} catch (VizException e) {
Activator.statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);

View file

@ -1,13 +1,12 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Core Plug-in
Bundle-Name: Viz Core Plug-in
Bundle-SymbolicName: com.raytheon.uf.viz.core;singleton:=true
Bundle-Version: 1.14.0.qualifier
Bundle-Version: 1.14.1.qualifier
Bundle-Activator: com.raytheon.uf.viz.core.Activator
Bundle-Vendor: Raytheon
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.apache.commons.beanutils;bundle-version="1.6.1",
org.apache.http;visibility:=reexport,
com.raytheon.uf.common.localization;visibility:=reexport,
com.raytheon.uf.common.serialization;visibility:=reexport,
@ -18,21 +17,19 @@ Require-Bundle: org.eclipse.ui,
org.apache.commons.lang,
javax.vecmath;bundle-version="1.3.1",
javax.measure;bundle-version="1.0.0",
org.jep;bundle-version="1.0.0",
com.raytheon.uf.common.datastorage;bundle-version="1.11.11",
org.apache.velocity;bundle-version="1.5.0",
org.apache.qpid;bundle-version="0.18.0",
javax.jms;bundle-version="1.0.0",
org.apache.activemq,
com.raytheon.uf.common.util;bundle-version="1.0.0",
com.raytheon.uf.common.auth;bundle-version="1.0.0",
com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.dataplugin.level,
com.raytheon.uf.common.dataplugin.level;bundle-version="1.14.0",
com.raytheon.uf.common.dataquery;visibility:=reexport,
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
com.raytheon.uf.common.units;bundle-version="1.0.0",
com.raytheon.uf.common.colormap;bundle-version="1.12.1174",
com.raytheon.uf.common.pointdata;bundle-version="1.12.1174",
com.raytheon.uf.common.pointdata;bundle-version="1.13.0",
com.raytheon.uf.common.time;bundle-version="1.12.1174",
com.raytheon.uf.common.comm;bundle-version="1.12.1174",
com.raytheon.uf.common.message;bundle-version="1.12.1174",

View file

@ -29,9 +29,9 @@ import com.raytheon.uf.viz.core.exception.VizException;
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
*
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Feb 21, 2014 2817 bsteffen Remove Deprecated reproject.
*
* </pre>
*
@ -53,17 +53,6 @@ public interface IMesh {
*/
public boolean intersects(IExtent extent);
/**
* use clone instead, this method will be removed in future version.
*
* @param targetGeometry
* @return
* @throws VizException
*/
@Deprecated
public IMesh reproject(GeneralGridGeometry targetGeometry)
throws VizException;
/**
* Create a mesh identical to this mesh but for a different target geometry.
* If this mesh is no longer in use than dispose should be called after

View file

@ -2,12 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: KML Export
Bundle-SymbolicName: com.raytheon.uf.viz.kml.export;singleton:=true
Bundle-Version: 1.14.0.qualifier
Bundle-Version: 1.14.1.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.core.runtime,
com.raytheon.uf.viz.core;bundle-version="1.14.0",
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
com.raytheon.uf.viz.core;bundle-version="1.14.1",
com.raytheon.viz.ui;bundle-version="1.14.0",
de.micromata.opengis.kml,
com.raytheon.uf.common.geospatial,

View file

@ -39,9 +39,10 @@ import com.raytheon.uf.viz.core.exception.VizException;
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 1, 2012 bsteffen Initial creation
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Jun 01, 2012 bsteffen Initial creation
* Feb 21, 2014 2817 bsteffen Remove Deprecated reproject.
*
* </pre>
*
@ -64,7 +65,10 @@ public class KmlMesh implements IMesh {
@Override
public void dispose() {
/*
* Nothing to do because no resources are out of reach of the garbage
* collector.
*/
}
@Override
@ -72,12 +76,6 @@ public class KmlMesh implements IMesh {
return false;
}
@Override
public KmlMesh reproject(GeneralGridGeometry targetGeometry)
throws VizException {
return clone(targetGeometry);
}
@Override
public KmlMesh clone(GeneralGridGeometry targetGeometry)
throws VizException {

View file

@ -2,22 +2,20 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Remote Graphics
Bundle-SymbolicName: com.raytheon.uf.viz.remote.graphics;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Version: 1.14.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.remote.graphics.Activator
Bundle-Vendor: RAYTHEON
Eclipse-RegisterBuddy: com.raytheon.uf.viz.core
Eclipse-BuddyPolicy: dependent
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
com.raytheon.uf.common.colormap;bundle-version="1.12.1174",
com.raytheon.viz.ui;bundle-version="1.12.1174",
com.raytheon.uf.common.util;bundle-version="1.12.1174",
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
javax.measure;bundle-version="1.0.0",
javax.vecmath;bundle-version="1.3.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Eclipse-RegisterBuddy: com.raytheon.uf.viz.core
Eclipse-BuddyPolicy: dependent
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
com.raytheon.uf.viz.core;bundle-version="1.14.1",
com.raytheon.uf.common.colormap,
com.raytheon.viz.ui;bundle-version="1.14.0",
com.raytheon.uf.common.util,
com.raytheon.uf.common.geospatial,
javax.measure
Export-Package: com.raytheon.uf.viz.remote.graphics,
com.raytheon.uf.viz.remote.graphics.events,
com.raytheon.uf.viz.remote.graphics.events.clipping,

View file

@ -27,15 +27,16 @@ import com.raytheon.uf.viz.remote.graphics.events.rendering.IRenderEvent;
import com.vividsolutions.jts.geom.Coordinate;
/**
* TODO Add Description
* Event to indicate an image should be painted.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 8, 2012 mschenke Initial creation
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Mar 08, 2012 mschenke Initial creation
* Feb 21, 2014 2817 bsteffen Fix equals.
*
* </pre>
*
@ -213,10 +214,10 @@ public class PaintImageEvent extends AbstractDispatchingObjectEvent implements
if (getClass() != obj.getClass())
return false;
PaintImageEvent other = (PaintImageEvent) obj;
if (meshId == other.meshId && meshId != -1) {
if (meshId != other.meshId) {
// If meshes are set, compare them only
return true;
} else if (meshId == other.meshId) {
return false;
} else if (meshId == -1 && meshId == other.meshId) {
// Compare extents if no meshes set (-1)
if (ll == null) {
if (other.ll != null)

View file

@ -22,29 +22,37 @@ package com.raytheon.uf.viz.remote.graphics.events.mesh;
import org.geotools.coverage.grid.GeneralGridGeometry;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.viz.remote.graphics.events.AbstractDispatchingObjectEvent;
import com.raytheon.uf.viz.remote.graphics.events.ICreationEvent;
/**
* TODO Add Description
*
* Event for cloning a mesh in a different projection
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 26, 2012 mschenke Initial creation
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Feb 21, 2014 2817 bsteffen Initial creation
*
* </pre>
*
* @author mschenke
* @author bsteffen
* @version 1.0
*/
@DynamicSerialize
public class ReprojectMeshEvent extends AbstractDispatchingObjectEvent {
public class CloneMeshEvent extends AbstractDispatchingObjectEvent implements
ICreationEvent {
@DynamicSerializeElement
private GeneralGridGeometry targetGeometry;
@DynamicSerializeElement
private int sourceObjectId;
/**
* @return the targetGeometry
*/
@ -60,4 +68,12 @@ public class ReprojectMeshEvent extends AbstractDispatchingObjectEvent {
this.targetGeometry = targetGeometry;
}
public int getSourceObjectId() {
return sourceObjectId;
}
public void setSourceObjectId(int sourceObjectId) {
this.sourceObjectId = sourceObjectId;
}
}

View file

@ -28,6 +28,7 @@ import com.raytheon.uf.viz.remote.graphics.Dispatcher;
import com.raytheon.uf.viz.remote.graphics.DispatchingObject;
import com.raytheon.uf.viz.remote.graphics.events.DisposeObjectEvent;
import com.raytheon.uf.viz.remote.graphics.events.RemoteGraphicsEventFactory;
import com.raytheon.uf.viz.remote.graphics.events.mesh.CloneMeshEvent;
/**
* Dispatching mesh object created from graphics mesh and forwards key events to
@ -37,9 +38,11 @@ import com.raytheon.uf.viz.remote.graphics.events.RemoteGraphicsEventFactory;
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 5, 2012 mschenke Initial creation
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Mar 05, 2012 mschenke Initial creation
* Feb 21, 2014 2817 bsteffen Fix clone.
*
*
* </pre>
*
@ -82,22 +85,18 @@ public class DispatchingMesh extends DispatchingObject<IMesh> implements IMesh {
return wrappedObject.intersects(extent);
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.viz.core.IMesh#reproject(org.geotools.coverage.grid.
* GeneralGridGeometry)
*/
@Override
public IMesh reproject(GeneralGridGeometry targetGeometry)
throws VizException {
return clone(targetGeometry);
}
@Override
public IMesh clone(GeneralGridGeometry targetGeometry) throws VizException {
return new DispatchingMesh(wrappedObject.clone(targetGeometry),
IMesh newMesh = wrappedObject.clone(targetGeometry);
DispatchingMesh newDispatchingMesh = new DispatchingMesh(newMesh,
getDispatcher());
// Send event to dispose mesh
CloneMeshEvent event = RemoteGraphicsEventFactory.createEvent(
CloneMeshEvent.class, newDispatchingMesh);
event.setTargetGeometry(targetGeometry);
event.setSourceObjectId(this.getObjectId());
dispatch(event);
return newDispatchingMesh;
}
}

View file

@ -2,37 +2,22 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: OpenGL Rendering Plug-in
Bundle-SymbolicName: com.raytheon.viz.core.gl;singleton:=true
Bundle-Version: 1.12.1174.qualifier
Bundle-Version: 1.14.0.qualifier
Bundle-Activator: com.raytheon.viz.core.gl.Activator
Bundle-Vendor: Raytheon
Eclipse-BuddyPolicy: ext, registered
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
javax.media.opengl;visibility:=reexport,
org.geotools,
javax.vecmath,
com.raytheon.uf.common.colormap;bundle-version="1.0.0",
com.raytheon.uf.viz.core,
com.raytheon.uf.common.util;bundle-version="1.0.0",
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
javax.measure;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.ui;bundle-version="3.8.0",
org.eclipse.core.runtime;bundle-version="3.8.0",
javax.media.opengl;visibility:=reexport,
com.raytheon.uf.common.colormap,
com.raytheon.uf.viz.core;bundle-version="1.14.1",
com.raytheon.uf.common.util,
com.raytheon.uf.common.geospatial,
javax.measure
Export-Package: com.raytheon.viz.core.gl,
com.raytheon.viz.core.gl.dataformat,
com.raytheon.viz.core.gl.ext,
com.raytheon.viz.core.gl.ext.imaging,
com.raytheon.viz.core.gl.glsl,
com.raytheon.viz.core.gl.images
Import-Package: com.raytheon.uf.common.status,
com.raytheon.uf.viz.core,
com.raytheon.uf.viz.core.data,
com.raytheon.uf.viz.core.data.resp,
com.raytheon.uf.viz.core.drawables,
com.raytheon.uf.viz.core.exception,
com.raytheon.uf.viz.core.geom,
com.raytheon.uf.viz.core.map,
com.raytheon.uf.viz.core.preferences,
com.raytheon.uf.viz.core.rsc,
com.raytheon.uf.viz.core.rsc.hdf5,
com.raytheon.uf.viz.core.status
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

View file

@ -51,9 +51,10 @@ import com.raytheon.viz.core.gl.SharedCoordMap.SharedCoordinates;
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 1, 2010 mschenke Initial creation
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Jul 01, 2010 mschenke Initial creation
* Feb 21, 2014 2817 bsteffen Remove Deprecated reproject.
*
* </pre>
*
@ -235,18 +236,6 @@ public abstract class AbstractGLMesh implements IMesh {
}
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.viz.core.IMesh#reproject(org.geotools.coverage.grid.
* GeneralGridGeometry)
*/
@Override
public final IMesh reproject(GeneralGridGeometry targetGeometry)
throws VizException {
return clone(targetGeometry);
}
private boolean calculateMesh() {
key = generateKey(imageGeometry, imageCRSToLatLon);
try {