/**
   * Returns a geographic Sector which bounds the specified UTM rectangle. The UTM rectangle is
   * located in specified UTM zone and hemisphere.
   *
   * @param zone the UTM zone.
   * @param hemisphere the UTM hemisphere, either {@link gov.nasa.worldwind.avlist.AVKey#NORTH} or
   *     {@link gov.nasa.worldwind.avlist.AVKey#SOUTH}.
   * @param minEasting the minimum UTM easting, in meters.
   * @param maxEasting the maximum UTM easting, in meters.
   * @param minNorthing the minimum UTM northing, in meters.
   * @param maxNorthing the maximum UTM northing, in meters.
   * @return a Sector that bounds the specified UTM rectangle.
   * @throws IllegalArgumentException if <code>zone</code> is outside the range 1-60, if <code>
   *     hemisphere</code> is null, or if <code>hemisphere</code> is not one of {@link
   *     gov.nasa.worldwind.avlist.AVKey#NORTH} or {@link gov.nasa.worldwind.avlist.AVKey#SOUTH}.
   */
  public static Sector fromUTMRectangle(
      int zone,
      String hemisphere,
      double minEasting,
      double maxEasting,
      double minNorthing,
      double maxNorthing) {
    if (zone < 1 || zone > 60) {
      throw new IllegalArgumentException("ZoneIsInvalid");
    }

    if (!AVKey.NORTH.equals(hemisphere) && !AVKey.SOUTH.equals(hemisphere)) {
      throw new IllegalArgumentException("HemisphereIsInvalid");
    }

    LatLon ll = UTMCoord.locationFromUTMCoord(zone, hemisphere, minEasting, minNorthing);
    LatLon lr = UTMCoord.locationFromUTMCoord(zone, hemisphere, maxEasting, minNorthing);
    LatLon ur = UTMCoord.locationFromUTMCoord(zone, hemisphere, maxEasting, maxNorthing);
    LatLon ul = UTMCoord.locationFromUTMCoord(zone, hemisphere, minEasting, maxNorthing);

    return boundingSector(Arrays.asList(ll, lr, ur, ul));
  }