Skip to main content

mesh_codes_in_bbox

Function mesh_codes_in_bbox 

Source
pub fn mesh_codes_in_bbox(
    bbox: BoundingBox,
    level: MeshLevel,
) -> MeshCodeIterator 
Expand description

指定された境界ボックス内のメッシュコードをイテレータで取得する

§引数

  • bbox - 検索範囲を表す境界ボックス
  • level - 目的のメッシュレベル

§戻り値

メッシュコードを列挙するイテレータ

§

use jismeshcode::prelude::*;

let sw = Coordinate::new(35.6, 139.7).unwrap();
let ne = Coordinate::new(35.7, 139.8).unwrap();
let bbox = BoundingBox::new(sw, ne);

let meshes: Vec<_> = mesh_codes_in_bbox(bbox, MeshLevel::Third).collect();
println!("メッシュ数: {}", meshes.len());