library(sf)

# overview
ls("package:sf") %>% .[grep("st_", .)]
##  [1] "st_agr"                "st_agr<-"             
##  [3] "st_area"               "st_as_binary"         
##  [5] "st_as_grob"            "st_as_sf"             
##  [7] "st_as_sfc"             "st_as_text"           
##  [9] "st_bbox"               "st_boundary"          
## [11] "st_buffer"             "st_cast"              
## [13] "st_centroid"           "st_combine"           
## [15] "st_contains"           "st_contains_properly" 
## [17] "st_convex_hull"        "st_covered_by"        
## [19] "st_covers"             "st_crosses"           
## [21] "st_crs"                "st_crs<-"             
## [23] "st_difference"         "st_dimension"         
## [25] "st_disjoint"           "st_distance"          
## [27] "st_drivers"            "st_equals"            
## [29] "st_equals_exact"       "st_geometry"          
## [31] "st_geometry<-"         "st_geometrycollection"
## [33] "st_geometry_type"      "st_graticule"         
## [35] "st_interpolate_aw"     "st_intersection"      
## [37] "st_intersects"         "st_is"                
## [39] "st_is_longlat"         "st_is_simple"         
## [41] "st_is_valid"           "st_join"              
## [43] "st_layers"             "st_length"            
## [45] "st_linemerge"          "st_line_sample"       
## [47] "st_linestring"         "st_list"              
## [49] "st_makegrid"           "st_multilinestring"   
## [51] "st_multipoint"         "st_multipolygon"      
## [53] "st_overlaps"           "st_point"             
## [55] "st_polygon"            "st_polygonize"        
## [57] "st_precision"          "st_precision<-"       
## [59] "st_read"               "st_read_db"           
## [61] "st_relate"             "st_segmentize"        
## [63] "st_set_agr"            "st_set_crs"           
## [65] "st_set_precision"      "st_sf"                
## [67] "st_sfc"                "st_simplify"          
## [69] "st_sym_difference"     "st_touches"           
## [71] "st_transform"          "st_triangulate"       
## [73] "st_union"              "st_viewport"          
## [75] "st_voronoi"            "st_within"            
## [77] "st_write"              "st_write_db"          
## [79] "st_zm"
# read data
data <- st_read("../FOSSGIS-workshop/data/ne_10m_airports/ne_10m_airports.shp")
## Reading layer `ne_10m_airports' from data source `/home/gabbo/coding/rosgeo-live/FOSSGIS-workshop/data/ne_10m_airports/ne_10m_airports.shp' using driver `ESRI Shapefile'
## Simple feature collection with 891 features and 10 fields
## geometry type:  POINT
## dimension:      XY
## bbox:           xmin: -175.1356 ymin: -53.78147 xmax: 179.1954 ymax: 78.24672
## epsg (SRID):    4326
## proj4string:    +proj=longlat +datum=WGS84 +no_defs
st_crs(data)
## $epsg
## [1] 4326
## 
## $proj4string
## [1] "+proj=longlat +datum=WGS84 +no_defs"
## 
## attr(,"class")
## [1] "crs"
st_bbox(data)
##       xmin       ymin       xmax       ymax 
## -175.13564  -53.78147  179.19544   78.24672
dim(data)
## [1] 891  11