lawn_point_on_feature: Get a point on the surface of a feature

Description Usage Arguments Details Value See Also Examples

View source: R/point_on_surface.R

Description

Finds a data-Point guaranteed to be on the surface of data-GeoJSON object.

Usage

1

Arguments

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: FALSE

Details

What will be returned?

Value

A data-Feature<(data-Point)> on the surface of x

See Also

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()

Examples

 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))

lawn documentation built on Jan. 6, 2021, 5:07 p.m.