multipoint: Make WKT multipoint objects

Description Usage Arguments See Also Examples

View source: R/multipoint.R

Description

Make WKT multipoint objects

Usage

1
multipoint(..., fmt = 16)

Arguments

...

A GeoJSON-like object representing a Point, LineString, Polygon, MultiPolygon, etc.

fmt

Format string which indicates the number of digits to display after the decimal point when formatting coordinates. Max: 20

See Also

Other R.objects: circularstring, geometrycollection, linestring, multilinestring, multipolygon, point, polygon

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## empty multipoint
multipoint("empty")
# multipoint("stuff")

# numeric
multipoint(c(100.000, 3.101), c(101.000, 2.100), c(3.140, 2.180))

# data.frame
df <- us_cities[1:25, c('long', 'lat')]
multipoint(df)

# matrix
mat <- matrix(c(df$long, df$lat), ncol = 2)
multipoint(mat)

# list
multipoint(list(c(100.000, 3.101), c(101.000, 2.100), c(3.140, 2.180)))

ropensci/wellknown documentation built on Jan. 29, 2018, 10:45 a.m.