wfsfilteraux: Auxiliary functions to create filters

wfsfilterauxR Documentation

Auxiliary functions to create filters

Description

  • The function build_filter creates a filter for the indicated version by inserting the appropriate 'xmlns' urls in the Filter tag and inserting the XML elements from the ... argument i.e. all arguments except version and sep. While evaluating these elements the version and separator are temporarily set to the arguments version and sep of build_filter unless explicitly overwritten.

  • The function propeq_xml creates a PropertyIsEqualTo XML clause

  • The function propertyname_xml creates a PropertyName or ValueReference XML clause

  • The function bbox_xml creates a BBOX XML clause

Usage

build_filter(..., version = WFS_get_version(), sep = WFS_get_sep())

propertyname_xml(propname, version, nopref = T)

propeq_xml(propname, propvalue, version = WFS_get_version())

bbox_xml(gemprop, crs_in, coords, version = WFS_get_version())

Arguments

...

XML elements to be added to filter

version

Character string with the WFS request version

sep

NULL for the default separator (set by WFS_set_sep()) or required separator otherwise

propname

Character string with the PropertyName (1.1.0) or ValueReference (2.0.0)

nopref

Logical scalar indicating the 'ogc:' pref is not to be used in propertyname_xml

propvalue

Character string to filter with

gemprop

Character string with the name of the geometric field

crs_in

Character string with the name of the input crs (e.g. "EPSG:4326" )

coords

Numeric vector with four elements indicating the bounding box

Value

Character vector with the created filter or xml fragment.

Examples

bbox_28992 <- c(119103, 480726, 119160, 481078)
f1 <- build_filter(version='1.1.0',
   fg("And"
       , propeq_xml('topp:boom_omschrijf',"Alnus glutinosa 'Laciniata'")
       , bbox_xml("geometrie","EPSG:28992",bbox_28992)
     )
  )
bbox_4326 <- convert_bbox(bbox_28992,"EPSG:28992","EPSG:4326")
f2 <- build_filter(version='2.0.0',
   fg("And"
       , propeq_xml('topp:boom_omschrijf',"Alnus glutinosa 'Laciniata'")
       , bbox_xml("geometrie","EPSG:4326",bbox_4326)
     )
  )
pn_construct <- propertyname_xml('han','2.0.0',nopref =F)

HanOostdijk/HOQCwfs documentation built on March 6, 2023, 8:18 a.m.