Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A non-existent mesh cord? #45

Closed
uribo opened this issue Apr 5, 2020 · 1 comment
Closed

A non-existent mesh cord? #45

uribo opened this issue Apr 5, 2020 · 1 comment
Labels

Comments

@uribo
Copy link
Owner

uribo commented Apr 5, 2020

Slack (r-wakalang) より。

library(jpmesh)
library(sf)
#> Linking to GEOS 3.7.1, GDAL 2.4.0, PROJ 5.2.0

# 以下の結果が同じになる (500mメッシュ)
all.equal(
  export_mesh("513583021") %>% 
    st_as_sf(), 
  export_mesh("523503021") %>% 
    st_as_sf())
#> [1] TRUE

# 問題は10kmメッシュ以下で発生している
all.equal(
  export_mesh("513583") %>% 
    st_as_sf(), 
  export_mesh("523503") %>% 
    st_as_sf())
#> [1] TRUE

all.equal(
  export_mesh("5135") %>% 
    st_as_sf(), 
  export_mesh("5235") %>% 
    st_as_sf())
#> [1] "Component \"x\": Attributes: < Component \"bbox\": Mean relative difference: 0.01941743 >"
#> [2] "Component \"x\": Component 1: Component 1: Mean relative difference: 0.01945523"

Created on 2020-04-05 by the reprex package (v0.3.0)

10kmメッシュの下2桁は0~7の範囲なので、 513583 の段階で処理を停止しなければいけない。

@uribo uribo added the bug 💣 label Apr 5, 2020
@uribo
Copy link
Owner Author

uribo commented Apr 5, 2020

同じ問題は neighbor_mesh()でも

library(jpmesh)

neighbor_mesh(513474923, contains = TRUE)
#> [1] "513474912" "513474914" "513474921" "513474922" "513474923" "513474924"
#> [7] "513484012" "513484021" "513484022"

Created on 2020-04-05 by the reprex package (v0.3.0)

xxxx8xxx が出力されるのはおかしい。

@uribo uribo closed this as completed in 1669e9c May 6, 2020
uribo added a commit that referenced this issue May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant