as_osmar_sp: Convert sp object to an osmar object

Description Usage Arguments Value See Also Examples

Description

Functions to convert a given sp object to osmar infrastructure and objects.

Usage

1
2
  ## S3 method for class 'Spatial'
 as_osmar_bbox(obj, ...)

Arguments

obj

A Spatial object

...

Ignored

Value

A bbox object

See Also

Other as_osmar_bbox: as_osmar_bbox, center_bbox, corner_bbox

Examples

1
2
3
4
data("muc", package = "osmar")
  muc_points <- as_sp(muc, "points")
  bbox(muc_points)           # sp::bbox object
  as_osmar_bbox(muc_points)  # osmar::bbox object

Example output

Loading required package: XML
Loading required package: RCurl
Loading required package: bitops
Loading required package: geosphere
Loading required package: sp

Attaching package: 'osmar'

The following object is masked from 'package:utils':

    find

NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files
         min      max
lon 11.56647 11.58206
lat 48.13488 48.14304
    left   bottom    right      top 
11.56647 48.13488 11.58206 48.14304 
attr(,"class")
[1] "bbox"

osmar documentation built on May 1, 2019, 7:33 p.m.

Related to as_osmar_sp in osmar...