Class AskNewSpatialHandler

java.lang.Object
fr.ifremer.isisfish.ui.input.spatial.AskNewSpatialHandler

public class AskNewSpatialHandler extends Object
Handler for new fishery region resolution dialog.
  • Field Details

  • Constructor Details

  • Method Details

    • performSpatialChange

      public void performSpatialChange()
    • createNewCells

      protected List<Cell> createNewCells(FisheryRegion newFisheryRegion, FisheryRegion currentFisheryRegion)
      Create new cells for new resolution and use old region isLand() info.
      Parameters:
      newFisheryRegion - new fichery region
      currentFisheryRegion - old fishery region (for matching)
      Returns:
      new cells
    • createNewZones

      protected Map<Zone,List<Cell>> createNewZones(List<Cell> newCells, FisheryRegion newFisheryRegion, FisheryRegion currentFisheryRegion)
      Create new zones filled with cells from new region.
      Parameters:
      newCells - new cells
      newFisheryRegion - new region
      currentFisheryRegion - old region
      Returns:
      map between current zone and new cell for this zone
    • createNewPorts

      protected Map<Port,Cell> createNewPorts(List<Cell> newCells, FisheryRegion newFisheryRegion, FisheryRegion currentFisheryRegion)
      Create new port filled with cell from new region.
      Parameters:
      newCells - new cells
      newFisheryRegion - new region
      currentFisheryRegion - old region
      Returns:
      map between current ports and new cell for this zone
    • intersectPercentage

      protected double intersectPercentage(Rectangle2D.Float r1, Rectangle2D.Float r2, Rectangle2D.Float intersect)
      Intersection percentage between two rectangle (comparative to the min area of the two rectangle).
      Parameters:
      r1 - first rect
      r2 - second rect
      intersect - computed intersection
      Returns:
      intersection percentage