@Override public void addRelation(Relation relation) { super.addRelation(relation); this.relationStore.add(relation); }
@Override public void addWay(Way way) { super.addWay(way); this.wayStore.add(way); this.indexedWayStore.add(way.getId(), way); this.maxWayID = Math.max(way.getId(), this.maxWayID); }
/** * {@inheritDoc} */ public void process(WayContainer container) { allWays.add(container); }
/** * {@inheritDoc} */ public void process(NodeContainer container) { allNodes.add(container); }
/** * {@inheritDoc} */ public void process(NodeContainer container) { allNodes.add(container); }
@Override public void process(RelationContainer relation) { objects.add(relation); } }
@Override public void process(WayContainer way) { objects.add(way); }
@Override public void process(RelationContainer relation) { objects.add(relation); } }
@Override public void process(WayContainer way) { objects.add(way); }
private void initialize() { if (!initialized) { while (sourceIterator.hasNext()) { store.add(sourceIterator.next()); } sourceIterator.close(); sourceIterator = null; storeIterator = store.iterate(); initialized = true; } }
private void initialize() { if (!initialized) { while (sourceIterator.hasNext()) { store.add(sourceIterator.next()); } sourceIterator.close(); sourceIterator = null; storeIterator = store.iterate(); initialized = true; } }
/** * {@inheritDoc} */ public void process(WayContainer container) { Way way; // mark all nodes as required way = container.getEntity(); for (WayNode nodeReference : way.getWayNodes()) { long nodeId = nodeReference.getNodeId(); requiredNodes.set(nodeId); } allWays.add(container); }
@Override public void process(NodeContainer nodeContainer) { Node node = nodeContainer.getEntity(); if (nodesSeen) { left = Math.min(left, node.getLongitude()); right = Math.max(right, node.getLongitude()); bottom = Math.min(bottom, node.getLatitude()); top = Math.max(top, node.getLatitude()); } else { left = node.getLongitude(); right = node.getLongitude(); top = node.getLatitude(); bottom = node.getLatitude(); nodesSeen = true; } objects.add(nodeContainer); }
@Override public void process(NodeContainer nodeContainer) { Node node = nodeContainer.getEntity(); if (nodesSeen) { left = Math.min(left, node.getLongitude()); right = Math.max(right, node.getLongitude()); bottom = Math.min(bottom, node.getLatitude()); top = Math.max(top, node.getLatitude()); } else { left = node.getLongitude(); right = node.getLongitude(); top = node.getLatitude(); bottom = node.getLatitude(); nodesSeen = true; } objects.add(nodeContainer); }
/** * {@inheritDoc} */ public void process(RelationContainer container) { Relation relation; // mark all nodes as required relation = container.getEntity(); for (RelationMember memberReference : relation.getMembers()) { if (memberReference.getMemberType() == EntityType.Node) { long nodeId = memberReference.getMemberId(); requiredNodes.set(nodeId); } } allRelations.add(container); }
/** * {@inheritDoc} */ public void process(RelationContainer container) { Relation relation; // mark all nodes as required relation = container.getEntity(); for (RelationMember memberReference : relation.getMembers()) { if (memberReference.getMemberType() == EntityType.Way) { long wayId = memberReference.getMemberId(); requiredWays.set(wayId); } } allRelations.add(container); }
/** * {@inheritDoc} */ public void process(NodeContainer container) { Node node; node = container.getEntity(); // Check if we're storing entities for later. if (storeEntities) { allNodes.add(container); } // Only add the node if it lies within the box boundaries. if (isNodeWithinArea(node)) { availableNodes.set(node.getId()); // If we're not storing entities, we pass it on immediately. if (!storeEntities) { emitNode(container); } } }
/** * {@inheritDoc} */ public void process(NodeContainer container) { Node node; node = container.getEntity(); // Check if we're storing entities for later. if (storeEntities) { allNodes.add(container); } // Only add the node if it lies within the box boundaries. if (isNodeWithinArea(node)) { availableNodes.set(node.getId()); // If we're not storing entities, we pass it on immediately. if (!storeEntities) { emitNode(container); } } }
allWays.add(container);
allRelations.add(container);