From 9b35518fe5c7330075e28b948b6b0dde8a19c8e4 Mon Sep 17 00:00:00 2001 From: Ron Anderson Date: Tue, 14 Aug 2012 16:19:52 -0500 Subject: [PATCH] Issue #1052 Fixed GridLocaton.gridCell to return Point instead of Coordinate. Change-Id: I1bbf11738ec0595d42d88423bb9b6ef9d42468e2 Former-commit-id: 81abb2c60b8c8e2469fbd617796d426fe02e7d21 [formerly 17f636c2a2065faf37e160e37171dbc0df8577df [formerly 373ac200fcd1c9a39244a2775d95c7b891334632]] Former-commit-id: 17f636c2a2065faf37e160e37171dbc0df8577df Former-commit-id: bac68cc1defad4ef3e1e29211ea4dced23c03d56 --- .../dataplugin/gfe/db/objects/GridLocation.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GridLocation.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GridLocation.java index c23cb0ffaf..6e5b45c254 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GridLocation.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GridLocation.java @@ -524,17 +524,13 @@ public class GridLocation extends PersistableDataObject implements return ref.getGrid(); } - public Coordinate gridCell(float lat, float lon) { - return gridCell(new Coordinate(lon, lat)); - } - - public Coordinate gridCell(Coordinate coord) { - return MapUtil.latLonToGridCoordinate(coord, PixelOrientation.CENTER, - this); + public Point gridCell(float lat, float lon) { + return gridCoordinate(new Coordinate(lon, lat)); } public Point gridCoordinate(Coordinate lonLat) { - Coordinate gcf = gridCell(lonLat); + Coordinate gcf = MapUtil.latLonToGridCoordinate(lonLat, + PixelOrientation.CENTER, this); int x = (int) (gcf.x > -0.5 ? gcf.x + 0.5 : gcf.x - 0.5); int y = (int) (gcf.y > -0.5 ? gcf.y + 0.5 : gcf.y - 0.5); return new Point(x, y);