delattrib!
delattrib!(D::GDtype, names::Union{String,Symbol,Vector{<:Union{String,Symbol}}}=String[]; keep::Bool=false) -> GDtype
Remove attributes from a GMTdataset or vector of GMTdataset, in place. Useful, for example, to prune which fields get written when saving to an OGR vector format (gdalwrite/gmtwrite write every attrib key as an output field).
Arguments
D::GDtype: AGMTdatasetor a vector ofGMTdataset. If a vector, every segment is pruned.names: Attribute name(s) to remove. If omitted (or an empty vector), removes ALL attributes.
Keywords
keep::Bool=false: Iftrue, invert the meaning ofnames— keep only those and remove the rest.
Returns
The same D, mutated, for chaining.
Examples
delattrib!(D, "AREA") # drop just "AREA"
delattrib!(D, ["AREA", "PERIMETER"]) # drop several
delattrib!(D, ["NAME", "POP"], keep=true) # keep only these two, drop everything else
delattrib!(D) # wipe all attributesSource Code
This function has multiple methods:
delattrib!(D::GDtype, names::Union{String, Symbol, Vector{<:Union{String, Symbol}}}; keep)- spatial_funs.jl:380delattrib!(D::GDtype; ...)- spatial_funs.jl:380