Description Usage Arguments Details Value See Also Examples
View source: R/point_on_surface.R
Finds a data-Point guaranteed to be on the surface of data-GeoJSON object.
1 | lawn_point_on_feature(x, lint = FALSE)
|
x |
Any data-GeoJSON object |
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: |
What will be returned?
Given a data-Polygon, the point will be in the area of the polygon
Given a data-LineString, the point will be along the string
Given a data-Point, the point will be the same as the input
A data-Feature<(data-Point)> on the surface of x
Other measurements:
lawn_along()
,
lawn_area()
,
lawn_bbox_polygon()
,
lawn_bbox()
,
lawn_bearing()
,
lawn_center_of_mass()
,
lawn_center()
,
lawn_centroid()
,
lawn_destination()
,
lawn_distance()
,
lawn_envelope()
,
lawn_extent()
,
lawn_line_distance()
,
lawn_midpoint()
,
lawn_pt2line_distance()
,
lawn_square()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # polygon
x <- lawn_random("polygons")
lawn_point_on_feature(x)
# point
x <- lawn_random("points")
lawn_point_on_feature(x)
# linestring
linestring <- '[
[-21.929054, 64.127985],
[-21.912918, 64.134726],
[-21.916007, 64.141016],
[-21.930084, 64.14446]
]'
lawn_point_on_feature(lawn_linestring(linestring))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.