to_sf: Transform a fmi_api object into a sf object.

View source: R/to_sf.R

to_sfR Documentation

Transform a fmi_api object into a sf object.

Description

FMI API response object's XML (GML) content is temporarily wrtitten on disk and then immediately read back in into a sf object.

Usage

to_sf(api_obj)

Arguments

api_obj

fmi api object

Value

sf object

Note

For internal use, not exported.

Author(s)

Joona Lehtomäki joona.lehtomaki@iki.fi

See Also

fmi_api

Examples

  ## Not run: 
    response <- fmi_api(request = "getFeature",
                        storedquery_id = "fmi::observations::weather::daily::timevaluepair",
                        starttime = "2019-01-01", endtime = "2019-01-04",
                        fmisid = 100946)
    sf_obj <- to_sf(response)
  
## End(Not run)


rOpenGov/fmi2 documentation built on April 30, 2024, 4:37 a.m.