Retrieve OpenStreetMap data for a given location, including the city boundary, the river centreline and surface, the streets, and the railways.
Examples
bb <- get_osm_bb("Bucharest")
crs <- get_utm_zone(bb)
get_osmdata(bb, "Bucharest", "Dambovita", crs)
#> $bb
#> xmin ymin xmax ymax
#> 25.96667 44.33425 26.22558 44.54140
#>
#> $boundary
#> Geometry set for 1 feature
#> Geometry type: MULTIPOLYGON
#> Dimension: XY
#> Bounding box: xmin: 417769.7 ymin: 4909348 xmax: 438364 ymax: 4932424
#> Projected CRS: WGS 84 / UTM zone 35N
#> MULTIPOLYGON (((427347.8 4913289, 427386.6 4913...
#>
#> $river_centerline
#> Geometry set for 0 features
#> Bounding box: xmin: NA ymin: NA xmax: NA ymax: NA
#> Projected CRS: WGS 84 / UTM zone 35N
#>
#> $river_surface
#> Geometry set for 1 feature (with 1 geometry empty)
#> Geometry type: GEOMETRYCOLLECTION
#> Dimension: XY
#> Bounding box: xmin: NA ymin: NA xmax: NA ymax: NA
#> Projected CRS: WGS 84 / UTM zone 35N
#> GEOMETRYCOLLECTION EMPTY
#>
#> $streets
#> Simple feature collection with 7906 features and 1 field
#> Geometry type: LINESTRING
#> Dimension: XY
#> Bounding box: xmin: 416680.4 ymin: 4907294 xmax: 439997 ymax: 4938941
#> Projected CRS: WGS 84 / UTM zone 35N
#> First 10 features:
#> type geometry
#> 1349 tertiary LINESTRING (427899.3 492440...
#> 1467 tertiary LINESTRING (427853.8 492445...
#> 1760 primary LINESTRING (427348.7 492401...
#> 1915 primary LINESTRING (432042.4 491860...
#> 2955804 tertiary LINESTRING (432099.2 491999...
#> 3039873 primary LINESTRING (435628.7 492117...
#> 3043515 secondary LINESTRING (425064.1 491877...
#> 3043519 primary LINESTRING (425537.9 491747...
#> 3043522 tertiary LINESTRING (425078.3 491876...
#> 3058607 primary LINESTRING (426355.1 492506...
#>
#> $railways
#> Simple feature collection with 1032 features and 1 field
#> Geometry type: LINESTRING
#> Dimension: XY
#> Bounding box: xmin: 408330 ymin: 4901482 xmax: 439360.8 ymax: 4937371
#> Projected CRS: WGS 84 / UTM zone 35N
#> First 10 features:
#> type geometry
#> 4902946 rail LINESTRING (425916.8 492225...
#> 13242940 rail LINESTRING (417865.3 493110...
#> 14449609 rail LINESTRING (426605.8 492626...
#> 14449614 rail LINESTRING (426663.4 492628...
#> 14449620 rail LINESTRING (427060.1 492640...
#> 14449623 rail LINESTRING (429683.8 492635...
#> 15238558 rail LINESTRING (425642.6 492596...
#> 15238565 rail LINESTRING (424190.9 492513...
#> 15238574 rail LINESTRING (425392.8 492588...
#> 15243277 rail LINESTRING (435989.3 491190...
#>