View source: R/point_pt2line_distance.R
lawn_pt2line_distance | R Documentation |
Returns the minimum distance between a data-Point and a data-LineString, being the distance from a line the minimum distance between the point and any segment of the LineString.
lawn_pt2line_distance( point, line, units = "kilometers", mercator = FALSE, lint = FALSE )
point |
(data-Feature<(data-Point)>) feature or geometry |
line |
Line to measure, a data-Feature<(data-LineString)>, or data-FeatureCollection<(data-LineString)> |
units |
(character) Can be degrees, radians, miles, or kilometers (default) |
mercator |
(logical) if distance should be on Mercator or WGS84
projection. Default: |
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: |
distance between point and line (numeric)
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_point_on_feature()
,
lawn_square()
pt <- lawn_point("[0, 0]") ln <- lawn_linestring("[[1, 1],[-1, 1]]") lawn_pt2line_distance(pt, ln) lawn_pt2line_distance(pt, ln, mercator = TRUE) lawn_pt2line_distance(pt, ln, 'miles') lawn_pt2line_distance(pt, ln, 'radians') lawn_pt2line_distance(pt, ln, 'degrees') lawn_pt2line_distance(pt, ln, mercator = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.