explorePgtraj: Explore a pgtraj interactively in a Shiny app

Description Usage Arguments Value Author(s) Examples

View source: R/explorePgtraj.R

Description

See vignette for details.

Usage

1
2
3
explorePgtraj(conn, schema, pgtraj, layer_vector = NULL,
  layer_param_vector = NULL, layer_raster = NULL,
  layer_param_raster = NULL)

Arguments

conn

DBI::DBIConnection

schema

String. Schema name of the pgtraj.

pgtraj

String. Pgtraj name.

layer_vector

List of character vectors. As c(schema, table).

layer_param_vector

Named list of lists. Names need to map to the table names in layer_vector. Sub-lists contain parameters passed to leaflet::add*. See example.

layer_raster

raster::RasterLayer object

layer_param_raster

List. Parameters passed to leaflet::addRasterImage()

Value

nothing

Author(s)

Balázs Dukai balazs.dukai@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
# Vectore base layers to include
layer_vector <- list(c("example_data", "county_subdiv"),
                      c("example_data", "test_points")
                      )
layer_param_vector <- list(test_points=list(color = "red",
                                              stroke = FALSE,
                                              fillOpacity = 0.5),
                             county_subdiv=list(color = "grey",
                                                fillOpacity = 0.2)
                             )

# Raster base layers to include
ras <- rgdal::readGDAL("./temp_data/florida_dem_county099.tif")
ras2 <- raster::raster(ras, 1)
ras2_leaflet <- leaflet::projectRasterForLeaflet(ras2)
explorePgtraj(conn, schema, pgtraj, layer_vector, layer_param_vector,
              layer_raster=ras2_leaflet)

## End(Not run)

mablab/rpostgisLT documentation built on May 10, 2020, 9:35 a.m.