Get intersections by name and id with option to apply buffer and return streets or edgement of pavement instead of the intersection.
Usage
get_intersection(
street_names = NULL,
id = NULL,
dist = 25,
type = c("area", "edge_of_pavement", "streets"),
trim = TRUE
)
Arguments
- street_names
street names matching one or more of the names from the
named_intersections
data.- id
id values corresponding to one or more id values from the
named_intersections
data.- dist
buffer distance in meters. Optional.
- type
Type of data to return. "area" returns the intersection center if
dist
is 0 or a circle centered on the intersection center with any positive dist value. "edge_of_pavement" or "streets" return what either the cached edge of pavement data or street center line data.- trim
If type is "edge_of_pavement" or "streets" and
trim
is TRUE return data trimmed to the buffered intersection, otherwise return data within bounding box, Default: TRUE
Value
Intersection center point, buffered area around intersection center, streets, or edge of pavement data.
Examples
get_intersection(street_names = "Overton St & S Chapelgate Lane", dist = 30)
#> Simple feature collection with 1 feature and 2 fields
#> Geometry type: POLYGON
#> Dimension: XY
#> Bounding box: xmin: 425908.6 ymin: 178921.1 xmax: 425968.6 ymax: 178981.1
#> Projected CRS: NAD83(HARN) / Maryland
#> id name geometry
#> 1 74958 OVERTON ST & S CHAPELGATE LANE POLYGON ((425968.6 178951.1...
get_intersection(id = "41758", dist = 425, type = "streets", trim = FALSE)
#> Simple feature collection with 24 features and 1 field
#> Geometry type: GEOMETRY
#> Dimension: XY
#> Bounding box: xmin: -8536815 ymin: 4767901 xmax: -8535714 ymax: 4769007
#> Projected CRS: WGS 84 / Pseudo-Mercator
#> # A tibble: 24 × 2
#> fullname geometry
#> <chr> <GEOMETRY [m]>
#> 1 AYRDALE AVE MULTILINESTRING ((-8536096 4768614, -8536071 4768680, -85360…
#> 2 BERWYN AVE MULTILINESTRING ((-8536330 4768609, -8536335 4768620, -85363…
#> 3 BONNER ROAD MULTILINESTRING ((-8536101 4768098, -8536161 4768074), (-853…
#> 4 CALLAWAY AVE MULTILINESTRING ((-8535905 4768392, -8535879 4768460), (-853…
#> 5 CARSDALE AVE MULTILINESTRING ((-8536561 4768793, -8536559 4768801, -85365…
#> 6 CHATHAM ROAD LINESTRING (-8535714 4768930, -8535773 4768954, -8535897 476…
#> 7 CHELSEA TERR MULTILINESTRING ((-8536258 4767966, -8536265 4767981), (-853…
#> 8 COPLEY ROAD MULTILINESTRING ((-8535725 4768467, -8535717 4768482), (-853…
#> 9 DORCHESTER ROAD MULTILINESTRING ((-8536246 4768984, -8536290 4768984, -85363…
#> 10 EGERTON ROAD MULTILINESTRING ((-8535797 4768658, -8535809 4768663), (-853…
#> # ℹ 14 more rows