Class OsmWriter

java.lang.Object
org.openstreetmap.osmosis.xml.common.ElementWriter
org.openstreetmap.osmosis.xml.v0_6.impl.OsmWriter

public class OsmWriter extends ElementWriter
Renders OSM data types as xml.
  • Constructor Details

    • OsmWriter

      public OsmWriter(String elementName, int indentLevel, boolean renderAttributes, boolean legacyBound)
      Creates a new instance.
      Parameters:
      elementName - The name of the element to be written.
      indentLevel - The indent level of the element.
      renderAttributes - Specifies whether attributes of the top level element should be rendered. This would typically be set to false if this element is embedded within a higher level element (eg. changesets)
      legacyBound - If true, write the legacy <bound> element instead of the correct <bounds> one.
  • Method Details

    • begin

      public void begin()
      Begins an element.
    • end

      public void end()
      Ends an element.
    • process

      public void process(org.openstreetmap.osmosis.core.container.v0_6.EntityContainer entityContainer)
      Writes the element in the container.
      Parameters:
      entityContainer - The container holding the entity.
    • setWriter

      public void setWriter(Writer writer)
      Sets the writer used as the xml output destination.
      Overrides:
      setWriter in class ElementWriter
      Parameters:
      writer - The writer.