Skip to contents

Add right and left tables to PostGIS, convert to geography type, and create spatial indexes.

Usage

make_spatial_db_table(
  con,
  left_table,
  left_table_name,
  right_table,
  right_table_name
)

Arguments

con

connection object to PostGIS database

left_table

sf spatial data frame of left table in spatial join. Geometries for this object will be retained.

left_table_name

name of left table created in PostGIS

right_table

sf spatial data frame of right table in spatial join. Geometries for this object are dropped and column names are added to `left_table` based on the largest intersection.

right_table_name

name of right table created in PostGIS