[R-sig-Geo] -1.#IND00 problem
Tomislav Hengl
hengl at spatial-analyst.net
Wed Mar 2 17:33:56 CET 2011
Op 1-3-2011 22:58, Cavazzi, Stefano schreef:
> All,
>
> I'm having problems extracting some land surface parameters with
> RSAGA. Somehow I get a weird code "-1.#IND00" instead of numbers.
>
> rsaga.geoprocessor("ta_morphometry",14,list(DEM=paste("Area1.sgrd",sep=""),
> HO=paste("Area1_slopeH.sgrd",sep=""),
> HU=paste("Area1_valleyD.sgrd",sep=""), W=0.5, T=10.0, E=2.0))
> rsaga.sgrd.to.esri(in.sgrds=c(paste("Area1_slopeH.sgrd",sep=""),
> paste("Area1_valleyD.sgrd",sep="")),
> out.grids=c(paste("Area1_slopeH.asc",sep=""),
> paste("Area1_valleyD.asc",sep="")), prec=-6, out.path=getwd())}
#1 I think that you are pasting the text unnecessarily,
#2 You can read the SAGA grids directly to R via a GDAL driver
[http://spatial-analyst.net/book/SAGA_driver]:
> rsaga.geoprocessor("ta_morphometry",14,list(DEM="Area1.sgrd",
HO="Area1_slopeH.sgrd", HU="Area1_valleyD.sgrd", W=0.5, T=10.0, E=2.0))
> Area1_slopeH <- readGDAL("Area1_slopeH.sdat")
The sign "-1.#IND00" probably indicates NA values (NA mask). GDAL should
be able to recognize those automatically.
T. Hengl
http://www.wewur.wur.nl/popups/vcard.aspx?id=HENGL001
>
> Any idea?
>
> Thanks, Stefano
>
> Stefano Cavazzi PhD Student, National Soil Resources Institute School
> Of Applied Sciences, Cranfield University
>
> [[alternative HTML version deleted]]
>
> _______________________________________________ R-sig-Geo mailing
> list R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
More information about the R-sig-Geo
mailing list