Back to Atlas map viewer
SOURCE / PINNED RELEASE

Made of little things.

Atlas map viewer

Release
1d2807e80b44…
Author-recorded commit
43810ed2b368…
License
LICENSE
Author’s source reference
nostr://npub182jczunncwe0jn6frpqwq3e0qjws7yqqnc3auccqv9nte2dnd63scjm4rf/wss%3A%2F%2Fgit.napplet.soy%2F/n-4757dbabc86

Archive hash verified: 8db6876d96c460ac…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

crates/routing/src/bin/partition-routing.rs
use atlas_routing::{
    cells::{extract_cell, partition},
    Graph,
};
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let args: Vec<_> = std::env::args().collect();
    if args.len() != 3 {
        return Err("Usage: partition-routing input.rte output-directory".into());
    }
    let graph = Graph::decode(&std::fs::read(&args[1])?)?;
    let groups = partition(&graph)?;
    std::fs::create_dir_all(&args[2])?;
    for (address, ids) in groups {
        let c = extract_cell(&graph, address, ids)?;
        std::fs::write(
            format!("{}/{}-{}.rcl", args[2], address.0, address.1),
            c.encode(),
        )?;
    }
    Ok(())
}