From 6a55bc5dffdf1ae2c61f45abcb0ce13383840960 Mon Sep 17 00:00:00 2001 From: Steve Harris Date: Wed, 3 Apr 2013 18:05:39 -0400 Subject: [PATCH 1/2] 13.2.1-20 baseline Former-commit-id: 901c37ddfaeb0103160d0bbb2f1c2f623a16f73e --- .../data/IColorMapDataRetrievalCallback.java | 36 ++++ .../GLColorMapDataFormatFactory.java | 10 +- .../gl/ext/GLOffscreenRenderingExtension.java | 172 ++++++++---------- .../viz/core/gl/images/GLCMTextureData.java | 7 + .../core/gl/images/GLColormappedImage.java | 7 + .../gl/internal/ext/mosaic/GLMosaicImage.java | 7 + .../ext/mosaic/GLMosaicImageExtension.java | 46 ++++- .../RPGEnvironmentalDataManager.java | 51 +++++- .../EnvironParamsLevelTable.RUC40.xml | 73 ++++++++ rpms/build/i386/build.sh | 7 + 10 files changed, 313 insertions(+), 103 deletions(-) create mode 100644 edexOsgi/com.raytheon.edex.rpgenvdata/utility/edex_static/base/rpgenvdata/EnvironParamsLevelTable.RUC40.xml diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/data/IColorMapDataRetrievalCallback.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/data/IColorMapDataRetrievalCallback.java index 54f396ce24..52f383d074 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/data/IColorMapDataRetrievalCallback.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/data/IColorMapDataRetrievalCallback.java @@ -40,6 +40,8 @@ import com.raytheon.uf.viz.core.exception.VizException; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Nov 17, 2011 mschenke Initial creation + * Mar 21, 2013 1806 bsteffen Add ColorMapData constructor that + * creates buffer from the dataType. * * * @@ -81,6 +83,16 @@ public interface IColorMapDataRetrievalCallback { this.dataType = dataType; } + /** + * @param dataType + * @param dataBounds + */ + public ColorMapData(ColorMapDataType dataType, int[] dimensions) { + this.buffer = getBuffer(dataType, dimensions); + this.dimensions = dimensions; + this.dataType = dataType; + } + public Buffer getBuffer() { return buffer; } @@ -106,6 +118,30 @@ public interface IColorMapDataRetrievalCallback { throw new RuntimeException("Could not find ColorMapDataType for " + buffer); } + + private static Buffer getBuffer(ColorMapDataType dataType, + int[] dimensions) { + int size = 1; + for (int i : dimensions) { + size *= i; + } + switch (dataType) { + case BYTE: + case SIGNED_BYTE: + return ByteBuffer.allocate(size); + case SHORT: + case UNSIGNED_SHORT: + return ShortBuffer.allocate(size); + case FLOAT: + return FloatBuffer.allocate(size); + case INT: + return IntBuffer.allocate(size); + default: + throw new RuntimeException("Could not find Buffer for " + + dataType); + } + + } } /** diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/dataformat/GLColorMapDataFormatFactory.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/dataformat/GLColorMapDataFormatFactory.java index c3c1336a97..44dadd4610 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/dataformat/GLColorMapDataFormatFactory.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/dataformat/GLColorMapDataFormatFactory.java @@ -20,6 +20,7 @@ package com.raytheon.viz.core.gl.dataformat; import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapData; +import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapDataType; /** * Factory class for getting GLColorMapDataFormat objects given the ColorMapData @@ -32,6 +33,8 @@ import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapData * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Nov 21, 2011 mschenke Initial creation + * Mar 21, 2013 1806 bsteffen Update GL mosaicing to use dynamic data + * format for offscreen textures. * * * @@ -43,8 +46,13 @@ public class GLColorMapDataFormatFactory { public static AbstractGLColorMapDataFormat getGLColorMapDataFormat( ColorMapData colorMapData) { + return getGLColorMapDataFormat(colorMapData.getDataType()); + } + + public static AbstractGLColorMapDataFormat getGLColorMapDataFormat( + ColorMapDataType colorMapDataType) { AbstractGLColorMapDataFormat dataFormat = null; - switch (colorMapData.getDataType()) { + switch (colorMapDataType) { case BYTE: { dataFormat = new GLByteDataFormat(); break; diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java index f8fc9d01f4..532048f74a 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java @@ -31,6 +31,7 @@ import javax.media.opengl.GL; import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.IView; import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback; +import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapDataType; import com.raytheon.uf.viz.core.data.IRenderedImageCallback; import com.raytheon.uf.viz.core.drawables.ColorMapParameters; import com.raytheon.uf.viz.core.drawables.IImage; @@ -40,6 +41,7 @@ import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.viz.core.gl.IGLTarget; import com.raytheon.viz.core.gl.dataformat.AbstractGLColorMapDataFormat; import com.raytheon.viz.core.gl.dataformat.GLByteDataFormat; +import com.raytheon.viz.core.gl.dataformat.GLColorMapDataFormatFactory; import com.raytheon.viz.core.gl.dataformat.IGLColorMapDataFormatProvider; import com.raytheon.viz.core.gl.images.AbstractGLImage; import com.raytheon.viz.core.gl.images.GLColormappedImage; @@ -60,6 +62,8 @@ import com.raytheon.viz.core.gl.internal.ext.GLColormappedImageExtension; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jul 10, 2012 bsteffen Initial creation + * Mar 21, 2013 1806 bsteffen Update GL mosaicing to use dynamic data + * format for offscreen textures. * * * @@ -174,51 +178,37 @@ public class GLOffscreenRenderingExtension extends GraphicsExtension } public GLColormappedImage constructOffscreenImage( - Class dataType, int[] dimensions) - throws VizException { + ColorMapDataType dataType, int[] dimensions) throws VizException { return constructOffscreenImage(dataType, dimensions, null); } public GLColormappedImage constructOffscreenImage( - Class dataType, final int[] dimensions, + final ColorMapDataType dataType, final int[] dimensions, ColorMapParameters parameters) throws VizException { - int width = dimensions[0]; - int height = dimensions[1]; - // Need to add support for multiple buffer types - Buffer imageBuffer = null; - if (dataType.isAssignableFrom(ByteBuffer.class)) { - int pixels = 3; - if (supportsLuminance) { - pixels = 1; - } - byte[] buf = new byte[width * height * pixels]; - imageBuffer = ByteBuffer.wrap(buf); - } + GLColormappedImageExtension cmapExt = target + .getExtension(GLColormappedImageExtension.class); + if (!supportsLuminance) { + return cmapExt.initializeRaster(new NoLuminanceDataCallback( + dimensions, dataType), parameters); + } else { + GLColormappedImage image = cmapExt.initializeRaster( + new IColorMapDataRetrievalCallback() { - if (imageBuffer != null) { - GLColormappedImage image = null; - final Buffer buffer = imageBuffer; - GLColormappedImageExtension cmapExt = target - .getExtension(GLColormappedImageExtension.class); - if (supportsLuminance) { - image = cmapExt.initializeRaster( - new IColorMapDataRetrievalCallback() { - - @Override - public ColorMapData getColorMapData() - throws VizException { - return new ColorMapData(buffer, dimensions); - } - }, parameters); - } else { - image = cmapExt.initializeRaster(new GLOffscreenDataCallback( - buffer, dimensions), parameters); - } + @Override + public ColorMapData getColorMapData() + throws VizException { + return new ColorMapData(dataType, dimensions); + } + }, parameters); if (!checkedLuminance) { checkedLuminance = true; try { renderOffscreen(image); } catch (VizException e) { + // Log this so it is easy to see in the console logs. + new VizException( + "Graphics card does not support luminance textures.", + e).printStackTrace(System.out); // assume we don't support luminance supportsLuminance = false; // Reconstruct image @@ -229,84 +219,76 @@ public class GLOffscreenRenderingExtension extends GraphicsExtension } } return image; - } else { - return null; } } - private static final class GLOffscreenDataCallback implements - IColorMapDataRetrievalCallback, IGLColorMapDataFormatProvider { + private static final class NoLuminanceDataFormat extends GLByteDataFormat { - private Buffer dataBuffer; + // Used to get the original min/max which makes signed bytes work and + // theoretically will give better looking results for other integer data + // types. + private final ColorMapDataType originalType; + + private NoLuminanceDataFormat(ColorMapDataType originalType) { + this.originalType = originalType; + } + + @Override + public int getTextureInternalFormat() { + return GL.GL_RGB8; + } + + @Override + public int getTextureFormat() { + return GL.GL_RGB; + } + + @Override + public int getValuesPerPixel() { + return 3; + } + + @Override + public double getDataFormatMin() { + return getOriginalGLColorMapDataFormat().getDataFormatMin(); + } + + @Override + public double getDataFormatMax() { + return getOriginalGLColorMapDataFormat().getDataFormatMax(); + } + + private AbstractGLColorMapDataFormat getOriginalGLColorMapDataFormat() { + return GLColorMapDataFormatFactory + .getGLColorMapDataFormat(originalType); + } + + } + + private static final class NoLuminanceDataCallback implements + IColorMapDataRetrievalCallback, IGLColorMapDataFormatProvider { private int[] dimensions; - private GLOffscreenDataCallback(Buffer dataBuffer, int[] dimensions) { - this.dataBuffer = dataBuffer; + private final ColorMapDataType originalType; + + private NoLuminanceDataCallback(int[] dimensions, + ColorMapDataType type) { this.dimensions = dimensions; + this.originalType = type; } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.viz.core.gl.dataprep.IGLColorMapDataRetrievalCallback - * #getGLColorMapData - * (com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback - * .ColorMapData) - */ @Override public AbstractGLColorMapDataFormat getGLColorMapDataFormat( ColorMapData colorMapData) { - return new GLByteDataFormat() { - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.gl.dataprep.GLByteDataFormat# - * getTextureInternalFormat() - */ - @Override - public int getTextureInternalFormat() { - return GL.GL_RGB8; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.viz.core.gl.dataprep.AbstractGLColorMapDataFormat - * #getTextureFormat() - */ - @Override - public int getTextureFormat() { - return GL.GL_RGB; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.viz.core.gl.dataprep.AbstractGLColorMapDataFormat - * #getPointsPerPixel() - */ - @Override - public int getValuesPerPixel() { - return 3; - } - - }; + return new NoLuminanceDataFormat(originalType); } - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback# - * getColorMapData() - */ @Override public ColorMapData getColorMapData() throws VizException { - return new ColorMapData(dataBuffer, dimensions); + Buffer buffer = ByteBuffer.allocate(dimensions[0] * dimensions[1] + * 3); + return new ColorMapData(buffer, dimensions, originalType); } } diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLCMTextureData.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLCMTextureData.java index ff40878ddf..9a29914db3 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLCMTextureData.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLCMTextureData.java @@ -28,6 +28,7 @@ import javax.media.opengl.glu.GLU; import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback; import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapData; +import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapDataType; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.viz.core.gl.GLContextBridge; import com.raytheon.viz.core.gl.dataformat.GLColorMapData; @@ -49,6 +50,8 @@ import com.raytheon.viz.core.gl.objects.GLTextureObject; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Aug 2, 2011 bsteffen Initial creation + * Mar 21, 2013 1806 bsteffen Update GL mosaicing to use dynamic data + * format for offscreen textures. * * * @@ -271,4 +274,8 @@ public class GLCMTextureData implements IImageCacheable { return 0; } + public ColorMapDataType getColorMapDataType() { + return data.getDataType(); + } + } diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLColormappedImage.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLColormappedImage.java index ceea37b2ef..48cfaa71b1 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLColormappedImage.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLColormappedImage.java @@ -22,6 +22,7 @@ package com.raytheon.viz.core.gl.images; import javax.media.opengl.GL; import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback; +import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapDataType; import com.raytheon.uf.viz.core.drawables.ColorMapParameters; import com.raytheon.uf.viz.core.drawables.IColormappedImage; import com.raytheon.uf.viz.core.drawables.ext.IImagingExtension; @@ -39,6 +40,8 @@ import com.sun.opengl.util.texture.TextureCoords; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jul 27, 2009 mschenke Initial creation + * Mar 21, 2013 1806 bsteffen Update GL mosaicing to use dynamic data + * format for offscreen textures. * * * @@ -109,6 +112,10 @@ public class GLColormappedImage extends AbstractGLImage implements return data.getTextureType(); } + public ColorMapDataType getColorMapDataType() { + return data.getColorMapDataType(); + } + /** * Return the texture's format * diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImage.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImage.java index 66fac03819..083f56f203 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImage.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImage.java @@ -38,6 +38,8 @@ import com.raytheon.viz.core.gl.images.GLDelegateImage; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Dec 16, 2011 mschenke Initial creation + * Mar 21, 2013 1806 bsteffen Update GL mosaicing to use dynamic data + * format for offscreen textures. * * * @@ -165,4 +167,9 @@ public class GLMosaicImage extends GLDelegateImage return image.getValue(x, y); } + public void setWrappedImage(GLColormappedImage wrappedImage) { + this.image.dispose(); + this.image = wrappedImage; + } + } diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImageExtension.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImageExtension.java index 3fc6724494..94a71a4153 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImageExtension.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/ext/mosaic/GLMosaicImageExtension.java @@ -19,15 +19,15 @@ **/ package com.raytheon.viz.core.gl.internal.ext.mosaic; -import java.nio.ByteBuffer; - import javax.media.opengl.GL; import com.raytheon.uf.viz.core.DrawableImage; import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.PixelCoverage; +import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapDataType; import com.raytheon.uf.viz.core.drawables.ColorMapParameters; import com.raytheon.uf.viz.core.drawables.IImage; +import com.raytheon.uf.viz.core.drawables.IImage.Status; import com.raytheon.uf.viz.core.drawables.ImagingSupport; import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.drawables.ext.IMosaicImageExtension; @@ -36,6 +36,7 @@ import com.raytheon.viz.core.gl.ext.GLOffscreenRenderingExtension; import com.raytheon.viz.core.gl.glsl.AbstractGLSLImagingExtension; import com.raytheon.viz.core.gl.glsl.GLShaderProgram; import com.raytheon.viz.core.gl.images.AbstractGLImage; +import com.raytheon.viz.core.gl.images.GLColormappedImage; /** * Extension used for rendering radar mosaic images @@ -47,6 +48,8 @@ import com.raytheon.viz.core.gl.images.AbstractGLImage; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Dec 16, 2011 mschenke Initial creation + * Mar 21, 2013 1806 bsteffen Update GL mosaicing to use dynamic data + * format for offscreen textures. * * * @@ -57,13 +60,14 @@ import com.raytheon.viz.core.gl.images.AbstractGLImage; public class GLMosaicImageExtension extends AbstractGLSLImagingExtension implements IMosaicImageExtension { - private AbstractGLImage writeToImage; + private GLColormappedImage writeToImage; public GLMosaicImage initializeRaster(int[] imageBounds, IExtent imageExtent, ColorMapParameters params) throws VizException { + // Since byte is the most common type of mosaic start with a byte image. It might switch later if needed. return new GLMosaicImage(target.getExtension( GLOffscreenRenderingExtension.class).constructOffscreenImage( - ByteBuffer.class, imageBounds, params), imageBounds, + ColorMapDataType.BYTE, imageBounds, params), imageBounds, imageExtent, this.getClass()); } @@ -93,7 +97,7 @@ public class GLMosaicImageExtension extends AbstractGLSLImagingExtension if (image instanceof GLMosaicImage) { GLMosaicImage mosaicImage = (GLMosaicImage) image; if (mosaicImage.isRepaint()) { - writeToImage = mosaicImage.getWrappedImage(); + writeToImage = getWriteToImage(mosaicImage); GLOffscreenRenderingExtension extension = target .getExtension(GLOffscreenRenderingExtension.class); try { @@ -134,6 +138,38 @@ public class GLMosaicImageExtension extends AbstractGLSLImagingExtension } } + private GLColormappedImage getWriteToImage(GLMosaicImage mosaicImage) + throws VizException { + ColorMapDataType neededType = null; + for (DrawableImage di : mosaicImage.getImagesToMosaic()) { + IImage image = di.getImage(); + if (image.getStatus() != Status.LOADED) { + continue; + } + if (image instanceof GLColormappedImage) { + GLColormappedImage colorMapImage = (GLColormappedImage) image; + ColorMapDataType type = colorMapImage.getColorMapDataType(); + if (neededType == null) { + neededType = type; + } else if (neededType != type) { + // Mosaicing images of different types? + // No Idea how to handle this + return mosaicImage.getWrappedImage(); + } + } + } + GLColormappedImage writeTo = mosaicImage.getWrappedImage(); + if (neededType != null && neededType != writeTo.getColorMapDataType()) { + GLOffscreenRenderingExtension offscreenExt = target + .getExtension(GLOffscreenRenderingExtension.class); + int[] dimensions = { writeTo.getWidth(), writeTo.getHeight() }; + writeTo = offscreenExt.constructOffscreenImage(neededType, + dimensions, writeTo.getColorMapParameters()); + mosaicImage.setWrappedImage(writeTo); + } + return writeTo; + } + /* * (non-Javadoc) * diff --git a/edexOsgi/com.raytheon.edex.rpgenvdata/src/com/raytheon/edex/rpgenvdata/RPGEnvironmentalDataManager.java b/edexOsgi/com.raytheon.edex.rpgenvdata/src/com/raytheon/edex/rpgenvdata/RPGEnvironmentalDataManager.java index b20a1171e5..5405dcbf7a 100644 --- a/edexOsgi/com.raytheon.edex.rpgenvdata/src/com/raytheon/edex/rpgenvdata/RPGEnvironmentalDataManager.java +++ b/edexOsgi/com.raytheon.edex.rpgenvdata/src/com/raytheon/edex/rpgenvdata/RPGEnvironmentalDataManager.java @@ -94,8 +94,8 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery; * ?? ?? Initial Creation * 1-3-2013 DR 15667 M.Porricelli Made EnvironParamsLevelTable.xml * accessible from SITE level -* 03/21/2013 DR 15872 D. Friedman Correct clipped grid coordinates. (From DR 14770.) -* Correct grid orientation. +* 04/02/2013 DR 15872 D. Friedman Correct clipped grid coordinates. (From DR 14770.) +* Correct grid orientation. Ensure square grid. **/ public class RPGEnvironmentalDataManager { private static final transient IUFStatusHandler statusHandler = UFStatus @@ -119,6 +119,8 @@ public class RPGEnvironmentalDataManager { private boolean compressionEnabled = true; + private boolean squareGrid = true; + public RPGEnvironmentalDataManager() { try { initialize(); @@ -599,6 +601,43 @@ public class RPGEnvironmentalDataManager { i2 = (int) Math.round(c.x); j2 = maxY - (int) Math.round(c.y); + if (squareGrid) { + /* + * ORPG may have a problem with non-square grids. This will be + * fixed in a later release of the ORPG software. For now, + * ensure the output is square. + */ + + /* + * Try to expand one edge if needed so as to not go out of + * bounds. If that fails, try shrinking one edge. + */ + int outputSpan = Math.max(i2 - i1, j2 - j1); + boolean solved = false; + for (int nTries = 0; !solved && nTries < 2; ++nTries) { + solved = false; + if (i2 - i1 != outputSpan) { + if (i1 + outputSpan <= ge.getHigh(0)) { + i2 = i1 + outputSpan; + solved = true; + } else if (i2 - outputSpan >= ge.getLow(0)) { + i1 = i2 - outputSpan; + solved = true; + } + } else if (j2 - j1 != outputSpan) { + if (j1 + outputSpan <= ge.getHigh(1)) { + j2 = j1 + outputSpan; + solved = true; + } else if (j2 - outputSpan >= ge.getLow(1)) { + j1 = j2 - outputSpan; + solved = true; + } + } else + solved = true; + outputSpan = Math.min(i2 - i1, j2 - j1); + } + } + if (i1 < ge.getLow(0) || i2 > ge.getHigh(0) || j1 < ge.getLow(1) || j2 > ge.getHigh(1)) { throw new GeoInfoException( @@ -1134,6 +1173,14 @@ public class RPGEnvironmentalDataManager { this.compressionEnabled = compressionEnabled; } + public boolean isSquareGrid() { + return squareGrid; + } + + public void setSquareGrid(boolean squareGrid) { + this.squareGrid = squareGrid; + } + public String getMessages() { return logMessages.toString(); } diff --git a/edexOsgi/com.raytheon.edex.rpgenvdata/utility/edex_static/base/rpgenvdata/EnvironParamsLevelTable.RUC40.xml b/edexOsgi/com.raytheon.edex.rpgenvdata/utility/edex_static/base/rpgenvdata/EnvironParamsLevelTable.RUC40.xml new file mode 100644 index 0000000000..f7f6b05220 --- /dev/null +++ b/edexOsgi/com.raytheon.edex.rpgenvdata/utility/edex_static/base/rpgenvdata/EnvironParamsLevelTable.RUC40.xml @@ -0,0 +1,73 @@ + + + + + + + + + 3600 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rpms/build/i386/build.sh b/rpms/build/i386/build.sh index 83b6b19382..bf822a8bd2 100644 --- a/rpms/build/i386/build.sh +++ b/rpms/build/i386/build.sh @@ -316,6 +316,13 @@ if [ "${1}" = "-ade" ]; then exit 1 fi + # Build the source jar file + ade_work_dir="/home/dmsys/Dim12/build/AWIPS2/AWIPS2-ADE-OB13.2.1-CM" + cd $ade_work_dir + ./build_source_jar.sh + cp -v /tmp/awips-component/tmp/awips2-ade-baseline-SOURCES.jar ${WORKSPACE}/${ade_directory} + + # Tar the directory. pushd . > /dev/null 2>&1 cd ${WORKSPACE} From d4358b93dc7e1b099de33bc20606e1f99d8ba018 Mon Sep 17 00:00:00 2001 From: Steve Harris Date: Wed, 3 Apr 2013 18:08:41 -0400 Subject: [PATCH 2/2] 13.2.1-21 baseline Former-commit-id: f80eddbb15e5ca1710c15d245957345d6f840546 --- .../src/com/raytheon/viz/warngen/gui/WarngenLayer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java index 4bfdc3ab59..0a1a49ee97 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java @@ -1995,6 +1995,10 @@ public class WarngenLayer extends AbstractStormTrackResource { int day = warnRecord.getIssueTime().get(Calendar.DAY_OF_MONTH); int hour = Integer.parseInt(m.group(1)); int minute = Integer.parseInt(m.group(2)); + // Handles when a warning is created before 0Z but issued after 0Z + if (hour > warnRecord.getIssueTime().get(Calendar.HOUR_OF_DAY)) { + day -= 1; + } frameTime = Calendar.getInstance(TimeZone.getTimeZone("GMT")); frameTime.set(Calendar.DAY_OF_MONTH, day); frameTime.set(Calendar.HOUR_OF_DAY, hour);