Examples of BoundContainer


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

  /**
   * Test the non-passing of a Bound which does not intersect the filter area.
   */
  @Test
  public final void testProcessBoundContainer3() {
    polyAreaFilter.process(new BoundContainer(nonIntersectingBound));
    polyAreaFilter.complete();
    assertNull(entityInspector.getLastEntityContainer());
  }
View Full Code Here

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

    } else {
      bound = new Bound(header.getSource());
    }

    // Add the bound object to the results.
    decodedEntities.add(new BoundContainer(bound));
  }
View Full Code Here

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

     */
    newBound = boundContainer.getEntity().intersect(bound);
    // intersect will return null if there is no overlapping area
    if (newBound != null) {
      // Send on a bound element clipped to the area
      super.process(new BoundContainer(newBound));
    }
  }
View Full Code Here

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

        newBound = newBound.union(simpleBoundIntersect(b));
      }
    }

    if (newBound != null) {
      super.process(new BoundContainer(newBound));
    }
  }
View Full Code Here

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

  /**
   * Test processing a single Bound entity.
   */
  @Test
  public final void testProcess1() {
    testOsmWriter.process(new BoundContainer(new Bound("source")));
    // Nothing to assert; just expect no exception
  }
View Full Code Here

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

  /**
   * Test processing a repeated Bound entity.
   */
  @Test(expected = OsmosisRuntimeException.class)
  public final void testProcess2() {
    testOsmWriter.process(new BoundContainer(new Bound("source")));
    testOsmWriter.process(new BoundContainer(new Bound("source2")));
    fail("Expected to throw an exception.");
  }
View Full Code Here

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

    testOsmWriter.process(new NodeContainer(
        new Node(
            new CommonEntityData(1234, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0,
                new ArrayList<Tag>()),
            20, 20)));
    testOsmWriter.process(new BoundContainer(new Bound("source")));
    fail("Expected to throw an exception.");
  }
View Full Code Here

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

    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

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

    testRelation = new Relation(new CommonEntityData(3456, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0));
    testRelation.getMembers().add(new RelationMember(1234, EntityType.Node, "role1"));
    testRelation.getTags().add(new Tag("test_key1", "test_value1"));
   
    testOsmWriter.process(new RelationContainer(testRelation));
    testOsmWriter.process(new BoundContainer(new Bound("source")));
  }
View Full Code Here

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

    if (entityContainer.getEntity().getType() == EntityType.Bound) {
      if (newBound == null) {
        // Just returning won't pass the entity downstream
        return;
      } else {
        sink.process(new BoundContainer(newBound));
      }
    } else {
      if (newBound != null) {
        sink.process(new BoundContainer(newBound));
      }
      sink.process(entityContainer);
    }
  }
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.