Learn R Programming

flexpolyline (version 0.3.0)

decode_sf: Wrapper function for decoding to simple features

Description

A wrapper function for decode that converts the input polylines, encoded in the flexible polyline enoding, to simple feature geometries of the sf package.

Usage

decode_sf(encoded, crs = sf::NA_crs_)

Value

An sf object, containing the geometries of the decoded lines (Geometry type: "LINESTRING").

Arguments

encoded

character, encoded flexible polyline string.

crs

integer or character, coordinate reference system to assign to the sf object (default = sf::NA_crs_).

Examples

Run this code
decode_sf("B1Voz5xJ67i1Bgkh9B")
decode_sf("BFoz5xJ67i1B1B7PlU9yB")
decode_sf("BlXoz5xJ67i1Bgkh9B1B7Pgkh9BzIhagkh9BqK-pB_ni6D")

Run the code above in your browser using DataLab