geom_col_name returns a single value for the name of the geometry column for the WFS layer selected in the vicmap_promise object (e.g. SHAPE). This column will become the geometry column when using collect(). feature_cols() provides a vector of all column names for the WFS layer selected in the vicmap_promise object and get_col_df() returns a data.frame with the column names and their XML schema string datatypes.

geom_col_name(x)

feature_cols(x)

get_col_df(x)

Arguments

x

object of class vicmap_promise

Value

character/data.frame

Examples

# \donttest{
# Return the name of the geometry column
vicmap_query(layer = "open-data-platform:hy_watercourse") %>% 
  geom_col_name()
#> [1] "geom"
 # }
# \donttest{
# Return the column names as a character vector
vicmap_query(layer = "open-data-platform:hy_watercourse") %>% 
  feature_cols()
#>  [1] "ufi"                     "pfi"                    
#>  [3] "feature_type_code"       "named_feature_id"       
#>  [5] "origin"                  "construction"           
#>  [7] "usage"                   "hierarchy"              
#>  [9] "auth_org_code"           "auth_org_id"            
#> [11] "auth_org_verified"       "feature_quality_id"     
#> [13] "task_id"                 "create_date_pfi"        
#> [15] "superceded_pfi"          "feature_ufi"            
#> [17] "feature_create_date_ufi" "create_date_ufi"        
#> [19] "geom"                   
# }   
# \donttest{
# Return a data.frame of the columns and their XML schema string datatypes
try(
vicmap_query(layer = "open-data-platform:hy_watercourse") %>% 
  get_col_df()
  )
#>                       name                  type
#> 1                      ufi               xsd:int
#> 2                      pfi               xsd:int
#> 3        feature_type_code            xsd:string
#> 4         named_feature_id               xsd:int
#> 5                   origin            xsd:string
#> 6             construction            xsd:string
#> 7                    usage            xsd:string
#> 8                hierarchy            xsd:string
#> 9            auth_org_code            xsd:string
#> 10             auth_org_id            xsd:string
#> 11       auth_org_verified          xsd:dateTime
#> 12      feature_quality_id               xsd:int
#> 13                 task_id               xsd:int
#> 14         create_date_pfi          xsd:dateTime
#> 15          superceded_pfi               xsd:int
#> 16             feature_ufi               xsd:int
#> 17 feature_create_date_ufi          xsd:dateTime
#> 18         create_date_ufi          xsd:dateTime
#> 19                    geom gml:CurvePropertyType
 # }