wk_writer.sfc | R Documentation |
When writing transformation functions, it is often useful to know which
handler should be used to create a (potentially modified) version
of an object. Some transformers (e.g., wk_vertices()
) modify
the geometry type of an object, in which case a generic writer is needed.
This defaults to wkb_writer()
because it is fast and can handle
all geometry types.
## S3 method for class 'sfc'
wk_writer(handleable, ...)
## S3 method for class 'sf'
wk_writer(handleable, ...)
sfc_writer(promote_multi = FALSE)
wkb_writer(buffer_size = 2048L, endian = NA_integer_)
wkt_writer(precision = 16L, trim = TRUE)
wk_writer(handleable, ..., generic = FALSE)
## Default S3 method:
wk_writer(handleable, ...)
## S3 method for class 'wk_wkt'
wk_writer(handleable, ..., precision = 16, trim = TRUE)
## S3 method for class 'wk_wkb'
wk_writer(handleable, ...)
## S3 method for class 'wk_xy'
wk_writer(handleable, ..., generic = FALSE)
xy_writer()
handleable |
A geometry vector (e.g., |
... |
Passed to the writer constructor. |
promote_multi |
Use TRUE to promote all simple geometries to a multi type when reading to sfc. This is useful to increase the likelihood that the sfc will contain a single geometry type. |
buffer_size |
Control the initial buffer size used when writing WKB. |
endian |
Use 1 for little endian, 0 for big endian, or NA for system endian. |
precision |
If |
trim |
Use |
generic |
Use |
A wk_handler.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.