Helper to simplify_idaifield()
. Traces the liesWithin fields to
find the one that is a Layer and returns the corresponding identifier.
Usage
find_layer(
ids,
uidlist = NULL,
layer_categories = NULL,
max_depth = 20,
silent = FALSE,
id = NULL,
id_type = NULL
)
Arguments
- ids
Either the UUIDs or the identifiers resources from an
idaifield_...
-list as returned byget_idaifield_docs()
,idf_query()
,idf_index_query()
oridf_json_query()
.- uidlist
A data.frame as returned by
get_field_index()
orget_uid_list()
.- layer_categories
A vector of categories that are classified as Layers. (Encompasses SurveyUnit.) See or change the default:
getOption("idaifield_categories")$layers
- max_depth
numeric. Maximum number of recursive iterations / maximum depth a resource may be nested below its layer.
- silent
TRUE/FALSE, default: FALSE. Should messages be suppressed?
- id
DEPRECATED. Either the UUID or the identifier of a resource from an
idaifield_...
-list as returned byget_idaifield_docs()
,idf_query()
,idf_index_query()
oridf_json_query()
.- id_type
DEPRECATED.
Value
The identifier or UUID of the first "Layer"-category resource the given id/identifier lies within.
See also
This function is used by:
simplify_idaifield()
,get_field_index()
,get_uid_list()
.
Examples
if (FALSE) {
conn <- connect_idaifield(pwd = "hallo", project = "rtest")
index <- get_field_index(conn)
# For a nested Find:
index[which(index$identifier == "Befund_1_InschriftAufMünze"), ]
find_layer("Befund_1_InschriftAufMünze", index)
# For all resources:
find_layer(index$identifier, index)
}