An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20140729/1c6e068d/attachment.pl>
Help me please
3 messages · A. Robles R., Frede Aakmann Tøgersen
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20140729/6f0184b4/attachment.pl>
Hi It seems that you need to set an environment variable used by programs in ~/MRT/bin. I don't have this installed so please have a look for some README files in ~/MRT or other places to find which value the variable are supposed to have. In R before calling reprojectHDF() do a: Sys.setenv(MRT_DATA_DIR = "to_some_value, probably: ~/MRT/data or something like that") Hope that helps. Yours sincerely / Med venlig hilsen Frede Aakmann T?gersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 frtog at vestas.com http://www.vestas.com Company reg. name: Vestas Wind Systems A/S This e-mail is subject to our e-mail disclaimer statement. Please refer to www.vestas.com/legal/notice If you have received this e-mail in error please contact the sender.
-----Original Message----- From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r- project.org] On Behalf Of A. Robles R. Sent: 29. juli 2014 08:47 To: r-sig-geo at r-project.org Subject: Re: [R-sig-Geo] Help me please I change the input syntax: input<-list.files(path=".",".hdf",all.files=T,recursive=T) and now my error is:
reprojectHDF(hdfName=input,filename=outname,MRTpath="~/MRT/bin",+
resample_type="NEAREST_NEIGHBOR",+
proj_type="GEO",datum='WGS84')*******************************
***********************************************
MODIS Reprojection Tool (v4.1 March 2009)
Start Time: Tue Jul 29 01:37:37 2014
------------------------------------------------------------------
Warning: gctp_call : Environmental Variable Not Found
: MRT_DATA_DIR nor MRTDATADIR not defined
Error: GetInputGeoCorner : General Processing
: Error converting input projection coordinates to lat/long coordinates.
Fatal Error, Terminating...
[1] FALSE
2014-07-29 1:21 GMT-05:00 A. Robles R. <albert.physik at gmail.com>:
I have the following problem: I am using the reprojectHDF() function (http://r-
gis.net/?q=ModisDownload
gis.net%2F%3Fq%3DModisDownload&h=1AQFfebGn&enc=AZM5YrD9AkE2y 7Rnk6mbbkY0ZyXJ74Tw0ErhgFhwX0uZ9ComxS8l0Ap5a9oxWLUibJyzZ40- fdx0TejlaLCeB4gT47JF_ly2QHY7Z4SEuRHrCWaGxIiU9PL9jUOLCbQYnPYuwNCi Vop4xVvlVN0HNeZj&s=1>
)
####
source('ModisDownload.R')
library(raster)
library(RCurl)
path<-"~/R/MODIS/Data/Test"
input<-list.files(path,"*.hdf",all.files=T,recursive=T,full.names=T)
input
outname<-paste(substr(input[1],40,45),".tif",sep='')
outname
reprojectHDF(hdfName=input,filename=outname,MRTpath="~/MRT/bin",
resample_type="NEAREST_NEIGHBOR",
proj_type="GEO",datum='WGS84')
####
but I find the following problem.
####
reprojectHDF(hdfName=input,filename=outname,MRTpath="~/MRT/bin",
+ resample_type="NEAREST_NEIGHBOR", + proj_type="GEO",datum='WGS84')
********************************************************** ********************
MODIS Reprojection Tool (v4.1 March 2009) Start Time: Tue Jul 29 00:57:18 2014 ------------------------------------------------------------------ Error: ReadHDFHeader : Opening Input Header File : Unable to open
/home/rral/R/MODIS/Data/Test//home/rral/R/MODIS/Data/Test/MOD13Q1 .A2000065.h09v08.005.2008238073751.hdf
Fatal Error, Terminating... [1] FALSE #### All suggestions are welcome #### PD: my variables are:
input
[1]
"/home/rral/R/MODIS/Data/Test/MOD13Q1.A2000065.h09v08.005.20082380 73751.hdf"
[2]
"/home/rral/R/MODIS/Data/Test/MOD13Q1.A2000065.h09v09.005.20082380 81536.hdf"
[3]
"/home/rral/R/MODIS/Data/Test/MOD13Q1.A2000065.h10v08.005.20082380 53313.hdf"
[4]
"/home/rral/R/MODIS/Data/Test/MOD13Q1.A2000065.h10v09.005.20082380 61408.hdf"
and
outname
[1] "2000065.tif -- *Atte:* *A. Robles R.*
-- *Atte:* *A. Robles R.* [[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