Package org.openstreetmap.osmosis.core.container.v0_6

Examples of org.openstreetmap.osmosis.core.container.v0_6.NodeContainer


                Entity entity = converter.toEntity(feature, id);
                EntityContainer container;
                if (entity instanceof Node) {
                    container = new NodeContainer((Node) entity);
                } else {
                    container = new WayContainer((Way) entity);
                }

                ChangeAction action = diff.changeType().equals(ChangeType.ADDED) ? ChangeAction.Create
                        : diff.changeType().equals(ChangeType.MODIFIED) ? ChangeAction.Modify
                                : ChangeAction.Delete;
View Full Code Here


                Entity entity = converter.toEntity(feature, null);
                EntityContainer container;
                if (entity instanceof Node) {
                    container = new NodeContainer((Node) entity);
                } else {
                    container = new WayContainer((Way) entity);
                }

                return container;

            }
View Full Code Here

        while (reader.getEventType() == XMLStreamConstants.START_ELEMENT) {     
          // Node, way, relation
          if (reader.getLocalName().equals(ELEMENT_NAME_NODE)) {
            sink.process(new NodeContainer(readNode()));
          } else if (reader.getLocalName().equals(ELEMENT_NAME_WAY)) {
            sink.process(new WayContainer(readWay()));
          } else if (reader.getLocalName().equals(ELEMENT_NAME_RELATION)) {
            sink.process(new RelationContainer(readRelation()));
          } else {
            readUnknownElement();
          }
View Full Code Here

    nodeIterator = null;

    // send on all required ways
    ReleasableIterator<WayContainer> wayIterator = allWays.iterate();
    while (wayIterator.hasNext()) {
      WayContainer wayContainer = wayIterator.next();
      long wayId = wayContainer.getEntity().getId();
      if (!requiredWays.get(wayId)) {
        continue;
      }
      sink.process(wayContainer);
    }
View Full Code Here

      for (long nodeIdOffset : way.getRefsList()) {
        nodeId += nodeIdOffset;
        wayNodes.add(new WayNode(nodeId));
      }

      decodedEntities.add(new WayContainer(osmWay));
    }
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  protected EntityContainerFactory<Way> getContainerFactory() {
    return new WayContainerFactory();
  }
View Full Code Here

    sources.add(new UpcastIterator<EntityContainer, BoundContainer>(
        new BoundContainerIterator(new ReleasableAdaptorForIterator<Bound>(bounds.iterator()))));
    sources.add(new UpcastIterator<EntityContainer, NodeContainer>(
        new NodeContainerIterator(nodeDao.iterate())));
    sources.add(new UpcastIterator<EntityContainer, WayContainer>(
        new WayContainerIterator(wayDao.iterate())));
    sources.add(new UpcastIterator<EntityContainer, RelationContainer>(
        new RelationContainerIterator(relationDao.iterate())));
   
    return new MultipleSourceIterator<EntityContainer>(sources);
  }
View Full Code Here

    resultSets.add(
        new UpcastIterator<EntityContainer, NodeContainer>(
            new NodeContainerIterator(nodeDao.iterate("bbox_"))));
    resultSets.add(
        new UpcastIterator<EntityContainer, WayContainer>(
            new WayContainerIterator(wayDao.iterate("bbox_"))));
    resultSets.add(
        new UpcastIterator<EntityContainer, RelationContainer>(
            new RelationContainerIterator(relationDao.iterate("bbox_"))));
   
    // Merge all readers into a single result iterator and return.     
View Full Code Here

    sources.add(new UpcastIterator<EntityContainer, BoundContainer>(
        new BoundContainerIterator(new ReleasableAdaptorForIterator<Bound>(bounds.iterator()))));
    sources.add(new UpcastIterator<EntityContainer, NodeContainer>(
        new NodeContainerIterator(nodeDao.iterate())));
    sources.add(new UpcastIterator<EntityContainer, WayContainer>(
        new WayContainerIterator(wayDao.iterate())));
    sources.add(new UpcastIterator<EntityContainer, RelationContainer>(
        new RelationContainerIterator(relationDao.iterate())));
   
    return new MultipleSourceIterator<EntityContainer>(sources);
  }
View Full Code Here

      resultSets.add(
          new UpcastIterator<EntityContainer, NodeContainer>(
              new NodeContainerIterator(new NodeReader(dbCtx, "box_node_list"))));
      resultSets.add(
          new UpcastIterator<EntityContainer, WayContainer>(
              new WayContainerIterator(new WayReader(dbCtx, "box_way_list"))));
      resultSets.add(
          new UpcastIterator<EntityContainer, RelationContainer>(
              new RelationContainerIterator(new RelationReader(dbCtx, "box_relation_list"))));
     
      // Merge all readers into a single result iterator and return.     
View Full Code Here

TOP

Related Classes of org.openstreetmap.osmosis.core.container.v0_6.NodeContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.