-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOmap_auto to handle target=NULL #50
Comments
that's done, should be library(SOmap)
x <- raster::raster(system.file("nc/reduced.nc", package = "stars"), varname = "sst")
a <- SOmap_auto(x, target = NULL)
a
but I'm getting fig errors on plot ... |
Wowsers, if I don't "rotate()" I get freaky fig errors ... library(SOmap)
#> Loading required package: raster
#> Loading required package: sp
x <- raster::rotate(raster::raster(system.file("nc/reduced.nc", package = "stars"), varname = "sst"))
#> Loading required namespace: ncdf4
a <- SOmap_auto(x, target = NULL)
#> Warning in CPL_proj_direct(as.character(c(from[1], to[1])),
#> as.matrix(pts)): one or more projected point(s) not finite
#> dist is assumed to be in decimal degrees (arc_degrees).
#> although coordinates are longitude/latitude, st_intersection assumes that they are planar
a Created on 2019-06-04 by the reprex package (v0.3.0) |
Was I part of this discussion, I forget. Sounds fun! Is it getting confused by being over the northern hemisphere? |
More examples, found a bug library(SOmap)
#> Loading required package: raster
#> Loading required package: sp
a <- SOmap_auto(ice, target = NULL)
a Created on 2019-06-04 by the reprex package (v0.3.0) |
What is the reason for setting target = NULL? surely that tells it there is no target? |
It tells it to use the input raster grid as-is even if that grid is in longlat. |
Ok so it is not actually target=NULL but target=projection(x) internally. |
If |
Weird output for the new SOmap_auto with class of spatialpointsdataframe library(rgdal)
#> Loading required package: sp
#> rgdal: version: 1.4-4, (SVN revision 833)
#> Geospatial Data Abstraction Library extensions to R successfully loaded
#> Loaded GDAL runtime: GDAL 2.2.3, released 2017/11/20
#> Path to GDAL shared files: C:/Users/dale_mas/Documents/R/R-3.6.0/library/rgdal/gdal
#> GDAL binary built with GEOS: TRUE
#> Loaded PROJ.4 runtime: Rel. 4.9.3, 15 August 2016, [PJ_VERSION: 493]
#> Path to PROJ.4 shared files: C:/Users/dale_mas/Documents/R/R-3.6.0/library/rgdal/proj
#> Linking to sp version: 1.3-1
library(SOmap)
#> Loading required package: raster
#> Registered S3 methods overwritten by 'ggplot2':
#> method from
#> [.quosures rlang
#> c.quosures rlang
#> print.quosures rlang
brokew<-readOGR("C:\\Users\\dale_mas\\Documents\\Projects\\Mapping\\data\\Krill_surveys_EastAntarctica\\Krill_surveys_EastAntarctica\\BROKEWest_transects.shp")
#> OGR data source with driver: ESRI Shapefile
#> Source: "C:\Users\dale_mas\Documents\Projects\Mapping\data\Krill_surveys_EastAntarctica\Krill_surveys_EastAntarctica\BROKEWest_transects.shp", layer: "BROKEWest_transects"
#> with 3890 features
#> It has 6 fields
#> Integer64 fields read as strings: transect segment
plot(brokew) SOmap_auto(brokew)
#> Error in st_cast_sfc_default(x): list item(s) not of class sfg Created on 2019-06-04 by the reprex package (v0.3.0) |
I can't reproduce that, can you print a summary? (or send me the data) library(raster)
print(brokew) |
Also I'm sympathetic to the issue of SOmap being about stereographic. Maybe it's time to take the general stuff out. The issue atm is
It's helpful to write that all down, I want to flow-diagram it. I feel like customizing target in (5) is too much, maybe we shouldn't allow that and just set But, this is functional enough that we should just push through the gg stuff as well, then review. (I just love being able to do anything I want with any input, but it is getting complicated again. If we can seal this off sensibly I'll pull out the general stuff and make "panmap" or something) |
The "fig errors on plot" (second comment, above) are fixed in ceffb43. But there is a lot more discussion here, what do we want to do with it? @mdsumner @Maschette |
Kill it with fire. |
Reminder for the thing we discussed the other day:
SOmap_auto(raster_layer, target = NULL)
should inherittarget
fromraster_layer
, not try and guess its own.The text was updated successfully, but these errors were encountered: