uk.me.parabola.mkgmap.filters
Class RemoveEmpty

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

public class RemoveEmpty
extends java.lang.Object
implements MapFilter

Filter for removing empty elements and degenerate elements, for example lines or shapes with just one point.

Author:
Steve Ratcliffe

Constructor Summary
RemoveEmpty()
           
 
Method Summary
 void doFilter(MapElement element, MapFilterChain next)
          If this is a line (or a shape, which extends a line) then we check to see if it is empty or only a single point.
 void init(FilterConfig config)
          Initialise the filter and pass in parameters that may be needed for the run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoveEmpty

public RemoveEmpty()
Method Detail

init

public void init(FilterConfig config)
Description copied from interface: MapFilter
Initialise the filter and pass in parameters that may be needed for the run.

Specified by:
init in interface MapFilter
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)
If this is a line (or a shape, which extends a line) then we check to see if it is empty or only a single point. If it is then it is dropped.

Specified by:
doFilter in interface MapFilter
Parameters:
element - A map element.
next - This is used to pass the possibly transformed element onward.