Description Usage Arguments Value Examples
Takes a data-LineString and returns a data-LineString at offset by the specified distance.
1 | lawn_line_offset(line, distance, units, lint = FALSE)
|
line |
Line to measure, a data-LineString. |
distance |
(integer/numeric) Distance along the line. |
units |
Can be degrees, radians, miles, kilometers, inches, yards, meters |
lint |
(logical) Lint or not. Uses geojsonhint. Takes up increasing
time as the object to get linted increases in size, so probably use by
default for small objects, but not for large if you know they are good
geojson objects. Default: |
a data-LineString
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | line <- '{
"type": "Feature",
"properties": {
"stroke": "#F00"
},
"geometry": {
"type": "LineString",
"coordinates": [[-83, 30], [-84, 36], [-78, 41]]
}
}'
lawn_line_offset(line, 2, 'miles')
lawn_line_offset(line, 200, 'miles')
lawn_line_offset(line, 0.5, 'radians')
lawn_line_offset(line, 4, 'yards')
line <- '{
"type": "LineString",
"coordinates": [[-83, 30], [-84, 36], [-78, 41]]
}'
lawn_line_offset(line, 4, 'yards')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.