Library for reading format geonames
Add this to your Cargo.toml
:
toml
[dependencies]
geonames-lib = "0.1"
Code:
```rust use std::fs::File; use std::io::{BufRead, BufReader}; use geonames_lib::model::GeoName;
fn main() { for line in BufReader::new(File::open("allCountries.txt").unwrap()).lines() { let geoname = GeoName::deserializefromstring(&line.unwrap()).unwrap(); println!("{:#?}", geoname); } } ```
Contributions welcome! Please fork the repository and open a pull request with your changes.
geonames-lib is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT, and COPYRIGHT for details.