grid-cell 0.0.2

Library for Japanese traditional grid cell.
Documentation
  • Coverage
  • 0%
    0 out of 15 items documented0 out of 1 items with examples
  • Size
  • Source code size: 10.4 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.58 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • x7c1/grid-cell
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • x7c1

Grid-Cell

Library for Japanese traditional geometry standard aka "地域メッシュ" or "標準地域メッシュ".

Usage

let spot = Spot::new(Coordinate {
    longitude: 139.733231,
    latitude: 35.680916,
});

// 1次メッシュの地域メッシュコード
let actual = spot.as_first_cell().code;
let expected = 5339;
assert_eq!(actual, expected);

// 2次メッシュの地域メッシュコード
let actual = spot.as_second_cell().code;
let expected = 533945;
assert_eq!(actual, expected);

// 3次メッシュの地域メッシュコード
let actual = spot().as_third_cell().code;
let expected = 53394518;
assert_eq!(actual, expected);

// 4次メッシュ (2分の1地域メッシュ) の地域メッシュコード
let actual = spot.as_fourth_cell().code;
let expected = 533945184;
assert_eq!(actual, expected);