Class MergeIterator

    • Constructor Detail

      • MergeIterator

        public MergeIterator(Collection<OsmIterator> inputs)
                      throws IOException
        Merge the elements from a collection of OSM input sources to a single OSM input source. The merging algorithm expects the input data to be in default order, i.e. a sequence of nodes, followed by a sequence of ways, followed by a sequence of relations. Each sequence ordered by their object's identifiers.
        Parameters:
        inputs - a collection of iterators to retrieve data from.
        Throws:
        IOException
      • MergeIterator

        public MergeIterator(Collection<OsmIterator> inputs,
                             Comparator<OsmEntity> comparator)
                      throws IOException
        Merge the elements from a collection of OSM input sources to a single OSM input source. The merging algorithm expects the input data to be in default order, i.e. a sequence of nodes, followed by a sequence of ways, followed by a sequence of relations. Each sequence ordered using the specified comparator.
        Parameters:
        inputs - a collection of iterators to retrieve data from.
        comparator - a Comparator used to compare elements of the same type.
        Throws:
        IOException
      • MergeIterator

        public MergeIterator(Collection<OsmIterator> inputs,
                             Comparator<? super OsmNode> comparatorNodes,
                             Comparator<? super OsmWay> comparatorWays,
                             Comparator<? super OsmRelation> comparatorRelations)
                      throws IOException
        Merge the elements from a collection of OSM input sources to a single OSM input source. The merging algorithm expects the input data to be in default order, i.e. a sequence of nodes, followed by a sequence of ways, followed by a sequence of relations. Each sequence ordered using the respective specified comparator.
        Parameters:
        inputs - a collection of iterators to retrieve data from.
        comparatorNodes - a Comparator used to compare nodes.
        comparatorWays - a Comparator used to compare ways.
        comparatorRelations - a Comparator used to compare relations.
        Throws:
        IOException