jiayuasu commented on code in PR #770:
URL: https://github.com/apache/sedona/pull/770#discussion_r1107921964


##########
R/R/data_interface.R:
##########
@@ -439,6 +439,52 @@ sedona_read_shapefile <- function(sc,
     new_spatial_rdd(NULL)
 }
 
+
+#' Read a geoparquet file into a Spark DataFrame.
+#' Read a geoparquet file into a Spark DataFrame. The created dataframe is 
automatically registered.
+#'
+#' @param sc A \code{spark_connection}.
+#' @param location Location of the data source.
+#' @param name The name to assign to the newly generated table.
+#'
+#'
+#' @return A SpatialRDD.
+#'
+#' @examples
+#' library(sparklyr)
+#' library(apache.sedona)
+#'
+#' sc <- spark_connect(master = "spark://HOST:PORT")
+#'
+#' if (!inherits(sc, "test_connection")) {
+#'   input_location <- "/dev/null" # replace it with the path to your input 
file
+#'   rdd <- sedona_read_geoparquet(sc, location = input_location)
+#' }
+#'
+#' @family Sedona data interface functions
+#'
+#' @export
+sedona_read_geoparquet <- function(sc,

Review Comment:
   Thanks for the explanation. Makes sense to me. Would you please add one more 
reader/writer `sedona_read_geotiff` and `sedona_write_geotiff`?
   
   It works the same way as the geoparquet: 
https://sedona.apache.org/latest-snapshot/api/sql/Raster-loader/#geotiff-dataframe-loader.
   
   If you think this is too complicated, we certainly can leave it to another 
PR. 
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to