ogr2ogr

function gdalgrid(indata, opts::Union{String, Vector{String}}=““; dest=”/vsimem/tmp”, method::Union{AbstractString, Symbol}=““, kwargs…) if (method ==”“) _mtd = “-a invdist:nodata=NaN” else _mtd = isa(method, Symbol) ? string(method) : method (!startswith(_mtd, “invdist”) && !startswith(_mtd, “invdistnn”) && !startswith(_mtd, “average”) && !startswith(_mtd, “nearest”) && !startswith(_mtd, “linear”) && !startswith(_mtd, “minimum”) && !startswith(_mtd, “maximum”) && !startswith(_mtd, “range”) && !startswith(_mtd, “count”) && !startswith(_mtd, “average_distance”) && !startswith(_mtd, “average_distance_pts”)) && error(“Bad interpolation algorithm $_mtd”) _mtd = “-a” * _mtd !occursin(“nodata”, _mtd) && (_mtd *= “:nodata=NaN”) end _opts = isa(opts, Vector) ? join(opts, ” “) : opts # Let’s make a string to reduce confusion !occursin(”-ot”, _opts) && (_opts *= ” -ot Float32”) _mtd = ” ” _opts helper_run_GDAL_fun(gdalgrid, indata, dest, _mtd, ““, kwargs…) end

—————————————————————————————————

““” ogr2ogr(indata, options=String[]; dest=“/vsimem/tmp”, kwargs…)

Parameters

  • indata: The source dataset.
  • options: List of options (potentially including filename and open options). The accepted options are the ones of the gdalwarp utility.
  • kw: are kwargs that may contain the GMT region (-R), proj (-J), inc (-I) and save=fname options. It may also contain a options=... argument that is equivalent to the options positional argument, with the exception that the value may also be a Tuple.

Returns

A GMT dataset, or a GDAL dataset (or nothing if file was writen on disk).