Examples of WayContainer


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

                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

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

                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

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

        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

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

    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

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

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

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

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

 
  /**
   * {@inheritDoc}
   */
  public void end() {
    getSink().process(new WayContainer(way));
  }
View Full Code Here

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

    simplifier.initialize(new HashMap<String, Object>());
    Node node;
    Way way;
   
    way = new Way(new CommonEntityData(2, 2, new Date(), OsmUser.NONE, 2));
    simplifier.process(new ChangeContainer(new WayContainer(way), ChangeAction.Modify));

    try {
      node = new Node(new CommonEntityData(1, 2, new Date(), OsmUser.NONE, 1), 1, 1);
      simplifier.process(new ChangeContainer(new NodeContainer(node), ChangeAction.Modify));
    } catch (OsmosisRuntimeException e) {
View Full Code Here

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

                        getUser(info), info.getChangeset(), tags), nodes);
            } else {
                tmp = new Way(new CommonEntityData(id, NOVERSION, NODATE, OsmUser.NONE, NOCHANGESET,
                        tags), nodes);
            }
            sink.process(new WayContainer(tmp));
        }
    }
View Full Code Here

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

    testWay = new Way(new CommonEntityData(3456, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0));
    testWay.getWayNodes().add(new WayNode(1234));
    testWay.getWayNodes().add(new WayNode(1235));
    testWay.getTags().add(new Tag("test_key1", "test_value1"));
   
    testOsmWriter.process(new WayContainer(testWay));
    // Nothing to assert; just expect no exception
  }
View Full Code Here

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

    testWay = new Way(new CommonEntityData(3456, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0));
    testWay.getWayNodes().add(new WayNode(1234));
    testWay.getWayNodes().add(new WayNode(1235));
    testWay.getTags().add(new Tag("test_key1", "test_value1"));
   
    testOsmWriter.process(new WayContainer(testWay));
    testOsmWriter.process(new BoundContainer(new Bound("source")));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.