R: Format well-known geometry for printing

wkb_format {wk} | R Documentation

## Format well-known geometry for printing

### Description

Provides an abbreviated version of the well-known text representation of a geometry. This returns a constant number of coordinates for each geometry, so is safe to use for geometry vectors with many (potentially large) features.

### Usage

    wkb_format(wkb, max_coords = 3)

    wkt_format(wkt, max_coords = 3)

    wksxp_format(wksxp, max_coords = 3)

### Arguments

`wkb` | A `list()` of `raw()` vectors, such as that returned by `sf::st_as_binary()`.
`max_coords` | The maximum number of coordinates to include in the output.
`wkt` | A character vector containing well-known text.
`wksxp` | A `list()` of classed objects

### Value

A character vector of abbreviated well-known text.

### Examples

    wkt_format("MULTIPOLYGON (((0 0, 10 0, 0 10, 0 0)))")
    wkb_format(
      wkt_translate_wkb(
        "MULTIPOLYGON (((0 0, 10 0, 0 10, 0 0)))"
      )
    )

[Package wk version 0.3.4 Index]