Package org.openstreetmap.osmosis.core.domain.v0_6

Examples of org.openstreetmap.osmosis.core.domain.v0_6.WayNode


    if (!OsmUser.NONE.equals(user)) {
      // Users will only be updated in the database once per changeset
      // run.
      if (!userSet.contains(user.getId())) {
        int userId;
        OsmUser existingUser;

        userId = user.getId();

        try {
          existingUser = userDao.getUser(userId);
View Full Code Here


    if (!OsmUser.NONE.equals(user)) {
      // Users will only be updated in the database once per changeset
      // run.
      if (!userSet.contains(user.getId())) {
        int userId;
        OsmUser existingUser;

        userId = user.getId();

        try {
          existingUser = userDao.getUser(userId);
View Full Code Here

   * Test writing out a normal Way element.
   */
  @Test
  public final void testProcessNormalWay() {
    Way way =
      new Way(new CommonEntityData(1234, 2, timestamp, new OsmUser(23, "someuser"), 0));
    way.getWayNodes().add(new WayNode(1235));
    way.getWayNodes().add(new WayNode(1236));
    way.getTags().add(new Tag("waykey", "wayvalue"));
   
    testWayWriter.process(way);
View Full Code Here

   * Test writing out a Way element with no tags.
   */
  @Test
  public final void testProcessWayNoTags() {
    Way way =
      new Way(new CommonEntityData(1234, 2, timestamp, new OsmUser(23, "someuser"), 0));
    way.getWayNodes().add(new WayNode(1235));
    way.getWayNodes().add(new WayNode(1236));
   
    testWayWriter.process(way);
    try {
View Full Code Here

   * Test writing out a normal Relation element.
   */
  @Test
  public final void testProcessNormalRelation() {
    Relation relation =
      new Relation(new CommonEntityData(1234, 2, timestamp, new OsmUser(23, "someuser"), 0));
    relation.getMembers().add(new RelationMember(2345, EntityType.Node, "noderole"));
    relation.getMembers().add(new RelationMember(3456, EntityType.Way, "wayrole"));
    relation.getMembers().add(new RelationMember(4567, EntityType.Relation, "relationrole"));
    relation.getTags().add(new Tag("relationkey", "relationvalue"));
   
View Full Code Here

   * Test writing out a Relation element with no tags.
   */
  @Test
  public final void testProcessRelationNoTags() {
    Relation relation =
      new Relation(new CommonEntityData(1234, 2, timestamp, new OsmUser(23, "someuser"), 0));
    relation.getMembers().add(new RelationMember(2345, EntityType.Node, "noderole"));
    relation.getMembers().add(new RelationMember(3456, EntityType.Way, "wayrole"));
    relation.getMembers().add(new RelationMember(4567, EntityType.Relation, "relationrole"));
   
    testRelationWriter.process(relation);
View Full Code Here

    if (!OsmUser.NONE.equals(user)) {
      // Users will only be updated in the database once per changeset
      // run.
      if (!userSet.contains(user.getId())) {
        int userId;
        OsmUser existingUser;

        userId = user.getId();

        try {
          existingUser = userDao.getUser(userId);
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public Relation parseRecord(ResultSet resultSet) {
    try {
      return new Relation(
        new CommonEntityData(
          resultSet.getLong("id"),
          resultSet.getInt("version"),
          new Date(resultSet.getTimestamp("tstamp").getTime()),
          buildUser(resultSet),
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public Relation mapRow(ResultSet rs, int rowNumber) throws SQLException {
    return new Relation(mapCommonEntityData(rs));
  }
View Full Code Here

 
  /**
   * {@inheritDoc}
   */
  public void process(RelationContainer relationContainer) {
    Relation relation;
   
    relation = relationContainer.getEntity();
   
    for (RelationMember relationMember : relation.getMembers()) {
      EntityType memberType;
     
      memberType = relationMember.getMemberType();
     
      if (EntityType.Node.equals(memberType)) {
        if (!nodeBitSet.get(relationMember.getMemberId())) {
          initialize();
         
          write("Relation," + relation.getId() + ",Node," + relationMember.getMemberId());
          writeNewLine();
        }
      } else if (EntityType.Way.equals(memberType)) {
        if (!wayBitSet.get(relationMember.getMemberId())) {
          initialize();
         
          write("Relation," + relation.getId() + ",Way," + relationMember.getMemberId());
          writeNewLine();
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.openstreetmap.osmosis.core.domain.v0_6.WayNode

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.