Skip to content

Commit 53d9ec0

Browse files
author
Harry Zhu
committed
fix deploy bugs
1 parent 575362b commit 53d9ec0

File tree

10 files changed

+42
-10
lines changed

10 files changed

+42
-10
lines changed

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
^.*\.Rproj$
22
^\.Rproj\.user$
3+
^\.travis\.yml$
4+
Reference.md$

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Version: 0.2.1
55
Author: Harry Zhu
66
Maintainer: Harry Zhu <7harryprince@gmail.com>
77
BugReports: https://github.com/harryprince/geospark/issues
8-
Description: R binds geospark extending sparklyr R package to make geocomputing easier.
8+
Description: R binds geospark extending sparklyr R package to make distributed geocomputing easier.
99
License: Apache License
1010
Encoding: UTF-8
1111
LazyData: true

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ export(st_example)
55
export(st_join)
66
import(dplyr)
77
import(sparklyr)
8+
import(utils)

R/dependencies.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spark_dependencies <- function(spark_version, scala_version, ...) {
2828
)
2929
}
3030

31-
#' @import sparklyr
31+
#' @import sparklyr dplyr
3232
.onLoad <- function(libname, pkgname) {
3333
sparklyr::register_extension(pkgname)
3434
}

R/register_gis.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
#' @title Enable GIS SQL
22
#' @name register_gis
33
#' @import sparklyr
4-
#' @param sc a sparklyr connection
4+
#' @param sc a spark connection
55
#' @description
66
#' register_gis: to enable spark geospark sql in sc, the more GIS SQL references could be found at https://github.com/harryprince/geospark/blob/master/Reference.md
77
#' @examples
88
#' \dontrun{
99
#' register_gis(sc)
1010
#' point = DBI::dbGetQuery(sc,"SELECT ST_GeomFromWKT('POINT(40.7128,-74.0060)') AS geometry")
1111
#' }
12+
#'
13+
#' @return a GIS spark connection
14+
#'
1215
#' @export
1316
register_gis <- function(sc) {
1417
sparklyr::invoke_static(sc,"org.datasyslab.geosparksql.utils.GeoSparkSQLRegistrator","registerAll",spark_session(sc))

R/st_example.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#' Spark geometry example.
22
#'
3+
#' @param sc an object of spark connection
4+
#' @param geom a string of geometry type
5+
#'
36
#' @examples
47
#' \dontrun{
58
#' library(sparklyr)
@@ -10,6 +13,8 @@
1013
#' }
1114
#' @details geometry can be "polygons" or "points"
1215
#'
16+
#' @return a data.frame contains wkt format column example
17+
#'
1318
#' @export
1419
st_example <- function(sc, geom = "polygons") {
1520
geoms <- read.table(system.file(package="geospark",sprintf("examples/%s.txt",geom)), sep="|")

R/st_join.R

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
#' @import dplyr
44
#' @param x a spark spatial data frame
55
#' @param y a spark spatial data frame
6+
#' @param join join condition
67
#' @description
78
#' st_join: spatial join
89
#'
10+
#' @import utils
11+
#'
912
#' @details alternative values for argument join are: ST_Contains, ST_Intersects, ST_Within, ST_Equals, ST_Crosses, ST_Touches, ST_Overlaps, ST_Distance
1013
#'
1114
#' @return a spark spatial data frame, joined based on geometry
@@ -14,15 +17,17 @@
1417
#' \dontrun{
1518
#'
1619
#' library(dplyr)
17-
#' polygons <- read.table(system.file(package="geospark","examples/polygons.txt"), sep="|", col.names=c("area","geom"))
18-
#' points <- read.table(system.file(package="geospark","examples/points.txt"), sep="|", col.names=c("city","state","geom"))
20+
#' polygons <- read.table(system.file(package="geospark","examples/polygons.txt"),
21+
#' sep="|", col.names=c("area","geom"))
22+
#' points <- read.table(system.file(package="geospark","examples/points.txt"),
23+
#' sep="|", col.names=c("city","state","geom"))
1924
#' polygons_wkt <- copy_to(sc, polygons)
2025
#' points_wkt <- copy_to(sc, points)
2126

2227
#' polygons_wkt <- mutate(polygons_wkt, y = st_geomfromwkt(geom))
2328
#' points_wkt <- mutate(points_wkt, x = st_geomfromwkt(geom))
2429

25-
#' sc_res = st_join(polygons_wkt, points_wkt, join = sql("st_contains(y,x)"))
30+
#' sc_res <- st_join(polygons_wkt, points_wkt, join = sql("st_contains(y,x)"))
2631
#' group_by(area, state) %>%
2732
#' summarise(cnt = n())
2833
#' }

man/register_gis.Rd

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/st_example.Rd

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/st_join.Rd

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)