The inputs must contain exactly one object of class SOmap.

SOmerge(..., reproject = TRUE)

Arguments

...

: one or more objects of class SOmap, SOmap_management, or SOmap_legend, or a list of such objects

reproject

logical: if TRUE (the default), and any of the input objects are in a different projection to the input SOmap object, an attempt will be made to reproject them. If you run into problems with SOmerge, try setting this to FALSE

Value

A single object of class SOmap.

Details

Note that objects of class SOmap_auto are not yet supported.

See also

Examples

if (FALSE) { # \dontrun{
  mymap <- SOmap(bathy_legend = "space")
  mylegend <- SOleg(x = runif(100), position = "topright", col = hcl.colors(80, "Viridis"),
                    breaks = c(0.1, 0.2, 0.5, 0.9), trim = -45, label = "Thing",
                    rnd = 1, type = "continuous")
  mymgmt <- SOmanagement(eez = TRUE, basemap = mymap)
  merged <- SOmerge(mymap, mymgmt, mylegend)
  plot(merged)

  ## note that you need to take some care in constructing the component objects
  ##  to ensure their visual consistency

  ## e.g. this will work, but the EEZ layers will extend beyond the map bounds
  mymap <- SOmap(trim = -55)
  mymgmt <- SOmanagement(eez = TRUE, trim = -45) ## note different trim
  plot(SOmerge(mymap, mymgmt))

  ## better to do
  mymap <- SOmap(trim = -55)
  mymgmt <- SOmanagement(eez = TRUE, basemap = mymap)
  plot(SOmerge(mymap, mymgmt))

  ## SOmerge will reproject objects on the fly if needed

  sw_atlantic <- SOmap_auto(c(-70, -20), c(-65, -45), input_points = FALSE, input_lines = FALSE)
  mymap_auto$projection
  ## the EEZs within this region
  sw_atlantic_mgmt <- SOmanagement(eez = TRUE, basemap = sw_atlantic)

  mymap <- SOmap()
  mymap$projection

  ## sw_atlantic_mgmt lies within the bounds of mymap, so we might want to combine them
  ##  even though their projections are different
  merged <- SOmerge(mymap, sw_atlantic_mgmt)
  plot(merged)
} # }