diff --git a/deltaScripts/goesr_deploy/convertSatURIs.py b/deltaScripts/goesr_deploy/convertSatURIs.py index ac6a6a79ac..0adc3fbf67 100644 --- a/deltaScripts/goesr_deploy/convertSatURIs.py +++ b/deltaScripts/goesr_deploy/convertSatURIs.py @@ -111,19 +111,20 @@ def process_all_satellite(): f[newds] = h5py.SoftLink(oldds) group = f[row[DATAURI_IDX] + "/Data-interpolated"] - numLevels = 1 + numLevels = 0 for n in group.keys(): - numLevels += 1 newds = newGroupName + "/Data-interpolated/" + n if (n == '0'): # special case for this link. # dataset /Data-interpolated/0 points to /Data + # Don't count this link! oldds = row[DATAURI_IDX] + "/Data" else: oldds = row[DATAURI_IDX] + "/Data-interpolated/" + n + # Only count interpolated levels! + numLevels += 1 f[newds] = h5py.SoftLink(oldds) # now back up one for the Data,Data-interpolated/0 link - numLevels -= 1 updateSql = "update satellite set datauri='" + row[DATAURI_IDX] + "/" + row[COVERAGE_IDX] + "'" updateSql += ", interpolationlevels=" + repr(numLevels) updateSql += " where id=" + row[0] + ";" diff --git a/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/plugin/satellite/dao/SatelliteDao.java b/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/plugin/satellite/dao/SatelliteDao.java index a0d46e19de..477ee69b7d 100644 --- a/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/plugin/satellite/dao/SatelliteDao.java +++ b/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/plugin/satellite/dao/SatelliteDao.java @@ -152,10 +152,10 @@ public class SatelliteDao extends PluginDao { storageRecord, fillValue); // How many interpolation levels do we need for this data? - // Subtract one for the base level data. - int levels = downScaler.getNumberOfDownscaleLevels() - 1; + int levels = downScaler.getNumberOfDownscaleLevels(); // set the number of levels in the 'parent' satellite data. - satRecord.setInterpolationLevels(levels); + // Subtract one for the base level data. + satRecord.setInterpolationLevels(levels - 1); if (DataStoreFactory.isInterpolated(levels)) { for (int downscaleLevel = 1; downscaleLevel <= levels; downscaleLevel++) { Rectangle size = downScaler diff --git a/edexOsgi/com.raytheon.uf.common.datastorage/src/com/raytheon/uf/common/datastorage/DataStoreFactory.java b/edexOsgi/com.raytheon.uf.common.datastorage/src/com/raytheon/uf/common/datastorage/DataStoreFactory.java index 8f4021cbf3..0ae50bef8f 100644 --- a/edexOsgi/com.raytheon.uf.common.datastorage/src/com/raytheon/uf/common/datastorage/DataStoreFactory.java +++ b/edexOsgi/com.raytheon.uf.common.datastorage/src/com/raytheon/uf/common/datastorage/DataStoreFactory.java @@ -341,7 +341,7 @@ public class DataStoreFactory { */ public static String createGroupName(String groupName, String baseDataSet, boolean interpolated) { - StringBuilder interpolatedGroup = new StringBuilder(); + StringBuilder interpolatedGroup = new StringBuilder(256); if (groupName != null) { interpolatedGroup.append(groupName); }