diff --git a/README.md b/README.md index 46af1bd..a25709b 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,41 @@ # deutsch-geo-env-mapper - - rust geospatial mapper. - - just put the files in the folder and then just search. No time for reload multiple times. Uses dotenv for automatic file indexing. - - application of dotenv for geo spatial command line detusch code mapper. - - polars analysis can be found here [deutsch geospatial mappers](https://github.com/zupzup/rust-polars-example) - - You can download the geospatial mapping from here [german postcode code to location mapping](https://www.suche-postleitzahl.org/downloads). + - rust geospatial mapper using dotenv for deutsch code mapper. + - just put the files in the folder with the same naming convention. + - Geospatial mapping data can be downloaded from here [german postcode code to location mapping](https://www.suche-postleitzahl.org/downloads). + - Deutsch github repository[repository link](https://github.com/plzTeam). + - polars analysis can be found here [deutsch geospatial mappers](https://github.com/zupzup/rust-polars-example). + - to install this just clone the folder and build the cargo or use the pre-compiled binary. - please see the last commit message and if it says compiled binary then it is completed or else still in development version. - - Their github repository[repository link](https://github.com/plzTeam). + ``` cargo build ``` - ``` - gauravsablok@genome deutsch-geo-env-mapper main ? ./target/debug/deutsch-geo-env-mapper -h + ``` deutsch geo-mapper Usage: deutsch-geo-env-mapper Commands: - plz search according to the plz - note search according to the note - einwohner search according to the einwohner - qkm search according to the qkm - latitude search according to the latitude - longitude search according to the longitude - osm search according to the osm - ags search according to the ags - ord search according to the ort - landkreis search according to the landkries - bundesland search according to the bundesland - help Print this message or the help of the given subcommand(s) + plz search according to the plz + note search according to the note + einwohner search according to the einwohner + qkm search according to the qkm + latitude search according to the latitude + longitude search according to the longitude + osm search according to the osm + ags search according to the ags + ord search according to the ort + landkreis search according to the landkries + bundesland search according to the bundesland + general-pattern general pattern search + help Print this message or the help of the given subcommand(s) Options: -h, --help Print help -V, --version Print version - ``` - + - search according to the plz ``` gauravsablok@genome deutsch-geo-env-mapper main ? ./target/debug/deutsch-geo-env-mapper plz 99955 @@ -50,32 +50,76 @@ 99955 2903166 16064038 Kutzleben Unstrut-Hainich-Kreis Thüringen 99955 2903167 16064045 Mittelsömmern Unstrut-Hainich-Kreis Thüringen 99955 2903171 16064064 Urleben Unstrut-Hainich-Kreis Thüringen - + ``` + - search according to the note +``` 21:51:03 gauravsablok@genome deutsch-geo-env-mapper main ? ./target/debug/deutsch-geo-env-mapper note 01067 01067 01067-Dresden 11957 6.866839 51.06019 13.71117 +``` + - search according to the longitude +``` 21:51:22 gauravsablok@genome deutsch-geo-env-mapper main ? ./target/debug/deutsch-geo-env-mapper longitude 13.71117 01067 01067 Dresden 11957 6.866839 51.06019 13.71117 +``` + - search according to the latitude +``` 21:51:33 gauravsablok@genome deutsch-geo-env-mapper main ? ./target/debug/deutsch-geo-env-mapper latitude 51.06019 01067 01067 Dresden 11957 6.866839 51.06019 13.71117 +``` +- search according to the einwohner +``` 21:51:40 gauravsablok@genome deutsch-geo-env-mapper main ? ./target/debug/deutsch-geo-env-mapper einwohner 11957 01067 01067 Dresden 11957 6.866839 51.06019 13.71117 +``` +- search according to the osm +``` 23:23:53 gauravsablok@genome deutsch-geo-env-mapper main ? - ./target/debug/deutsch-geo-env-mapper osm 1104550 130 ↵ + ./target/debug/deutsch-geo-env-mapper osm 1104550 78267 1104550 08335001 Aach Landkreis-Konstanz Baden-Württemberg The results are: "The searched results are as follows" +``` +- search according to the ags +``` 23:23:58 gauravsablok@genome deutsch-geo-env-mapper main ? ./target/debug/deutsch-geo-env-mapper ags 08335001 78267 1104550 08335001 -A-a-c-h- Landkreis-Konstanz Baden-Württemberg The results are: "The searched results are as follows" - 23:24:02 gauravsablok@genome deutsch-geo-env-mapper main ? - ./target/debug/deutsch-geo-env-mapper plz 78267 - 78267 78267 Aach 2179 10.648148 47.84445 8.85725 - 78267 1104550 08335001 Aach Landkreis-Konstanz Baden-Württemberg +``` +- search according to the ord +``` + 11:48:31 gauravsablok@genome deutsch-geo-env-mapper main ? + ./target/debug/deutsch-geo-env-mapper ord Aach + 78267 1104550 08335001 "Aach" "Landkreis Konstanz" "Baden-Württemberg" + 54298 1255910 07235001 "Aach" "Landkreis Trier-Saarburg" "Rheinland-Pfalz" The results are: "The searched results are as follows" +``` +- search according to the landkreis. if your landkries has spaces in the name then use the general pattern search +``` +13:21:00 gauravsablok@genome deutsch-geo-env-mapper main ? ./target/debug/deutsch-geo-env-mapper landkreis Neckar-Odenwald-Kreis +74740 403733 08225001 "Adelsheim" "Neckar-Odenwald-Kreis" "Baden-Württemberg" +74858 403747 08225002 "Aglasterhausen" "Neckar-Odenwald-Kreis" "Baden-Württemberg" +74842 403741 08225009 "Billigheim" "Neckar-Odenwald-Kreis" "Baden-Württemberg" +``` +- search according to the bundesland. if your bundesland has spaces in the name then use the general pattern search +``` +13:22:55 gauravsablok@genome deutsch-geo-env-mapper main ? ./target/debug/deutsch-geo-env-mapper bundesland Mecklenburg-Vorpommern +18211 391131 13072001 "Admannshagen-Bargeshagen" "Landkreis Rostock" "Mecklenburg-Vorpommern" +17375 1408072 13075001 "Ahlbeck" "Landkreis Vorpommern-Greifswald" "Mecklenburg-Vorpommern" +18320 374204 13073001 "Ahrenshagen-Daskow" "Landkreis Vorpommern-Rügen" "Mecklenburg-Vorpommern" +18347 374244 13073002 "Ahrenshoop" "Landkreis Vorpommern-Rügen" "Mecklenburg-Vorpommern" +``` + +- search according to the general pattern. This means that you have spaces in your name or anything. +``` + 13:08:41 gauravsablok@genome deutsch-geo-env-mapper main ? + ./target/debug/deutsch-geo-env-mapper general-pattern Konstanz + "2784842 08335043 Konstanz 78462 Landkreis Konstanz Baden-Württemberg" + "2784842 08335043 Konstanz 78464 Landkreis Konstanz Baden-Württemberg" + "2784842 08335043 Konstanz 78465 Landkreis Konstanz Baden-Württemberg ``` Gaurav Sablok diff --git a/deutsch-geo-env-mapper b/deutsch-geo-env-mapper new file mode 100755 index 0000000..1357634 Binary files /dev/null and b/deutsch-geo-env-mapper differ diff --git a/deutsch-geo-env-mapper.tar b/deutsch-geo-env-mapper.tar new file mode 100644 index 0000000..b325f00 Binary files /dev/null and b/deutsch-geo-env-mapper.tar differ diff --git a/src/ags.rs b/src/ags.rs index a151b99..ec5666a 100755 --- a/src/ags.rs +++ b/src/ags.rs @@ -1,4 +1,5 @@ use crate::mapper::MapperOrt; +use crate::mapper::MapperPrint; use dotenv::dotenv; use std::error::Error; use std::fs::File; @@ -25,31 +26,44 @@ pub fn ags_mapper(ags: &str) -> Result> { mapper_ort.push(MapperOrt { osmid: ort_mapper[0].to_string(), ags: ort_mapper[1].to_string(), - ord: ort_mapper[2].replace("", "-").to_string(), + ord: ort_mapper[2..3] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), plz: ort_mapper[3].to_string(), - landries: ort_mapper[4].replace(" ", "-").to_string(), - bundesland: ort_mapper[5].replace(" ", "-").to_string(), - }) + landkries: ort_mapper[4..5] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), + bundesland: ort_mapper[ort_mapper.len() - 1..ort_mapper.len()] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), + }); } - let mut searched_plz2: Vec = Vec::new(); + let mut searched_plz2: Vec = Vec::new(); for i in mapper_ort.iter() { if i.ags == ags.to_string() { - searched_plz2.push(MapperOrt { + searched_plz2.push(MapperPrint { plz: i.plz.clone(), osmid: i.osmid.clone(), ags: i.ags.clone(), - ord: i.ord.clone(), - landries: i.landries.clone(), - bundesland: i.bundesland.clone(), + ord: i.ord.clone().join("").to_string(), + landkries: i.landkries.clone().join("").to_string(), + bundesland: i.bundesland.clone().join("").to_string(), }); } } + println!( + "{}\t{}\t{}\t{}\t{}\t{}", + "plz", "osmid", "ags", "ord", "landkries", "bundesland" + ); for i in searched_plz2.iter() { println!( - "{}\t{}\t{}\t{}\t{}\t{}", - i.plz, i.osmid, i.ags, i.ord, i.landries, i.bundesland + "{}\t{}\t{}\t{:?}\t{:?}\t{:?}", + i.plz, i.osmid, i.ags, i.ord, i.landkries, i.bundesland ); } diff --git a/src/args.rs b/src/args.rs index 1007483..50951e3 100755 --- a/src/args.rs +++ b/src/args.rs @@ -35,4 +35,6 @@ pub enum Commands { Landkreis { landkries: String }, /// search according to the bundesland Bundesland { bundesland: String }, + /// general pattern search + GeneralPattern { generalpattern: String }, } diff --git a/src/bundesland.rs b/src/bundesland.rs index cf5c974..fab6e84 100755 --- a/src/bundesland.rs +++ b/src/bundesland.rs @@ -1,4 +1,5 @@ use crate::mapper::MapperOrt; +use crate::mapper::MapperPrint; use dotenv::dotenv; use std::error::Error; use std::fs::File; @@ -25,31 +26,40 @@ pub fn bundesland_mapper(bundesland: &str) -> Result> { mapper_ort.push(MapperOrt { osmid: ort_mapper[0].to_string(), ags: ort_mapper[1].to_string(), - ord: ort_mapper[2].replace(" ", "-").to_string(), + ord: ort_mapper[2..3] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), plz: ort_mapper[3].to_string(), - landries: ort_mapper[4].replace(" ", ".").to_string(), - bundesland: ort_mapper[6].replace(" ", "-").to_string(), - }) + landkries: ort_mapper[4..5] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), + bundesland: ort_mapper[ort_mapper.len() - 1..ort_mapper.len()] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), + }); } - let mut searched_plz2: Vec = Vec::new(); + let mut searched_plz2: Vec = Vec::new(); for i in mapper_ort.iter() { - if i.bundesland == bundesland.to_string().replace(" ", "-").to_string() { - searched_plz2.push(MapperOrt { + if i.bundesland.contains(&bundesland.to_string()) { + searched_plz2.push(MapperPrint { plz: i.plz.clone(), osmid: i.osmid.clone(), ags: i.ags.clone(), - ord: i.ord.clone(), - landries: i.landries.clone(), - bundesland: i.bundesland.clone(), + ord: i.ord.clone().join("").to_string(), + landkries: i.landkries.clone().join("").to_string(), + bundesland: i.bundesland.clone().join("").to_string(), }); } } for i in searched_plz2.iter() { println!( - "{}\t{}\t{}\t{}\t{}\t{}", - i.plz, i.osmid, i.ags, i.ord, i.landries, i.bundesland + "{}\t{}\t{}\t{:?}\t{:?}\t{:?}", + i.plz, i.osmid, i.ags, i.ord, i.landkries, i.bundesland ); } diff --git a/src/generalpattern.rs b/src/generalpattern.rs new file mode 100755 index 0000000..92bcab5 --- /dev/null +++ b/src/generalpattern.rs @@ -0,0 +1,55 @@ +use dotenv::dotenv; +use std::error::Error; +use std::fs::File; +use std::io::{BufRead, BufReader}; + +/* + Author Gaurav Sablok + SLB Potsdam + Date: 2025-2-12 + +*/ + +pub fn generalpattern_mapper(path: &str) -> Result> { + dotenv().ok(); + + let file1 = std::env::var("file1").expect("file not present"); + let file2 = std::env::var("file2").expect("file not found"); + let file1read = File::open(file1).expect("path not found"); + let file2read = File::open(file2).expect("path not found"); + let bufferfile1 = BufReader::new(file1read); + let bufferfile2 = BufReader::new(file2read); + + let mut bufferfile1_part: Vec> = Vec::new(); + let mut bufferfile2_part: Vec> = Vec::new(); + + for i in bufferfile1.lines() { + let line = i.expect("line not found"); + if line.starts_with("plz") { + continue; + } else if !line.starts_with("plz") { + let mutableline: Vec<_> = line.split(",").map(|x| x.to_string()).collect::>(); + bufferfile1_part.push(mutableline); + } + } + + for i in bufferfile2.lines() { + let line = i.expect("line not found"); + let mutline = line.split(",").map(|x| x.to_string()).collect::>(); + bufferfile2_part.push(mutline); + } + + for i in bufferfile1_part.iter() { + if i.contains(&path.to_string()) { + println!("{:?}", i.join(" ").to_string()); + } + } + + for j in bufferfile2_part.iter() { + if j.contains(&path.to_string()) { + println!("{:?}", j.join(" ").to_string()); + } + } + + Ok("The search results have been written".to_string()) +} diff --git a/src/landkries.rs b/src/landkries.rs index f2b12f0..4c525d7 100755 --- a/src/landkries.rs +++ b/src/landkries.rs @@ -1,4 +1,5 @@ use crate::mapper::MapperOrt; +use crate::mapper::MapperPrint; use dotenv::dotenv; use std::error::Error; use std::fs::File; @@ -25,31 +26,40 @@ pub fn landkries_mapper(landkries: &str) -> Result> { mapper_ort.push(MapperOrt { osmid: ort_mapper[0].to_string(), ags: ort_mapper[1].to_string(), - ord: ort_mapper[2].replace(" ", "-").to_string(), + ord: ort_mapper[2..3] + .iter() + .map(|x| x.to_string()) + .collect::>(), plz: ort_mapper[3].to_string(), - landries: ort_mapper[4].replace(" ", "-").to_string(), - bundesland: ort_mapper[5].replace(" ", "-").to_string(), - }) + landkries: ort_mapper[ort_mapper.len() - 2..ort_mapper.len() - 1] + .iter() + .map(|x| x.to_string()) + .collect::>(), + bundesland: ort_mapper[ort_mapper.len() - 1..ort_mapper.len()] + .iter() + .map(|x| x.to_string()) + .collect::>(), + }); } - let mut searched_plz2: Vec = Vec::new(); + let mut searched_plz2: Vec = Vec::new(); for i in mapper_ort.iter() { - if i.landries == landkries.to_string() { - searched_plz2.push(MapperOrt { + if i.landkries.contains(&landkries.to_string()) { + searched_plz2.push(MapperPrint { plz: i.plz.clone(), osmid: i.osmid.clone(), ags: i.ags.clone(), - ord: i.ord.clone(), - landries: i.landries.clone(), - bundesland: i.bundesland.clone(), + ord: i.ord.clone().join("").to_string(), + landkries: i.landkries.clone().join("").to_string(), + bundesland: i.bundesland.clone().join("").to_string(), }); } } for i in searched_plz2.iter() { println!( - "{}\t{}\t{}\t{}\t{}\t{}", - i.plz, i.osmid, i.ags, i.ord, i.landries, i.bundesland + "{}\t{}\t{}\t{:?}\t{:?}\t{:?}", + i.plz, i.osmid, i.ags, i.ord, i.landkries, i.bundesland ); } diff --git a/src/main.rs b/src/main.rs index 722c42a..ae4c0a5 100755 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,7 @@ mod ags; mod args; mod bundesland; mod einwohner; +mod generalpattern; mod landkries; mod lat; mod lon; @@ -16,6 +17,7 @@ use crate::args::CommandParse; use crate::args::Commands; use crate::bundesland::bundesland_mapper; use crate::einwohner::einwohner_mapper; +use crate::generalpattern::generalpattern_mapper; use crate::landkries::landkries_mapper; use crate::lat::latitude_mapper; use crate::lon::longitude_mapper; @@ -80,5 +82,9 @@ fn main() { let command = bundesland_mapper(bundesland).unwrap(); println!("The results are: {:?}", command); } + Commands::GeneralPattern { generalpattern } => { + let command = generalpattern_mapper(generalpattern).unwrap(); + println!(" The results are: {:?}", command); + } } } diff --git a/src/mapper.rs b/src/mapper.rs index 6e867b0..d7a2ced 100755 --- a/src/mapper.rs +++ b/src/mapper.rs @@ -9,10 +9,19 @@ pub struct MapperDE { } pub struct MapperOrt { + pub osmid: String, + pub ags: String, + pub ord: Vec, + pub plz: String, + pub landkries: Vec, + pub bundesland: Vec, +} + +pub struct MapperPrint { pub osmid: String, pub ags: String, pub ord: String, pub plz: String, - pub landries: String, + pub landkries: String, pub bundesland: String, } diff --git a/src/ord.rs b/src/ord.rs index e6d99c8..7759311 100755 --- a/src/ord.rs +++ b/src/ord.rs @@ -1,4 +1,5 @@ use crate::mapper::MapperOrt; +use crate::mapper::MapperPrint; use dotenv::dotenv; use std::error::Error; use std::fs::File; @@ -25,31 +26,40 @@ pub fn ord_mapper(ord: &str) -> Result> { mapper_ort.push(MapperOrt { osmid: ort_mapper[0].to_string(), ags: ort_mapper[1].to_string(), - ord: ort_mapper[2].replace(" ", "-").to_string(), + ord: ort_mapper[2..3] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), plz: ort_mapper[3].to_string(), - landries: ort_mapper[4].replace(" ", "-").to_string(), - bundesland: ort_mapper[6].replace(" ", "-").to_string(), + landkries: ort_mapper[4..5] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), + bundesland: ort_mapper[ort_mapper.len() - 1..ort_mapper.len()] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), }) } - let mut searched_plz2: Vec = Vec::new(); + let mut searched_plz2: Vec = Vec::new(); for i in mapper_ort.iter() { - if i.ord == ord.to_string().replace(" ", "-").to_string() { - searched_plz2.push(MapperOrt { + if i.ord.contains(&ord.to_string()) { + searched_plz2.push(MapperPrint { plz: i.plz.clone(), osmid: i.osmid.clone(), ags: i.ags.clone(), - ord: i.ord.clone(), - landries: i.landries.clone(), - bundesland: i.bundesland.clone(), + ord: i.ord.clone().join("").to_string(), + landkries: i.landkries.clone().join("").to_string(), + bundesland: i.bundesland.clone().join("").to_string(), }); } } for i in searched_plz2.iter() { println!( - "{}\t{}\t{}\t{}\t{}\t{}", - i.plz, i.osmid, i.ags, i.ord, i.landries, i.bundesland + "{}\t{}\t{}\t{:?}\t{:?}\t{:?}", + i.plz, i.osmid, i.ags, i.ord, i.landkries, i.bundesland ); } diff --git a/src/osm.rs b/src/osm.rs index 46a77c1..f3a3c61 100755 --- a/src/osm.rs +++ b/src/osm.rs @@ -1,4 +1,5 @@ use crate::mapper::MapperOrt; +use crate::mapper::MapperPrint; use dotenv::dotenv; use std::error::Error; use std::fs::File; @@ -27,31 +28,45 @@ pub fn osm_mapper(osm: &str) -> Result> { mapper_ort.push(MapperOrt { osmid: ort_mapper[0].to_string(), ags: ort_mapper[1].to_string(), - ord: ort_mapper[2].replace(" ", "-").to_string(), + ord: ort_mapper[2..3] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), plz: ort_mapper[3].to_string(), - landries: ort_mapper[4].replace(" ", "-").to_string(), - bundesland: ort_mapper[5].replace(" ", "-").to_string(), + landkries: ort_mapper[4..5] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), + bundesland: ort_mapper[ort_mapper.len() - 1..ort_mapper.len()] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), }); } } - let mut searched_plz2: Vec = Vec::new(); + let mut searched_plz2: Vec = Vec::new(); for i in mapper_ort.iter() { if i.osmid == osm.to_string() { - searched_plz2.push(MapperOrt { + searched_plz2.push(MapperPrint { plz: i.plz.clone(), osmid: i.osmid.clone(), ags: i.ags.clone(), - ord: i.ord.clone(), - landries: i.landries.clone(), - bundesland: i.bundesland.clone(), + ord: i.ord.clone().join("").to_string(), + landkries: i.landkries.clone().join("").to_string(), + bundesland: i.bundesland.clone().join("").to_string(), }); } } + println!( + "{}\t{}\t{}\t{}\t{}\t{}", + "plz", "osmid", "ags", "ord", "landkries", "bundesland" + ); + for i in searched_plz2.iter() { println!( - "{}\t{}\t{}\t{}\t{}\t{}", - i.plz, i.osmid, i.ags, i.ord, i.landries, i.bundesland + "{}\t{}\t{}\t{:?}\t{:?}\t{:?}", + i.plz, i.osmid, i.ags, i.ord, i.landkries, i.bundesland ); } diff --git a/src/plz.rs b/src/plz.rs index 8273125..278f56a 100755 --- a/src/plz.rs +++ b/src/plz.rs @@ -1,5 +1,6 @@ use crate::mapper::MapperDE; use crate::mapper::MapperOrt; +use crate::mapper::MapperPrint; use dotenv::dotenv; use std::error::Error; use std::fs::File; @@ -52,16 +53,25 @@ pub fn plz_mapper(plz: &str) -> Result> { mapper_ort.push(MapperOrt { osmid: ort_mapper[0].to_string(), ags: ort_mapper[1].to_string(), - ord: ort_mapper[2].replace(" ", "-").to_string(), + ord: ort_mapper[2..3] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), plz: ort_mapper[3].to_string(), - landries: ort_mapper[4].replace(" ", "-").to_string(), - bundesland: ort_mapper[5].replace(" ", "-").to_string(), - }) + landkries: ort_mapper[4..5] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), + bundesland: ort_mapper[ort_mapper.len() - 1..ort_mapper.len()] + .into_iter() + .map(|x| x.to_string()) + .collect::>(), + }); } } let mut searched_plz1: Vec = Vec::new(); - let mut searched_plz2: Vec = Vec::new(); + let mut searched_plz2: Vec = Vec::new(); for i in mapper_de.iter() { if i.plz == plz.to_string() { searched_plz1.push(MapperDE { @@ -76,27 +86,36 @@ pub fn plz_mapper(plz: &str) -> Result> { } for j in mapper_ort.iter() { if j.plz == plz.to_string() { - searched_plz2.push(MapperOrt { + searched_plz2.push(MapperPrint { plz: j.plz.clone(), osmid: j.osmid.clone(), ags: j.ags.clone(), - ord: j.ord.clone(), - landries: j.landries.clone(), - bundesland: j.bundesland.clone(), + ord: j.ord.clone().join("").to_string(), + landkries: j.landkries.clone().join("").to_string(), + bundesland: j.bundesland.clone().join("").to_string(), }); } } + println!( + "{}\t{}\t{}\t{}\t{}\t{}", + "plz", "note", "einwohner", "qkm", "latitude", "longitude" + ); for i in searched_plz1.iter() { println!( "{}\t{}\t{}\t{}\t{}\t{}", i.plz, i.note, i.einwohner, i.qkm, i.lat, i.lon ); } + + println!( + "{}\t{}\t{}\t{}\t{}\t{}", + "plz", "osmid", "ags", "ord", "landkries", "bundesland" + ); for j in searched_plz2.iter() { println!( - "{}\t{}\t{}\t{}\t{}\t{}", - j.plz, j.osmid, j.ags, j.ord, j.landries, j.bundesland + "{}\t{}\t{}\t{:?}\t{:?}\t{:?}", + j.plz, j.osmid, j.ags, j.ord, j.landkries, j.bundesland ); }