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 = "datavic:VMHYDRO_WATERCOURSE_DRAIN") %>% 
  geom_col_name()
#> [1] "SHAPE"
 # }
# \donttest{
# Return the column names as a character vector
vicmap_query(layer = "datavic:VMHYDRO_WATERCOURSE_DRAIN") %>% 
  feature_cols()
#>  [1] "COUPEID"          "OBJECTID"         "AREA_NAME"        "DFW_TYPE"        
#>  [5] "AUTHOR"           "EDIT_DATE"        "STATUS"           "SITEACCESS"      
#>  [9] "COMMENTS"         "OPEN_DATE"        "CLOSE_DATE"       "REGION"          
#> [13] "DISTRICT"         "LEGL_NUM"         "SF_NAME"          "NEAR_TOWN_1"     
#> [17] "NEAR_TOWN_2"      "NEAR_TOWN_3"      "VOLUME"           "PBURN"           
#> [21] "RESTRICTIONS"     "ROAD_NAME"        "SE_ANNO_CAD_DATA" "UFI"             
#> [25] "UFI_CREATED"      "SHAPE"           
# }   
# \donttest{
# Return a data.frame of the columns and their XML schema string datatypes
try(
vicmap_query(layer = "datavic:VMHYDRO_WATERCOURSE_DRAIN") %>% 
  get_col_df()
  )
#>                name                  type
#> 1           COUPEID            xsd:string
#> 2          OBJECTID           xsd:decimal
#> 3         AREA_NAME            xsd:string
#> 4          DFW_TYPE            xsd:string
#> 5            AUTHOR            xsd:string
#> 6         EDIT_DATE          xsd:dateTime
#> 7            STATUS            xsd:string
#> 8        SITEACCESS            xsd:string
#> 9          COMMENTS            xsd:string
#> 10        OPEN_DATE          xsd:dateTime
#> 11       CLOSE_DATE          xsd:dateTime
#> 12           REGION            xsd:string
#> 13         DISTRICT            xsd:string
#> 14         LEGL_NUM            xsd:string
#> 15          SF_NAME            xsd:string
#> 16      NEAR_TOWN_1            xsd:string
#> 17      NEAR_TOWN_2            xsd:string
#> 18      NEAR_TOWN_3            xsd:string
#> 19           VOLUME            xsd:string
#> 20            PBURN            xsd:string
#> 21     RESTRICTIONS            xsd:string
#> 22        ROAD_NAME            xsd:string
#> 23 SE_ANNO_CAD_DATA         xsd:hexBinary
#> 24              UFI           xsd:decimal
#> 25      UFI_CREATED          xsd:dateTime
#> 26            SHAPE gml:PointPropertyType
 # }