#![doc(html_root_url = "https://docs.rs/shape-contour/0.2.1")]
pub mod contours;
#[cfg(test)]
mod tests {
use super::contours::{self, shape};
use std::path::PathBuf;
#[test]
fn check_shape_contour() {
let rp = "../shapelib-rs";
let s_path: String = if cfg!(docsrs) {
std::env::var("OUT_DIR").unwrap()
}else{
rp.to_string()
}; let o_path: &str = s_path.as_str();
if o_path != rp { return; }
let bp = PathBuf::from(o_path).join("shp").join("ESRIJ_com_japan_ver84");
println!("{}", bp.join("japan_ver84.shp").to_str().unwrap());
println!("{}", bp.join("japan_ver84.dbf").to_str().unwrap());
let s = bp.join("japan_ver84"); let u = s.to_str().unwrap(); let shp = shape::ShapeF::new(u, "cp932").unwrap();
shp.disp_record_inf().unwrap();
let sci = shp.get_shp_contours().unwrap();
drop(shp);
let mut gci = contours::GrpContoursInf::new(sci).unwrap();
gci.grp_contours.clear();
gci.get_grp_contours(26, 343).unwrap();
println!("n_grp_contours: {}", gci.grp_contours.len());
gci.grp_contours.clear();
gci.get_grp_contours(0, 0).unwrap(); println!("n_grp_contours: {}", gci.grp_contours.len());
}
}