fn download_arches(path: &Path) {
    println!("Downloading the arch dataset!");
    let mut pages = Vec::new();
    net::get_database_pages(ARCH_BASE, &mut pages, "Types".to_owned(), None);

    // Build the list of arch entry links
    let mut arch_pages = Vec::new();
    for page in pages {
        // Build the URL
        let url = net::build_url(ARCH_BASE, page); 
        net::get_landforms(&url, &mut arch_pages);    
    }

    let mut arches = Vec::new();    
    for arch_page in arch_pages {
        let arch_url = net::build_url(ARCH_BASE, arch_page);
        let arch = net::download_landform(arch_url);
        arches.push(arch);
    }

    // Write out the GPX
    let out_path = path.join(ARCH_FILE);
    match gpx::write_gpx(out_path.as_path(), &arches) {
        Err(err) => eprintln!("[ERROR]: Failed to write GPX! \n {}", err),
        _ => (),
    }
}
/// Downloads the arch dataset from the Kentucky Arches Database
Downloads the arch dataset from the Kentucky Arches Database
Downloads the arch dataset from the Kentucky Arches Database
fn download_arches(path: &Path) {
    println!("Downloading the arch dataset!");
    let mut pages = Vec::new();
    net::get_database_pages(ARCH_BASE, &mut pages, "Types".to_owned(), None);
    // Build the list of arch entry links
    let mut arch_pages = Vec::new();
    for page in pages {
        // Build the URL
        let url = net::build_url(ARCH_BASE, page); 
        net::get_landforms(&url, &mut arch_pages);    
    }
    let mut arches = Vec::new();    
    for arch_page in arch_pages {
        let arch_url = net::build_url(ARCH_BASE, arch_page);
        let arch = net::download_landform(arch_url);
        arches.push(arch);
    }
    // Write out the GPX
    let out_path = path.join(ARCH_FILE);
    match gpx::write_gpx(out_path.as_path(), &arches) {
        Err(err) => eprintln!("[ERROR]: Failed to write GPX! \n {}", err),
        _ => (),
    }
}
fn download_arches ( path : & Path ) { println ! ( " " ) ; let mut pages = Vec :: new ( ) ; net :: get_database_pages ( ARCH_BASE , & mut pages , " " . to_owned ( ) , None ) ; // Build the list of arch entry links let mut arch_pages = Vec :: new ( ) ; for page in pages { // Build the URL let url = net :: build_url ( ARCH_BASE , page ) ; net :: get_landforms ( & url , & mut arch_pages ) ; } let mut arches = Vec :: new ( ) ; for arch_page in arch_pages { let arch_url = net :: build_url ( ARCH_BASE , arch_page ) ; let arch = net :: download_landform ( arch_url ) ; arches . push ( arch ) ; } // Write out the GPX let out_path = path . join ( ARCH_FILE ) ; match gpx :: write_gpx ( out_path . as_path ( ) , & arches ) { Err ( err ) => eprintln ! ( " \n " err ) , _ => ( ) , } }
Downloads the arch dataset from the Kentucky Arches Database
Downloads the arch dataset from the Kentucky Arches Database
path
&Path