From 312246f60aed633688bf346192dffb0d408346ba Mon Sep 17 00:00:00 2001 From: Dave Hladky Date: Thu, 17 Jul 2014 13:29:20 -0500 Subject: [PATCH] Omaha #3403 Changed BoundingBoxUtil to accomodate CSW updates for PDA Change-Id: Ia26235017d4f6c860a49e40eae210a94e9385c97 Former-commit-id: b91bc9cebc631ab14d13e3ae98a98ef51448ab7e --- .../feature.xml | 40 ++++++++++--------- .../feature.xml | 6 +++ .../ogc/common/spatial/BoundingBoxUtil.java | 23 ++++++++++- .../META-INF/MANIFEST.MF | 3 +- 4 files changed, 52 insertions(+), 20 deletions(-) diff --git a/cave/com.raytheon.viz.feature.awips.developer/feature.xml b/cave/com.raytheon.viz.feature.awips.developer/feature.xml index df253fa979..aef934a5b0 100644 --- a/cave/com.raytheon.viz.feature.awips.developer/feature.xml +++ b/cave/com.raytheon.viz.feature.awips.developer/feature.xml @@ -28,7 +28,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -88,19 +88,19 @@ - + - + - + - + @@ -108,31 +108,31 @@ - + - + - + - + - + - + - + @@ -140,7 +140,7 @@ - + @@ -148,11 +148,11 @@ - + - + @@ -176,10 +176,14 @@ - + + version="0.0.0"/> + + diff --git a/edexOsgi/com.raytheon.uf.edex.cots.feature/feature.xml b/edexOsgi/com.raytheon.uf.edex.cots.feature/feature.xml index c2f70ce879..778e02e080 100644 --- a/edexOsgi/com.raytheon.uf.edex.cots.feature/feature.xml +++ b/edexOsgi/com.raytheon.uf.edex.cots.feature/feature.xml @@ -162,4 +162,10 @@ install-size="0" version="0.0.0"/> + + diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/BoundingBoxUtil.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/BoundingBoxUtil.java index 8ad6ce851c..5587584d67 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/BoundingBoxUtil.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/BoundingBoxUtil.java @@ -417,7 +417,7 @@ public class BoundingBoxUtil { * @return * @throws OgcException */ - public static ReferencedEnvelope convert2D(BoundingBoxType bbox2d) + public static ReferencedEnvelope convert2D(net.opengis.ows.v_1_1_0.BoundingBoxType bbox2d) throws OgcException { List lc = bbox2d.getLowerCorner(); List uc = bbox2d.getUpperCorner(); @@ -433,6 +433,27 @@ public class BoundingBoxUtil { DirectPosition max = convert(uc); return convert2D(min, max, bbox2d.getCrs()); } + + /** + * Convert 2d jaxb bounding box to JTS envelope + * + * @param bbox2d + * @return + * @throws OgcException + */ + public static ReferencedEnvelope convert2D(net.opengis.ows.v_1_0_0.BoundingBoxType bbox2d) + throws OgcException { + List lc = bbox2d.getLowerCorner(); + List uc = bbox2d.getUpperCorner(); + if (lc.size() != 2 || uc.size() != 2) { + throw new OgcException(Code.InvalidParameterValue, + "2D bounding box must have 2 dimensions"); + } + DirectPosition min = convert(lc); + DirectPosition max = convert(uc); + return convert2D(min, max, bbox2d.getCrs()); + } + /** * Determine altitude reference of vertical axis diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/META-INF/MANIFEST.MF index 9cac8276f5..6d8b0578bc 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/META-INF/MANIFEST.MF @@ -37,7 +37,8 @@ Require-Bundle: com.raytheon.uf.common.registry.schemas.ebxml;bundle-version="1. com.raytheon.uf.edex.security;bundle-version="1.14.0", org.opensaml;bundle-version="1.0.0", com.raytheon.uf.common.security;bundle-version="1.14.0", - org.joda.time;bundle-version="1.6.2" + org.joda.time;bundle-version="1.6.2", + com.raytheon.uf.common.geospatial;bundle-version="1.14.2" Export-Package: com.raytheon.uf.edex.registry.ebxml, com.raytheon.uf.edex.registry.ebxml.acp, com.raytheon.uf.edex.registry.ebxml.dao,