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

Solve error with rgeos::createSPComment() #49

Closed
wants to merge 5 commits into from

Conversation

aleruete
Copy link

I noticed that the main error was with createSPComment() while creating the sp SpatialPolygons. I changed mainly dg_process_polydata() to work with sf and convert to sp Spatial later.

polydata  <- lapply(polydata, function(x) {
                                              x["seqnum"] <- NULL
                                              x <- rbind(x, x[1,])
                                              x <- list(as.matrix(x))
                                              x
                                            }
                      )
  polydata  <- st_sfc(lapply(polydata, st_polygon),
                          crs = st_crs(4326))

  polydata  <- as_Spatial(polydata, IDs = an) 

I had to repeat the first point of each cell to be able to close the grid cells. x <- rbind(x, x[1,])

I also corrected the license NOTE.

I still get some other NOTEs on the package size but only that

@r-barnes
Copy link
Owner

@aleruete - Is this still an issue in the latest version? If so, please rebase and reopen.

@r-barnes r-barnes closed this Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants