Description Arguments Examples
Lawn print methods to provide summary view
x |
Input. |
n |
(integer) Number of rows to print, when properties is large object. |
... |
Print options. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | # point
lawn_point(c(-74.5, 40))
# polygon
rings <- list(list(
c(-2.275543, 53.464547),
c(-2.275543, 53.489271),
c(-2.215118, 53.489271),
c(-2.215118, 53.464547),
c(-2.275543, 53.464547)
))
lawn_polygon(rings, properties = list(name = 'poly1', population = 400))
# linestring
linestring1 <- '[
[-21.964416, 64.148203],
[-21.956176, 64.141316],
[-21.93901, 64.135924],
[-21.927337, 64.136673]
]'
lawn_linestring(linestring1)
lawn_linestring(linestring1, properties = list(name = 'line1',
distance = 145))
# featurecollection
lawn_featurecollection(lawn_data$featurecollection_eg1)
# feature
serbia <- '{
"type": "Feature",
"properties": {"color": "red"},
"geometry": {
"type": "Point",
"coordinates": [20.566406, 43.421008]
}
}'
lawn_flip(serbia)
# multipoint
mpt <- '{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [19.026432, 47.49134]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [19.074497, 47.509548]
}
}
]
}'
x <- lawn_combine(mpt)
x$properties <- data.frame(color = c("red", "green"),
size = c("small", "large"),
popultion = c(5000, 10000L))
x
# multilinestring
mlstring <- '{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[-21.964416, 64.148203],
[-21.956176, 64.141316],
[-21.93901, 64.135924],
[-21.927337, 64.136673]
]
}
}, {
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[-21.929054, 64.127985],
[-21.912918, 64.134726],
[-21.916007, 64.141016],
[-21.930084, 64.14446]
]
}
}
]
}'
x <- lawn_combine(mlstring)
x$properties <- data.frame(color = c("red", "green"),
size = c("small", "large"),
popultion = c(5000, 10000L))
x
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.