uk.me.parabola.mkgmap.filters
Class PreserveHorizontalAndVerticalLinesFilter

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

public class PreserveHorizontalAndVerticalLinesFilter
extends java.lang.Object
implements MapFilter


Constructor Summary
PreserveHorizontalAndVerticalLinesFilter()
           
 
Method Summary
 void doFilter(MapElement element, MapFilterChain next)
          Filter an element.
 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

PreserveHorizontalAndVerticalLinesFilter

public PreserveHorizontalAndVerticalLinesFilter()
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)
Description copied from interface: MapFilter
Filter an element. The filter looks at the element and can simply pass it on to the next filter in the chain by calling the MapFilterChain.doFilter(MapElement) method.

The filter may modify the element or create a new element or even more than one element and pass them all to the next part of the chain.

It is allowed to call the next doFilter more than once (this is used to split elements for example). You are also allowed to not call it at all, in which case the element will not appear in the map at that level.

Specified by:
doFilter in interface MapFilter
Parameters:
element - A map element that will be a line or a polygon.
next - This is used to pass the possibly transformed element onward.