getbyattrib

getbyattrib(D::Vector{<:GMTdataset}[, index::Bool=false]; kw...)

or

filter(D::Vector{<:GMTdataset}; kw...)

or

findall(D::Vector{<:GMTdataset}; kw...)

Take a GMTdataset vector and return only its elements that match the condition(s) set by the kw keywords. Note, this assumes that D has its attrib fields set with usable information.

NOTE: Instead of getbyattrib one can use instead filter (…, index=false) or findall (…, index=true)

Returns

Either a vector of GMTdataset, or a vector of Int with the indices of the segments that match th query condition. Or nothing if the query results in an empty GMTdataset

Examples

D = filter(D, NAME_2="Porto");
D = filter(D, _region="(-8.0, -7.0, 37.0, 38.0)", _nps=100);

See Also

inwhichpolygon, polygonlevels

Source Code

This function has multiple methods: