Class CoordinateConverter

java.lang.Object
org.codice.alliance.imaging.chip.service.impl.CoordinateConverter

public class CoordinateConverter extends Object
Converts lat/lon points to pixels and vice-versa.
  • Constructor Details

    • CoordinateConverter

      public CoordinateConverter(BufferedImage image, List<org.la4j.Vector> boundary)
      Parameters:
      image - the input image that the basis will be calcluated for.
      boundary - a List of vectors that represent the Lat/Lon of the image.
    • CoordinateConverter

      public CoordinateConverter(int width, int height, List<org.la4j.Vector> boundary)
  • Method Details

    • toPixels

      public List<org.la4j.Vector> toPixels(List<org.la4j.Vector> lonLats)
      Parameters:
      lonLats - the area within in the image to be converted to pixel.
      Returns:
      a Vector containing the pixel-equivalent of the area described by lonLats.
    • toLonLat

      public List<org.la4j.Vector> toLonLat(List<org.la4j.Vector> pixels)
      Parameters:
      pixels - the area withing the image to be converted to lat/lon.
      Returns:
      a Vector containing the latlon-equivalent of the area described by pixels.