Skip to contents

Create an empty instance of the geom_template in a given schema in PostGIS

Usage

createGeomInstanceTable(connectionDetails, schema, name)

Arguments

connectionDetails

(list) An object of class connectionDetails as created by the createConnectionDetails function

schema

(character) The name of the schema in PostGIS where the empty geom_X should be created

name

(character) The suffix for the table name to be created; will be appended to "geom_"

Value

An empty table (geom_X) in PostGIS

Examples

if (FALSE) {

variableSourceId <- 157

variableTable <- DatabaseConnector::dbGetQuery(conn, paste0("SELECT * FROM backbone.variable_source WHERE variable_source_id = ", variableSourceId))

dataSourceRecord <- getDataSourceRecord(conn, variableTable$data_source_uuid)

geomIndex <- getGeomIndexByDataSourceUuid(conn, dataSourceRecord$geom_dependency_uuid)

createGeomInstanceTable(conn = conn, schema =  geomIndex$database_schema, name = geomIndex$table_name)
}