Skip to contents

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: 426946.1 ymin: 183801.4 xmax: 427796.1 ymax: 184651.4
#> Projected CRS: NAD83(HARN) / Maryland
#> # A tibble: 24 × 2
#>    fullname                                                             geometry
#>    <chr>                                                          <GEOMETRY [m]>
#>  1 AYRDALE AVE     MULTILINESTRING ((427500.7 184350.6, 427519.8 184401.4, 4275…
#>  2 BERWYN AVE      MULTILINESTRING ((427320.1 184345.5, 427316.2 184354.4, 4272…
#>  3 BONNER ROAD     MULTILINESTRING ((427498.7 183952.1, 427452.1 183933.2), (42…
#>  4 CALLAWAY AVE    MULTILINESTRING ((427649.7 184179.8, 427669.5 184231.9), (42…
#>  5 CARSDALE AVE    MULTILINESTRING ((427140 184486.7, 427142.1 184493.4, 427150…
#>  6 CHATHAM ROAD    LINESTRING (427796.1 184595, 427750.6 184613.7, 427653.8 184…
#>  7 CHELSEA TERR    MULTILINESTRING ((427377.2 183849.8, 427371.9 183861.5), (42…
#>  8 COPLEY ROAD     MULTILINESTRING ((427789 184237.7, 427795.1 184249.4), (4277…
#>  9 DORCHESTER ROAD MULTILINESTRING ((427384.2 184635.1, 427349.6 184635.1, 4273…
#> 10 EGERTON ROAD    MULTILINESTRING ((427732.9 184385.1, 427723 184388.7), (4277…
#> # ℹ 14 more rows