uk.me.parabola.mkgmap.general
Class PolygonClipper

java.lang.Object
  extended by uk.me.parabola.mkgmap.general.PolygonClipper

public class PolygonClipper
extends java.lang.Object

Clip a polygon to the given bounding box. This may result in more than one polygon.

Author:
Steve Ratcliffe

Constructor Summary
PolygonClipper()
           
 
Method Summary
static java.util.List<java.util.List<Coord>> clip(Area bbox, java.util.List<Coord> coords)
          Clip the input polygon to the given area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolygonClipper

public PolygonClipper()
Method Detail

clip

public static java.util.List<java.util.List<Coord>> clip(Area bbox,
                                                         java.util.List<Coord> coords)
Clip the input polygon to the given area.

Parameters:
bbox - The bounding box.
coords - The coords of the polygon.
Returns:
Return null if the polygon is already completely inside the bounding box.