Closed rmendels closed 2 years ago
Okay I have an answer to this for now. I wrote to the fellow who developed the SF package. He didn't think it was possible at the moment. I pointed out to him the worldhires2 dataset in mapdata. See emails below.
-Roy
Thanks for the reply. I had a feeling that was the case. You can cross the dateline in several programs , if instead of using world hires in mandate you use worldhires2, you can. There at least was a bug in worldhires2 that required trimming of some countries.
See https://rmendels.github.io/Using_rerddap.nb.html and scroll down to where it says "Temperature at 70m in the north Pacific from the SODA model output" and look at the plot there.
-Roy
On Apr 27, 2017, at 4:11 PM, Edzer Pebesma edzer.pebesma@uni-muenster.de wrote:
I don't think you can currently do this. Was this possible with sp, or some maptools tricks on sp objects?
On 28/04/17 01:07, Roy Mendelssohn - NOAA Federal wrote: Lat-lon
Thanks
Roy
On Thursday, April 27, 2017, Edzer Pebesma <edzer.pebesma@uni-muenster.de mailto:edzer.pebesma@uni-muenster.de> wrote:
You mean, long lat coordinates, or projected coordinates?
On 27/04/17 17:32, Roy Mendelssohn - NOAA Federal wrote: I am wondering if the SF package is able to do plots that cross the dateline. If so can you give me an example?
Thans,
-Roy
@sckott @cpsievert @edzer @rmendels
Thanks to Edzer Pebesma who wrote the SF package, there does appear to be a fix. See conversation below.
-Roy
Great, thanks!
On 28/04/17 13:53, Roger Bivand wrote: Using rworldmap (I helped Andy 10 years ago):
library(rworldmap) data(countriesLow) library(maptools) cLowRC <- nowrapRecenter(countriesLow) bbox(cLowRC) plot(cLowRC, xlim=c(135, 240), ylim = c(20, 60), axes=TRUE)
@Roy: the sf way would be sth like
library(sf) plot(st_as_sf(cLowRC), xlim=c(135, 240), ylim = c(20, 60), axes=TRUE)
seems to work, as does:
library(maptools) data(wrld_simpl) cLowRC <- nowrapRecenter(wrld_simpl, avoidGEOS=TRUE) bbox(cLowRC) plot(cLowRC, xlim=c(135, 240), ylim = c(20, 60), axes=TRUE)
(wrld_simpl has a "Ring Self-intersection" GEOS error, the fallback uses the polyclip package).
Hope this helps,
Roger
On Fri, 28 Apr 2017, Edzer Pebesma wrote:
Hi Roger,
is there somewhere in sp-verse a prepared world dataset on [0,360] that doesn't plot the horizontal lines, and doesn't deselect countries straddling the zero meridian as in the example below?
@sckott @cpsievert @edzer @rmendels
Just for your info, I just upgraded to R3.4, and am now having problems with SF. There is no SF binary for R3.4, and R3.4 uses a different C compiler, that you have to install, so now though I have a gdal-config that should be in the search path, building from source fails (see below).
Any advice on what commands to give to get it to compile would be appreciated.
Thanks,
-Roy
Installation failed: NULL : callr failed: installing source* package ‘sf’ ... configure: error: gdal-config not found or not executable. ERROR: configuration failed for package ‘sf’
I'll contact SU / CRAN regarding the broken binary build on osx; for your source build, the discussion here might be useful, there was a similar report recently. (I assume on the command line gdal-config
is available?) @rsbivand @s-u
Thanks, I don't know enough to build it myself using "R Cmd" . On the command line I have gdal installed by Fink, so it is at /sw/bin/gdal-config. If someone can tell me how to pass that information to the build command that would probably just do the trick. I tried to just copy over the folder from 3.3, but that crashed.
-Roy
On May 1, 2017, at 11:49 AM, Edzer Pebesma notifications@github.com wrote:
I'll contact SU / CRAN regarding the broken binary build on osx; for your source build, the discussion here might be useful, there was a similar report recently. (I assume on the command line gdal-config is available?) @rsbivand @s-u
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center Note new street address 110 McAllister Way Santa Cruz, CA 95060 Phone: (831)-420-3666 Fax: (831) 420-3980 e-mail: Roy.Mendelssohn@noaa.gov www: http://www.pfeg.noaa.gov/
"Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
Please see this issue.
Seems like
R CMD INSTALL sf_xx.yy.tar.gz --configure-args='--with-gdal-config=/path/to/gdal-config'
should do it.
Thanks. I noticed that it wants geos-config also. I have all that installed by kyngchaos in a framework, but I will point to those and see what happens. But I have some training to take, so may not be till tomorrow/
-Roy
On May 1, 2017, at 12:00 PM, Edzer Pebesma notifications@github.com wrote:
Please see this issue.
Seems like
R CMD INSTALL sf_xx.yy.tar.gz --configure-args='--with-gdal-config=/path/to/gdal-config' should do it.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center Note new street address 110 McAllister Way Santa Cruz, CA 95060 Phone: (831)-420-3666 Fax: (831) 420-3980 e-mail: Roy.Mendelssohn@noaa.gov www: http://www.pfeg.noaa.gov/
"Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
I think building SF under R3.4 has problems due to the new requirement for function registration. Sort of reached the point where I was spinning wheels. Used RSwtich to switch back to R3.3.3
-Roy
On May 1, 2017, at 12:14 PM, Roy Mendelssohn notifications@github.com wrote:
Thanks. I noticed that it wants geos-config also. I have all that installed by kyngchaos in a framework, but I will point to those and see what happens. But I have some training to take, so may not be till tomorrow/
-Roy
On May 1, 2017, at 12:00 PM, Edzer Pebesma notifications@github.com wrote:
Please see this issue.
Seems like
R CMD INSTALL sf_xx.yy.tar.gz --configure-args='--with-gdal-config=/path/to/gdal-config' should do it.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center Note new street address 110 McAllister Way Santa Cruz, CA 95060 Phone: (831)-420-3666 Fax: (831) 420-3980 e-mail: Roy.Mendelssohn@noaa.gov www: http://www.pfeg.noaa.gov/
"Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center Note new street address 110 McAllister Way Santa Cruz, CA 95060 Phone: (831)-420-3666 Fax: (831) 420-3980 e-mail: Roy.Mendelssohn@noaa.gov www: http://www.pfeg.noaa.gov/
"Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
I don't think so, it would have showed up on the package check results page.
Thanks. I can't work on this today,, will try to get back to it tomorrow I do notice that there is no SF Mac OS X binary for 3.4, that an error is being thrown (per the package check results)
-Roy
On May 1, 2017, at 10:22 PM, Edzer Pebesma notifications@github.com wrote:
I don't think so, it would have showed up on the package check results page.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center Note new street address 110 McAllister Way Santa Cruz, CA 95060 Phone: (831)-420-3666 Fax: (831) 420-3980 e-mail: Roy.Mendelssohn@noaa.gov www: http://www.pfeg.noaa.gov/
"Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
We're working on this. Looks as if lots of binary cran packages with external dependencies currently fail or are broken.
Yes, which is why I reverted to 3.3.3. But for some things I am working on, as well as the plotdap() stuff, I want to test that it is working on 3.4. Can you let me know when there is Mac binary version available for 3.4? That would be a big help.
BTW - SF is very nice, thanks for doing that package, and I really like what Carson has done with plotdap() using it.
-Roy
On May 2, 2017, at 7:24 AM, Edzer Pebesma notifications@github.com wrote:
We're working on this. Looks as if lots of binary cran packages with external dependencies currently fail or are broken.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center Note new street address 110 McAllister Way Santa Cruz, CA 95060 Phone: (831)-420-3666 Fax: (831) 420-3980 e-mail: Roy.Mendelssohn@noaa.gov www: http://www.pfeg.noaa.gov/
"Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
Sure, no probs.
I noticed this morning that SF appears to be passing the tests on the Mac now (https://cran.r-project.org/web/checks/check_results_sf.html) but don't see binary on CRAN. Is that just a delay in getting it to the mirrors (I have never been able to totally understand the mysterious ways of CRAN).
Thanks,
-Roy
On May 2, 2017, at 7:28 AM, Edzer Pebesma notifications@github.com wrote:
Sure, no probs.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center Note new street address 110 McAllister Way Santa Cruz, CA 95060 Phone: (831)-420-3666 Fax: (831) 420-3980 e-mail: Roy.Mendelssohn@noaa.gov www: http://www.pfeg.noaa.gov/
"Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
Binaries are back, now; haven't tried them out yet but should be OK, thanks to Simon Urbanek & Brian Ripley. https://github.com/edzer/sfr/issues/327
I was able to get everything needed installed for 3.4, and successfully ran some of the example in add_griddap and add_tabledap.
Nice, thanks.
-Roy
On May 3, 2017, at 9:36 AM, Edzer Pebesma notifications@github.com wrote:
Binaries are back, now; haven't tried them out yet but should be OK, thanks to Simon Urbanek & Brian Ripley. edzer/sfr#327
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center Note new street address 110 McAllister Way Santa Cruz, CA 95060 Phone: (831)-420-3666 Fax: (831) 420-3980 e-mail: Roy.Mendelssohn@noaa.gov www: http://www.pfeg.noaa.gov/
"Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
This plot stops at the dateline, it should not
dataInfo <- rerddap::info('hawaii_d90f_20ee_c4cb') xpos <- c(135.25, 240.25) ypos <- c(20.25, 60.25) zpos <- c(70.02, 70.02) tpos <- c('2010-12-15', '2010-12-15') soda70 <- griddap(dataInfo, longitude = xpos, latitude = ypos, time = tpos, depth = zpos, fields = 'temp' )
add_griddap(plotdap(), soda70, ~temp, maxpixels = 50000)
Plot stops at the dateline