Skip to content

Commit d97459e

Browse files
Merge pull request #426 from ipeaGIT/alex-#386
Issue #386
2 parents 005f5df + 3b83f1a commit d97459e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

r-package/R/setup_r5.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,14 @@ setup_r5 <- function(data_path,
164164
# build new r5r_core
165165
r5r_core <- rJava::.jnew("org.ipea.r5r.R5RCore", data_path, verbose, elevation, check=F)
166166
ex = rJava::.jgetEx(clear=T)
167-
if (!is.null(NULL)) {
167+
if (!is.null(ex)) {
168+
msg <- rJava::.jcall(ex, "S", "toString")
169+
if (grepl("Geographic extent of street layer", msg)) {
170+
stop("Street layer too large.")
171+
} else {
168172
ex$printStackTrace()
169173
return(NULL)
174+
}
170175
}
171176

172177
# display a message if there is a PBF file but no GTFS data

r-package/inst/jar/r5r.jar

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)