예제 #1
0
    private void syncLatLonWithXYParams() {
      final PixelPos pixelPos1 =
          new PixelPos(
              ((Number) paramX1.getValue()).intValue(), ((Number) paramY1.getValue()).intValue());
      final PixelPos pixelPos2 =
          new PixelPos(
              ((Number) paramX2.getValue()).intValue(), ((Number) paramY2.getValue()).intValue());

      final GeoCoding geoCoding = product.getGeoCoding();
      final GeoPos geoPos1 = geoCoding.getGeoPos(pixelPos1, null);
      final GeoPos geoPos2 = geoCoding.getGeoPos(pixelPos2, null);
      paramNorthLat1.setValue(geoPos1.getLat(), null);
      paramWestLon1.setValue(geoPos1.getLon(), null);
      paramSouthLat2.setValue(geoPos2.getLat(), null);
      paramEastLon2.setValue(geoPos2.getLon(), null);
    }