Proj not projecting properly on maps

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Proj not projecting properly on maps

R-sig-geo mailing list
Hi all, I apologise for the simple question, but really unsure how to
proceed given the error message. I make lots of animated movement maps
using the package MoveVis. Normally, I set up my animated date frame like
this:

ocs_ani_move = df2move(ocs.ani,
       * proj = "+init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs
+ellps=WGS84 +towgs84=0,0,0",*
        x = "Longitude", y = "Latitude", time = "Local.Date.Time", track_id
= "shark1" )

I am now getting this error when I do: CRS object has comment, which is
lost in output.Discarded ellps WGS 84 in CRS definition: +proj=merc
+a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m
+nadgrids=@null +wktext +no_defsDiscarded datum WGS_1984 in CRS definition.

Could any please tell me what to input for 'proj" I have read the most
recent vignettes and am aware that changes have been made, but unsure what
is the equivalent to my previous code.

Many thanks,

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Proj not projecting properly on maps

Roger Bivand
Administrator
Please provide the output of sessionInfo() to show your platform, and the complete context of the message, which is issued by rgdal as a warning, not an error. If you see it as an error, also provide the output of traceback(), and options("warn"). If that is 2, you have opted to treat all warnings as errors.

Can anyone check MoveVis with a standard data set and post it here, to see what is going on?

Roger

-------
Roger Bivand
Norwegian School of Economics, Bergen, Norway
[hidden email]

________________________________
Fra: R-sig-Geo <[hidden email]> p� vegne av Molly Scott - NOAA Affiliate via R-sig-Geo <[hidden email]>
Sendt: tirsdag 16. juni 2020, 21:52
Til: [hidden email]
Emne: [R-sig-Geo] Proj not projecting properly on maps

Hi all, I apologise for the simple question, but really unsure how to proceed given the error message. I make lots of animated movement maps using the package MoveVis. Normally, I set up my animated date frame like this: ocs_ani_move = df2move(ocs.ani, * proj = "+init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0",* x = "Longitude", y = "Latitude", time = "Local.Date.Time", track_id = "shark1" ) I am now getting this error when I do: CRS object has comment, which is lost in output.Discarded ellps WGS 84 in CRS definition: +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defsDiscarded datum WGS_1984 in CRS definition. Could any please tell me what to input for 'proj" I have read the most recent vignettes and am aware that changes have been made, but unsure what is the equivalent to my previous code. Many thanks, [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list [hidden email] https://stat.ethz.ch/mailman/listinfo/r-sig-geo

        [[alternative HTML version deleted]]


_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: Proj not projecting properly on maps

Roger Bivand
Administrator
Using the df2move example:

> df2move(move_df,
+              proj = "+init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0",
+              x = "coords.x1", y = "coords.x2", time = "timestamps", track_id = "trackId")
class       : MoveStack
features    : 458
extent      : 8.905824, 8.991679, 47.72762, 47.76816  (xmin, xmax, ymin, ymax)
crs         : +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs
variables   : 3
names       :                x,                y,             time
min values  : 8.90582370470083, 47.7276175163588, 1526367599.63629
max values  : 8.99167919359875, 47.7681647469332, 1526412899.54452
timestamps  : 2018-05-15 06:59:59 ... 2018-05-15 19:34:59 Time difference of 13 hours  (start ... end, duration)
sensors     : unknown
indiv. data :  
individuals : T246a, T342g, T932u
date created: 2020-06-06 15:52:40
Warning messages:
1: In showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum WGS_1984 in CRS definition,
 but +towgs84= values preserved
2: In showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum WGS_1984 in CRS definition,
 but +towgs84= values preserved
3: In showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum WGS_1984 in CRS definition,
 but +towgs84= values preserved
4: In showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum WGS_1984 in CRS definition,
 but +towgs84= values preserved
5: In FUN(X[[i]], ...) : CRS object has comment, which is lost in output
6: In FUN(X[[i]], ...) : CRS object has comment, which is lost in output
7: In FUN(X[[i]], ...) : CRS object has comment, which is lost in output
8: In proj4string(x) : CRS object has comment, which is lost in output


which are all warnings by design. They are not errors, and will not manifest as errors unless the warn option has been reset from default.

The example on the help page is very misleading and the maintainer should update it ASAP; the warnings are being generated from repeated calls to CRS checking functions.

Why is rgdal with new PROJ and GDAL warning users? Because in some cases the output transformations may be degraded, so users need to check the output positions. sf and rgdal have taken steps to avoid this, but we cannot rule out the possibility that scripts rely on the defunct Proj4 string representation.

Roger

--
Roger Bivand
Norwegian School of Economics
Helleveien 30, 5045 Bergen, Norway
[hidden email]


________________________________________
Fra: R-sig-Geo <[hidden email]> på vegne av Roger Bivand <[hidden email]>
Sendt: tirsdag 16. juni 2020 22.21
Til: R-sig-geo mailing list; Molly Scott - NOAA Affiliate
Emne: Re: [R-sig-Geo] Proj not projecting properly on maps

Please provide the output of sessionInfo() to show your platform, and the complete context of the message, which is issued by rgdal as a warning, not an error. If you see it as an error, also provide the output of traceback(), and options("warn"). If that is 2, you have opted to treat all warnings as errors.

Can anyone check MoveVis with a standard data set and post it here, to see what is going on?

Roger

-------
Roger Bivand
Norwegian School of Economics, Bergen, Norway
[hidden email]

________________________________
Fra: R-sig-Geo <[hidden email]> p� vegne av Molly Scott - NOAA Affiliate via R-sig-Geo <[hidden email]>
Sendt: tirsdag 16. juni 2020, 21:52
Til: [hidden email]
Emne: [R-sig-Geo] Proj not projecting properly on maps

Hi all, I apologise for the simple question, but really unsure how to proceed given the error message. I make lots of animated movement maps using the package MoveVis. Normally, I set up my animated date frame like this: ocs_ani_move = df2move(ocs.ani, * proj = "+init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0",* x = "Longitude", y = "Latitude", time = "Local.Date.Time", track_id = "shark1" ) I am now getting this error when I do: CRS object has comment, which is lost in output.Discarded ellps WGS 84 in CRS definition: +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defsDiscarded datum WGS_1984 in CRS definition. Could any please tell me what to input for 'proj" I have read the most recent vignettes and am aware that changes have been made, but unsure what is the equivalent to my previous code. Many thanks, [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list [hidden email] https://stat.ethz.ch/mailman/listinfo/r-sig-geo

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway