R/read_hydrography_bg.R

Defines functions read_hydrography_bg

Documented in read_hydrography_bg

#' Hydrography
#'
#' Function returns the hydrography of the municipality of Bage
#' 
#' @export
#' @family general area functions
#' @examples \dontrun{
#'
#' library(geobage)
#'
#'   c <- read_hydrography_bg()
#'
#' }
read_hydrography_bg <- function(){
  objeto <- geojsonio::geojson_read("https://raw.githubusercontent.com/GeoInformacao/filesGeoJSONgeobage/main/HIDROGRAFIA.geojson",what = "sp")
  # Criando um objeto Simple Feature (sf) com coordenadas geometricas
  objeto <- sf::st_as_sf(objeto, coords(list(c('long', 'lat')), group_by(objeto$id)))
  objeto
}
Prof-Rodrigo-Silva/geobage documentation built on July 27, 2022, 2:14 p.m.