Description Usage Arguments Examples
Highly detailed geometries use more memory and make geoprocesses longer. If we don't need high precision, we can simplify (=generalize) it.
1 2 3 4 5 6 7 8 | pgisSimplifyGeom(
conn,
tbl,
tolerance,
geom.col = "geometry",
new.geom.col = "geometry_simpl",
verbose = TRUE
)
|
conn |
a PostgreSQLConnection object. |
tbl |
character; the table to simplify. |
tolerance |
numeric; the tolerance in meters CHECK THIS |
geom.col |
character; the geometry column (default; 'geometry') |
new.geom.col |
character; the name of the geometry column in which new
simplified geometry will be written. If identical to |
verbose |
boolean; shall the gain of memory be printed ? (default: TRUE). |
1 2 3 4 5 6 7 8 9 10 11 | library(spData)
library(sf)
library(RPostgreSQL)
data(seine)
conn = dbConnect(drv=dbDriver("PostgreSQL"), host="localhost", port=5432,
dbname="foodflows", user="milo", password="postgres")
dbWriteTable(conn, name="seine", seine, overwrite=TRUE)
pgisSimplifyGeom(conn, "seine", tolerance=10)
pgisSimplifyGeom(conn, "seine", tolerance=100)
pgisSimplifyGeom(conn, "seine", tolerance=1000)
dbDisconnect(conn)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.