uk.me.parabola.mkgmap.filters
Class PolygonSizeSplitterFilter

java.lang.Object
  extended by uk.me.parabola.mkgmap.filters.BaseFilter
      extended by uk.me.parabola.mkgmap.filters.PolygonSplitterBase
          extended by uk.me.parabola.mkgmap.filters.PolygonSizeSplitterFilter
All Implemented Interfaces:
MapFilter

public class PolygonSizeSplitterFilter
extends PolygonSplitterBase
implements MapFilter

Split polygons for physical size (rather than number of points). The plan here is simple, if its too big, then cut it in half. As we always cut the largest dimension, then we will soon enough have cut it down to be small enough.

Author:
Steve Ratcliffe

Field Summary
 
Fields inherited from class uk.me.parabola.mkgmap.filters.PolygonSplitterBase
MAX_SIZE
 
Constructor Summary
PolygonSizeSplitterFilter()
           
 
Method Summary
 void doFilter(MapElement element, MapFilterChain next)
          Split up polygons that are too big.
 void init(FilterConfig config)
          Get the scale factor so that we don't over split.
 
Methods inherited from class uk.me.parabola.mkgmap.filters.PolygonSplitterBase
split
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolygonSizeSplitterFilter

public PolygonSizeSplitterFilter()
Method Detail

init

public void init(FilterConfig config)
Get the scale factor so that we don't over split.

Specified by:
init in interface MapFilter
Overrides:
init in class BaseFilter
Parameters:
config - Configuration information, giving parameters of the map level that is being produced through this filter.

doFilter

public void doFilter(MapElement element,
                     MapFilterChain next)
Split up polygons that are too big.

Specified by:
doFilter in interface MapFilter
Overrides:
doFilter in class BaseFilter
Parameters:
element - A map element, only polygons will be processed.
next - This is used to pass the possibly transformed element onward.