rsbivand / rgrass

Interpreted interface between the GRASS geographical information system and R
https://rsbivand.github.io/rgrass/
24 stars 8 forks source link

error in print.gmeta() #31

Closed dylanbeaudette closed 2 years ago

dylanbeaudette commented 2 years ago

I'm using rgrass7_0.2-5 on Windows 10, and to be perfectly honest surprised at how well this is working. Coming from a UNIX background getting GRASS and R to play nicely on Windows feels like witchcraft to me.

I get the following error message when creating a throw-away GRASS session that I use to import data into new locations. Something like this:

initGRASS(gisBase = grass_path,
          home = td,
          gisDbase = td, location = "garbage",
          mapset = "PERMANENT", override = TRUE)

Code + error: image

I think that this has to do with an NA CRS when a grass location/mapset has an undefined proj4 string as reported by gmeta().

Error traces back to: https://github.com/rsbivand/rgrass7/blob/ba5ead16b365a79bb1d9a3f8e441ca8c3dcfc800/R/initGRASS.R#L297

Probably the actually source of the error: https://github.com/rsbivand/rgrass7/blob/ba5ead16b365a79bb1d9a3f8e441ca8c3dcfc800/R/rgrass.R#L69

rsbivand commented 2 years ago

I think this is a copy of #27. Please try the draft Windows binary package provided there (https://github.com/rsbivand/rgrass7/files/6285516/rgrass7_0.2-6.zip) and report back. I'm assuming that your WinGRASS is the stand-alone, not the OSGeo4W version. As you see from #27, this was never properly resolved as thread contributors were using different OS and installation routes.

dylanbeaudette commented 2 years ago

Installed the draft Windows binary as suggested, no error messages reported. Thanks!

For the record, I'm using the GRASS bundled with QGIS. Good to close this issue when those binaries are released?