Class PoiWriterTask

java.lang.Object
org.mapsforge.poi.writer.osmosis.PoiWriterTask
All Implemented Interfaces:
AutoCloseable, org.openstreetmap.osmosis.core.lifecycle.Closeable, org.openstreetmap.osmosis.core.lifecycle.Completable, org.openstreetmap.osmosis.core.task.common.Task, org.openstreetmap.osmosis.core.task.v0_6.Initializable, org.openstreetmap.osmosis.core.task.v0_6.Sink

public class PoiWriterTask extends Object implements org.openstreetmap.osmosis.core.task.v0_6.Sink
This task reads entities from an OSM stream and writes them to a SQLite database. Entities can be filtered and grouped by categories by using an XML definition.
  • Constructor Details

    • PoiWriterTask

      public PoiWriterTask(PoiWriterConfiguration configuration, ProgressManager progressManager)
      Writes all entities that can be mapped to a specific category and which category is in a given whitelist to a SQLite database. The category tree and tag mappings are retrieved from an XML file.
      Parameters:
      configuration - Configuration for the POI writer.
      progressManager - Object that sends progress messages to a GUI.
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface org.openstreetmap.osmosis.core.lifecycle.Closeable
    • complete

      public void complete()
      Specified by:
      complete in interface org.openstreetmap.osmosis.core.lifecycle.Completable
    • initialize

      public void initialize(Map<String,Object> metadata)
      Specified by:
      initialize in interface org.openstreetmap.osmosis.core.task.v0_6.Initializable
    • process

      public void process(org.openstreetmap.osmosis.core.container.v0_6.EntityContainer entityContainer)
      Specified by:
      process in interface org.openstreetmap.osmosis.core.task.v0_6.Sink