/// Reads a node from an OSRM file.
Reads a node from an OSRM file.
Reads a node from an OSRM file .
fn from_osrm(reader: &mut BufReader<&File>) -> Node {
        let lon = reader.read_i32::<LittleEndian>().unwrap();
        let lat = reader.read_i32::<LittleEndian>().unwrap();
        let id = reader.read_u64::<LittleEndian>().unwrap() as i64;
        let _ = reader.seek(SeekFrom::Current(8));
        Node {
            id: id,
            lon: lon as f64 / 1e6,
            lat: lat as f64 / 1e6,
        }
    }
fn from_osrm ( reader : & mut BufReader < & File > ) -> Node { let lon = reader . read_i32 :: < LittleEndian > ( ) . unwrap ( ) ; let lat = reader . read_i32 :: < LittleEndian > ( ) . unwrap ( ) ; let id = reader . read_u64 :: < LittleEndian > ( ) . unwrap ( ) as i64 ; let _ = reader . seek ( SeekFrom :: Current ( 8 ) ) ; Node { id : id , lon : lon as f64 / 1e6 , lat : lat as f64 / 1e6 , } }
Reads a node from an OSRM file.
Reads a node from an OSRM file .
reader
&mut BufReader<&File>