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 · 1 comment
Closed

Overlapped fine meshes #20

uribo opened this issue May 10, 2018 · 1 comment
Labels

Comments

@uribo
Copy link
Owner

@uribo 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 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.