Issue #2762 Use UCUM to format units so IRPixel formats correctly.

Former-commit-id: f7c48b24bb [formerly 9e5f7d90a0] [formerly f7c48b24bb [formerly 9e5f7d90a0] [formerly f8cc0e3d95 [formerly b5949935eaa071ec2a56c48f32fbc3a4714d2056]]]
Former-commit-id: f8cc0e3d95
Former-commit-id: 3c7e578000 [formerly a510abdb22]
Former-commit-id: 358e7d3b1d
This commit is contained in:
Ben Steffensmeier 2014-02-24 10:25:19 -06:00
parent d69ac764db
commit 831bb0b021

View file

@ -19,6 +19,8 @@
**/
package com.raytheon.uf.common.dataaccess.response;
import javax.measure.unit.UnitFormat;
import com.raytheon.uf.common.dataaccess.grid.IGridData;
import com.raytheon.uf.common.geospatial.interpolation.data.FloatArrayWrapper;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@ -31,9 +33,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 4, 2013 dgilling Initial creation
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Jun 04, 2013 dgilling Initial creation
* Feb 24, 2014 2762 bsteffen Format units with UCUM
*
*
* </pre>
*
@ -62,7 +66,7 @@ public class GridResponseData extends AbstractResponseData {
parameter = data.getParameter();
if (data.getUnit() != null) {
unit = data.getUnit().toString();
unit = UnitFormat.getUCUMInstance().format(data.getUnit());
}
FloatArrayWrapper dataGrid = new FloatArrayWrapper(
data.getGridGeometry());