/** * Initializes the node area with the empty edge value and default additional value. */ void initNodeRefs(long oldCapacity, long newCapacity) { for (long pointer = oldCapacity + N_EDGE_REF; pointer < newCapacity; pointer += nodeEntryBytes) { nodes.setInt(pointer, EdgeIterator.NO_EDGE); } if (extStorage.isRequireNodeField()) { for (long pointer = oldCapacity + N_ADDITIONAL; pointer < newCapacity; pointer += nodeEntryBytes) { nodes.setInt(pointer, extStorage.getDefaultNodeFieldValue()); } } }
@Override public final void setNode(int nodeId, double lat, double lon, double ele) { that.ensureNodeIndex(nodeId); long tmp = (long) nodeId * that.nodeEntryBytes; that.nodes.setInt(tmp + that.N_LAT, Helper.degreeToInt(lat)); that.nodes.setInt(tmp + that.N_LON, Helper.degreeToInt(lon)); if (is3D()) { // meter precision is sufficient for now that.nodes.setInt(tmp + that.N_ELE, Helper.eleToInt(ele)); that.bounds.update(lat, lon, ele); } else { that.bounds.update(lat, lon); } // set the default value for the additional field of this node if (that.extStorage.isRequireNodeField()) that.nodes.setInt(tmp + that.N_ADDITIONAL, that.extStorage.getDefaultNodeFieldValue()); }
/** * Initializes the node area with the empty edge value and default additional value. */ void initNodeRefs(long oldCapacity, long newCapacity) { for (long pointer = oldCapacity + N_EDGE_REF; pointer < newCapacity; pointer += nodeEntryBytes) { nodes.setInt(pointer, EdgeIterator.NO_EDGE); } if (extStorage.isRequireNodeField()) { for (long pointer = oldCapacity + N_ADDITIONAL; pointer < newCapacity; pointer += nodeEntryBytes) { nodes.setInt(pointer, extStorage.getDefaultNodeFieldValue()); } } }
/** * Initializes the node area with the empty edge value and default additional value. */ void initNodeRefs(long oldCapacity, long newCapacity) { for (long pointer = oldCapacity + N_EDGE_REF; pointer < newCapacity; pointer += nodeEntryBytes) { nodes.setInt(pointer, EdgeIterator.NO_EDGE); } if (extStorage.isRequireNodeField()) { for (long pointer = oldCapacity + N_ADDITIONAL; pointer < newCapacity; pointer += nodeEntryBytes) { nodes.setInt(pointer, extStorage.getDefaultNodeFieldValue()); } } }
/** * Initializes the node area with the empty edge value and default additional value. */ void initNodeRefs( long oldCapacity, long newCapacity ) { for (long pointer = oldCapacity + N_EDGE_REF; pointer < newCapacity; pointer += nodeEntryBytes) { nodes.setInt(pointer, EdgeIterator.NO_EDGE); } if (extStorage.isRequireNodeField()) { for (long pointer = oldCapacity + N_ADDITIONAL; pointer < newCapacity; pointer += nodeEntryBytes) { nodes.setInt(pointer, extStorage.getDefaultNodeFieldValue()); } } }
@Override public final void setNode(int nodeId, double lat, double lon, double ele) { that.ensureNodeIndex(nodeId); long tmp = (long) nodeId * that.nodeEntryBytes; that.nodes.setInt(tmp + that.N_LAT, Helper.degreeToInt(lat)); that.nodes.setInt(tmp + that.N_LON, Helper.degreeToInt(lon)); if (is3D()) { // meter precision is sufficient for now that.nodes.setInt(tmp + that.N_ELE, Helper.eleToInt(ele)); that.bounds.update(lat, lon, ele); } else { that.bounds.update(lat, lon); } // set the default value for the additional field of this node if (that.extStorage.isRequireNodeField()) that.nodes.setInt(tmp + that.N_ADDITIONAL, that.extStorage.getDefaultNodeFieldValue()); }
@Override public final void setNode(int nodeId, double lat, double lon, double ele) { that.ensureNodeIndex(nodeId); long tmp = (long) nodeId * that.nodeEntryBytes; that.nodes.setInt(tmp + that.N_LAT, Helper.degreeToInt(lat)); that.nodes.setInt(tmp + that.N_LON, Helper.degreeToInt(lon)); if (is3D()) { // meter precision is sufficient for now that.nodes.setInt(tmp + that.N_ELE, Helper.eleToInt(ele)); that.bounds.update(lat, lon, ele); } else { that.bounds.update(lat, lon); } // set the default value for the additional field of this node if (that.extStorage.isRequireNodeField()) that.nodes.setInt(tmp + that.N_ADDITIONAL, that.extStorage.getDefaultNodeFieldValue()); }
@Override public final void setNode( int nodeId, double lat, double lon, double ele ) { that.ensureNodeIndex(nodeId); long tmp = (long) nodeId * that.nodeEntryBytes; that.nodes.setInt(tmp + that.N_LAT, Helper.degreeToInt(lat)); that.nodes.setInt(tmp + that.N_LON, Helper.degreeToInt(lon)); if (is3D()) { // meter precision is sufficient for now that.nodes.setInt(tmp + that.N_ELE, Helper.eleToInt(ele)); that.bounds.update(lat, lon, ele); } else { that.bounds.update(lat, lon); } // set the default value for the additional field of this node if (that.extStorage.isRequireNodeField()) that.nodes.setInt(tmp + that.N_ADDITIONAL, that.extStorage.getDefaultNodeFieldValue()); }