[R] Producing KML files
R. Michael Weylandt <michael.weylandt@gmail.com>
michael.weylandt at gmail.com
Sat Feb 25 02:51:50 CET 2012
Hi Melicie,
I'm not a Windows user or a user of SAGA but the warning message suggests part of the problem may be that R can't find your SAGA installation. Is it in your Windows PATH?
You may be able to get more specialized help on the R-SIG-geo list as well.
Michael
On Feb 24, 2012, at 12:06 PM, "Desflots, Melicie" <mdesflots at AIR-WORLDWIDE.COM> wrote:
> Hi,
>
> I am very new to R and I am trying to write KML files. I am running R-2.13.1 and I have the following packages:
>
> - AKIMA
>
> - RGDAL
>
> - RSAGA
>
> - SP
>
>
> I was trying to run the simple example that I found at the following web page:
> http://spatial-analyst.net/wiki/index.php?title=Export_maps_to_GE
>
> The lines that I can run are:
>
> data(meuse.grid)
> coordinates(meuse.grid) <- ~x+y
> gridded(meuse.grid) <- TRUE
> proj4string(meuse.grid) = CRS("+init=epsg:28992")
> # raster to polygon conversion;
> writeGDAL(meuse.grid["soil"], "meuse_soil.sdat", "SAGA", mvFlag=-99999)
> rsaga.geoprocessor(lib="shapes_grid", module=6,
> param=list(GRID="meuse_soil.sgrd", POLYGONS="meuse_soil.shp", CLASS_ALL=1))
>
> and it crashes there with the following error message:
>
> Error in setwd(env$workspace) : character argument expected
> In addition: Warning message:
> In rsaga.env() :
> SAGA command line program 'saga_cmd.exe' not found in any of the paths
> C:/Program Files/R/R-2.13.1/library/RSAGA/saga_vc
> C:/Program Files/R/R-2.13.1/library/RSAGA/SAGA-GIS
> ...
>
> Can someone please let me know what I should do to fix that error?
>
> Thanks,
> Mel
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list