AustralianAntarcticDivision / SOmap

Southern Ocean round maps
https://australianantarcticdivision.github.io/SOmap/
24 stars 6 forks source link

SOmap_auto doesn't plot Spatial objects #89

Closed raymondben closed 4 years ago

raymondben commented 4 years ago

Another one, sorry - should I expect the fronts to be plotted here?

library(SOmap)
mydata <- SOmap_data$fronts_orsi
#> Loading required package: raster
#> Loading required package: sp
SOmap_auto(mydata, target = "laea", centre_lon = 147, input_points = FALSE, lcol = 2)
#> Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO"): Discarded datum WGS_1984 in CRS definition,
#>  but +towgs84= values preserved

Created on 2020-07-06 by the reprex package (v0.3.0)

mdsumner commented 4 years ago

atm I can't build the package?

image

I am seeing some weird stuff with a fresh check out too, like files that show up modified when switching branches - but the lzma error there is showstopper in dev-0.6 - any ideas?

mdsumner commented 4 years ago

But, actually no I think SOmap_auto() only uses the data to set up the plot. That's a bit weird of course, but it was on purpose (not sure I had a good reason, though but at this stage I think it's best to leave this alone).

raymondben commented 4 years ago

lzma error - hm, not sure about that. It's an error reading an xz-compressed file, I know that much, so presumably the SOmap_data.rda file in the data directory is causing problems (Travis shows the same error). Maybe I try regenerating the .rda file without specifying xz-compression for now? (The other data files aren't xz-compressed AFAIK)

raymondben commented 4 years ago
  1. lzma error was because git changing the line endings was corrupting the rda file. Changes .gitattributes to tell it that rda and png files are binary
  2. this SOmap_auto example comes from the readme, and it used to plot the fronts, see e.g. https://github.com/AustralianAntarcticDivision/SOmap/blob/3762676369c3d35fd0694482d7289885652fda7f/man/figures/README-automap-spatial-1.png This seems to have changed in early 2019. I am happy to abandon auto-plotting of spatial objects this way, and only have it auto-plot lon/lat data. It doesn't auto-plot raster objects either, so that behaviour would be consistent. Let me know if you are happy with that and I will update docs/readme
mdsumner commented 4 years ago

Oh right, memory fail then. I think let's go with change the docs/readme and can revisit.

I guess the line ending thing was me ...

raymondben commented 4 years ago

docs/readme changed https://github.com/AustralianAntarcticDivision/SOmap/commit/ce08c2a6571b8e18848e5366a207893b92e161a9