Retrieve OpenStreetMap data for a given location, including the city boundary, the river centreline and surface, the streets, and the railways.
Arguments
- city_name
A character string with the name of the city.
- river_name
A character string with the name of the river.
- crs
An integer with the EPSG code for the projection. If no CRS is specified, the default is the UTM zone for the city.
- buffer
A numeric with the buffer distance in meters. By default, no buffer is applied
Examples
get_osmdata("Bucharest", "Dambovita", buffer = 2000)
#> $bb
#> xmin ymin xmax ymax
#> 25.94150 44.31624 26.25075 44.55940
#>
#> $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 0 features
#> Bounding box: xmin: NA ymin: NA xmax: NA ymax: NA
#> Projected CRS: WGS 84 / UTM zone 35N
#>
#> $streets
#> Simple feature collection with 8368 features and 1 field
#> Geometry type: LINESTRING
#> Dimension: XY
#> Bounding box: xmin: 413508.8 ymin: 4905204 xmax: 442299.3 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 1115 features and 1 field
#> Geometry type: LINESTRING
#> Dimension: XY
#> Bounding box: xmin: 408330 ymin: 4901482 xmax: 456400 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...
#>