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

Overlapped fine meshes #20

Closed
uribo opened this issue May 10, 2018 · 2 comments
Closed

Overlapped fine meshes #20

uribo opened this issue May 10, 2018 · 2 comments
Labels

Comments

@uribo
Copy link
Owner

uribo commented May 10, 2018

Original Posts from StackOverflow: meshが重なって作成されてしまう

library(tidyverse)
library(sf)
#> Linking to GEOS 3.6.1, GDAL 2.1.3, proj.4 4.9.3
library(jpmesh)
library(mapview)

mesh_list <-
    data.frame(x = c(533945191, 533945192, 533945193, 533945194))

df_mesh <- 
    do.call(rbind,
            pmap(mesh_list, ~ export_mesh(meshcode = .x) %>% 
                     st_sf() %>% 
                     mutate(ID = .x))) 

st_overlaps(df_mesh$geometry[1],
            df_mesh$geometry[2])
#> although coordinates are longitude/latitude, st_overlaps assumes that they are planar
#> Sparse geometry binary predicate list of length 1, where the predicate was `overlaps'
#>  1: 1

mapview(df_mesh)

Created on 2018-05-10 by the reprex package (v0.2.0).

@uribo uribo added the bug 💣 label May 10, 2018
@uribo
Copy link
Owner Author

uribo commented May 10, 2018

第一次から第三次までの地域区画では重なりが見られない。

10km

mesh_list <-
    data.frame(x = c(5339 %>% 
                         fine_separate()))

df_mesh <- 
    mesh_list$x %>% 
    export_meshes()

st_overlaps(df_mesh$geometry[1],
            df_mesh$geometry[2])
#> although coordinates are longitude/latitude, st_overlaps assumes that they are planar
#> Sparse geometry binary predicate list of length 1, where the predicate was `overlaps'
#>  1: (empty)

mapview(df_mesh)

1km

mesh_list <-
    data.frame(x = c(533945 %>% 
                         fine_separate()))

df_mesh <- 
    mesh_list$x %>% 
    export_meshes()

st_overlaps(df_mesh$geometry[1],
            df_mesh$geometry[2])
#> although coordinates are longitude/latitude, st_overlaps assumes that they are planar
#> Sparse geometry binary predicate list of length 1, where the predicate was `overlaps'
#>  1: (empty)

mapview(df_mesh)

Created on 2018-05-10 by the reprex package (v0.2.0).

@uribo
Copy link
Owner Author

uribo commented Dec 22, 2021

500mメッシュで再び発生。

fine_separate(51340494) %>% 
  export_meshes() %>% 
  dplyr::mutate(meshcode = as.character(meshcode)) %>% 
  mapview::mapview()

@uribo uribo reopened this Dec 22, 2021
@uribo uribo closed this as completed in 2fa70b8 Dec 22, 2021
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