Issue #2689 - Add input values to log statement on LL to HRAP conversion failure.

Fix error in HRAP overlay resource.

Change-Id: If6fcb23a839323e4541e8ff28c0d702bf3066273

Former-commit-id: 5f1f931c64 [formerly d5c3ddcef8 [formerly be9cf109b1] [formerly 5f1f931c64 [formerly ee88ab32961525d74a227cccec615c0610dc9525]]]
Former-commit-id: d5c3ddcef8 [formerly be9cf109b1]
Former-commit-id: d5c3ddcef8
Former-commit-id: 43f7e3307a
This commit is contained in:
Mike Duff 2014-03-31 11:35:06 -05:00
parent 5eb3a137a3
commit 96f9193dc3
2 changed files with 9 additions and 6 deletions

View file

@ -48,6 +48,7 @@ import com.raytheon.uf.viz.core.rsc.capabilities.OutlineCapability;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 20, 2010 1783 mpduff Initial creation.
* Mar 31, 2014 2689 mpduff Fixed error introduced during a previous code change.
*
* </pre>
*
@ -101,7 +102,7 @@ public class HRAPOverlayResource extends
}
for (int y = 0; y < height; ++y) {
double[][] line = new double[height][];
double[][] line = new double[width][];
for (int x = 0; x < width; ++x) {
double[] out = new double[2];
mt.transform(new double[] { minX + x, minY + y }, 0, out,

View file

@ -49,6 +49,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 16, 2008 randerso Initial creation
* Mar 31, 2014 2689 mpduff Log input values on conversion failure.
* </pre>
*
* @author randerso
@ -91,13 +92,13 @@ public class HRAP {
private String projectionID;
private Coordinate latLonUL;
private final Coordinate latLonUL;
private Coordinate latLonUR;
private Coordinate latLonLL;
private Coordinate latLonLR;
private final Coordinate latLonLR;
private Coordinate latLonOrigin;
@ -117,9 +118,9 @@ public class HRAP {
private CoordinateReferenceSystem crs;
private Map<PixelOrientation, MathTransform> toLatLonMap;
private final Map<PixelOrientation, MathTransform> toLatLonMap;
private Map<PixelOrientation, MathTransform> fromLatLonMap;
private final Map<PixelOrientation, MathTransform> fromLatLonMap;
private GridToEnvelopeMapper gridMapper;
@ -426,7 +427,8 @@ public class HRAP {
JTS.transform(latLon, gridCell, getTransformFromLatLon(orientation));
} catch (TransformException e) {
throw new Exception(
"Error creating transform from Lat/Lon to HRAP", e);
"Error creating transform from Lat/Lon to HRAP. Input: x ["
+ latLon.x + "], y [" + latLon.y + "]", e);
}
return gridCell;
}