Re: [R-sig-Geo] convert from any spatial* classes to a specific character string

2020-09-04 Thread Matteo Mattiuzzi
05455 > 51.41355, 0.0254105 51.42899, 0.0398142 51.44099, 0.0585966 51.42459, > 0.0753431 51.43199, 0.1124939 51.41317, 0.134136 51.41385, 0.1488766 > 51.40848, 0.1598909 51.39465, 0.1498092 51.39087, 0.1532098 51.37804, > 0.1362526 51.34555, 0.1166538 51.3413, 0.1202182 51.33214, 0.1047428 &g

[R-sig-Geo] convert from any spatial* classes to a specific character string

2020-09-02 Thread Matteo Mattiuzzi
Dear list, I have recently submitted a little R package to CRAN (now waiting for approval) https://github.com/MatMatt/clmsapi. The package is a R client for downloading data from the Copernicus Land Monitoring Service (https://cryo.land.copernicus.eu/finder/). The API expects a parameter called

[R-sig-Geo] MODIS package released to CRAN

2017-01-13 Thread Matteo Mattiuzzi
Dear list, We would like to announce the release of the MODIS package to CRAN. This was finally possible thanks to the constant efforts of Florian Detsch, whom I would like to say thank you! Some months ago we decided to move the development from R-Forge to GitHub and we are thankful for any

[R-sig-Geo] Adding (custom) tags to a geotif

2015-07-01 Thread Matteo Mattiuzzi
Dear list, I would like to add some meta information to a tif file. As my tif file can created by one or more source files depending on its location, I need to safe this information inside my tif. Precisely I need to add if the specific file _could_ be created by one or two files (names of

Re: [R-sig-Geo] Processing best quality MODIS pixels only (MODIS package)

2015-05-19 Thread Matteo Mattiuzzi
Dear Amit, Thats correct, if you want to use only pixel of quality you have to set 0 as threshold (everything than threshold is set to 0 weight). But for what I remember, and this might explains your result with all 0s, is that does not exist in MODIS data despite the fact that it is

Re: [R-sig-Geo] runGdal in MODIS package overrides the default in MODISoptions asIn pixel size and output a smaller resoultion pixels

2014-11-22 Thread Matteo Mattiuzzi
the Sinusoidal projection for the first raster, then convert its projection to WGS84 using QGIS and use it as the extend raster r you kindly mentioned. If the gdal did the same resampling, I will simply keep Sinusoidal projection for all and convert using QGIS. Amit Matteo Mattiuzzi matteo.mattiu

Re: [R-sig-Geo] runGdal in MODIS package overrides the default in MODISoptions asIn pixel size and output a smaller resoultion pixels

2014-11-19 Thread Matteo Mattiuzzi
Dear Amit, if you set pixelSize asIn, the handling of the pixelsize is done by gdal_translate, runGdal in such case does not provide any information about resolution to used 'gdal_translate'. As your outProj is 4326 you have geographic coordinates, this means that in planar coordinates your

Re: [R-sig-Geo] Focal function in R

2014-05-19 Thread Matteo Mattiuzzi
Is that what you want? library(raster) # your reproducible! raster r - raster() r[] - sample(0:2,ncell(r),replace=TRUE) funX - function(x){sum(x==1)} res1 - focal(r,fun=funX,w=matrix(1, ncol=3, nrow=3)) # or in this special case (sum if 1) also rn - r==1 res2 - focal(rn,w=matrix(1, ncol=3,

[R-sig-Geo] Statistician at UNODC Vienna (Fwd: Statistiker für consultancy gesucht)

2014-02-04 Thread Matteo Mattiuzzi
Dear List, please find here an interesting job opportunity at the UNODC (SASS) in Vienna. If you are interested contact directly Ms. Irmgard Zeiler (irmgard.zei...@unodc.org). good luck Matteo Mattiuzzi Irmgard ZEILER irmgard.zei...@unodc.org 02/03/14 5:02 PM Dear all, I would like

Re: [R-sig-Geo] Raster in parallel computing?

2014-01-08 Thread Matteo Mattiuzzi
Camillo, I think your example is missing important information, especially the context of this processing step, that matters a lot for the solution to choose. based on you example I could suggest you to try something like that: library(raster) #creates 3 test rasters a - raster(nrow=3, ncol=3)

Re: [R-sig-Geo] MODIS EVI time series missing data interpolation (linear or whittaker.raster)

2013-11-06 Thread Matteo Mattiuzzi
. They did it with Matlab, is there a way to do it in R? Thanks again Mohammad On 21.10.2013 12:49, Matteo Mattiuzzi wrote: Mohammad,read answers inline Mohammad Abdel-Razekabdelra...@uni-bonn.de 10/13/13 3:46 PM Dear All, I am analyzing MODIS EVI time sereis for 2004-2010. Preprocessing

Re: [R-sig-Geo] MODIS EVI time series missing data interpolation (linear or whittaker.raster)

2013-10-21 Thread Matteo Mattiuzzi
Mohammad,read answers inline Mohammad Abdel-Razek abdelra...@uni-bonn.de 10/13/13 3:46 PM Dear All, I am analyzing MODIS EVI time sereis for 2004-2010. Preprocessing included: reprojecting to WGS84 and export EVI to Geotiff (along with blue reflectance and view zenith angel). Then I filtered

Re: [R-sig-Geo] problem reading hdf image

2013-10-08 Thread Matteo Mattiuzzi
Dear Agus, yes please send the output of gdalinfo (close to the end is the string you have to use). Matteo Agustin Lobo alobolis...@gmail.com 10/07/13 5:42 PM Hi! I get the following error when try to read an hdf image (release 4): modisima -

Re: [R-sig-Geo] problem reading hdf image

2013-10-08 Thread Matteo Mattiuzzi
Right ( 512.0, 512.0) Center ( 256.0, 256.0) On Tue, Oct 8, 2013 at 1:34 PM, Matteo Mattiuzzi matteo.mattiu...@boku.ac.at wrote: Dear Agus, yes please send the output of gdalinfo (close to the end is the string you have to use). Matteo Agustin Lobo alobolis...@gmail.com 10/07

Re: [R-sig-Geo] Adaptive Savitzky Golay Filter function

2013-06-12 Thread Matteo Mattiuzzi
to use whittaker.rasteRe: [R-sig-Geo] Adaptive Savitzky Golay Filter function From:Matteo Mattiuzzi To: Nicolas Bories; r-sig-geo@r-project.org BC: Date:Tuesday - June 11, 2013 4:44 PM Subject:Re: [R-sig-Geo] Adaptive Savitzky Golay Filter function Dear Nicolas, Fixed

Re: [R-sig-Geo] Problem with gdalinfo in landsat package

2013-06-12 Thread Matteo Mattiuzzi
Just a guess, open a terminal and type gdalinfo is the command not known install gdal-bin. sudo apt-get install gdal-bin Matteo Alexandre Santos alexandresanto...@yahoo.com.br schrieb: Dear members list, �� ��� I try to subset a Landsat geotiff image with the lssub( ) function in a

[R-sig-Geo] Antw: RCurl: using ls instead of NLST

2013-05-29 Thread Matteo Mattiuzzi
Dear Jonathan,in the MODIS package I use the following function to list files within a http or a ftp folder. I'm not really practical in XML stuff but I got it working somehow. The LP DAAC has changed from FTP to HTTP, I'm not sure if it is good idea to use the ftp protocol anymore. I also had

[R-sig-Geo] Antw: Redirect rgdal to point to alternative GDAL install?

2013-05-29 Thread Matteo Mattiuzzi
Jonathan, I don't know but this would interest me also. Have you checked the functionalities in the MODIS package? I think you intend to do things that probably are already implemented, and if not it would be great to get some help over here! The MODIS package uses the alternative installations

Re: [R-sig-Geo] nearest neighbour using distance in metres

2013-05-16 Thread Matteo Mattiuzzi
Dear Ross, Euclidean Distance is not an units, it is a type of distance measurement an it is always in input units! The Euclidean Distance is the length of a rope between your hands that you hold strained, but see here: http://en.wikipedia.org/wiki/Euclidean_distance

Re: [R-sig-Geo] Writing to Large Raster File

2013-04-30 Thread Matteo Mattiuzzi
. That is why I used the more complicated approach outlined here ( http://cran.r-project.org/web/packages/raster/vignettes/functions.pdf). On Tue, Apr 30, 2013 at 3:24 AM, Matteo Mattiuzzi matteo.mattiu...@boku.ac.at wrote: Dear Ted, Isn't it simply that? out - raster(nrow=2,ncol=1900

[R-sig-Geo] rgdal_0.8-8 spTransform

2013-04-24 Thread Matteo Mattiuzzi
Dear rgdal Maintainers, spTransform is not available for standard call. I haven't tested other rgdal functions but the problem has happened with the last update of rgdal (I think today). Matteo sessionInfo() R version 2.15.3 (2013-03-01) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1]

Re: [R-sig-Geo] rgdal_0.8-8 spTransform

2013-04-24 Thread Matteo Mattiuzzi
Dear Roger, yes I've used update.packages() re-installing (without removing first) sp and then rgdal using install.packages(sp) ; install.packages(rgdal) ... solved the problem. Thanks Matteo Roger Bivand 04/24/13 10:27 AM On Wed, 24 Apr 2013, Matteo Mattiuzzi wrote: Dear rgdal

Re: [R-sig-Geo] vertical profile of raster DEM along road (package raster)

2013-04-09 Thread Matteo Mattiuzzi
wait for R-forge) Matteo Omphalodes Verna 04/09/13 8:56 AM Thank you Robert. It is already possible to install it? Thank you, OV From: Robert J. Hijmans To: Matteo Mattiuzzi Cc: r-sig-geo ; omphalodes.ve...@yahoo.com Sent: Tuesday, April 9, 2013 8:40

Re: [R-sig-Geo] vertical profile of raster DEM along road (package raster)

2013-04-05 Thread Matteo Mattiuzzi
, ] plot(segment[,1], type = l) Thanks, OV - Original Message - From: Matteo Mattiuzzi To: r-sig-geo@r-project.org; omphalodes.ve...@yahoo.com Cc: Sent: Thursday, March 21, 2013 7:52 PM Subject: Re: [R-sig-Geo] vertical profile of raster DEM along road (package raster) Dear Omphalodes

Re: [R-sig-Geo] vertical profile of raster DEM along road (package raster)

2013-03-21 Thread Matteo Mattiuzzi
Dear Omphalodes, library(raster) library(sp) set.seed(2) data(volcano) r - raster(volcano) plot(r) l1 = cbind(c(seq(0,1 , by = 0.1)), runif(11, 0, 1)) S1 = Lines(list(Line(l1)), ID = a) lines(S1, asp = 1, col = red) S1-SpatialLines(list(S1)) # I'm not practic in sp, but this at least works!

[R-sig-Geo] Antw: transfer raster values to dataframe

2013-03-14 Thread Matteo Mattiuzzi
Dear Ross, set.seed(1234) myPointsSp - data.frame(x=rnorm(10, mean=1.23347499, sd=0.002), y=rnorm(10, mean=52.00096, sd=0.002)) coordinates(myPointsSp) - c('x', 'y') proj4string(myPointsSp) - CRS(+proj=longlat +ellps=WGS84 +datum=WGS84) # make raster myExtent - extent(myPointsSp) myRaster -

[R-sig-Geo] Antw: transfer raster values to dataframe

2013-03-14 Thread Matteo Mattiuzzi
And of coarse the last step was not completely right: ... myPointsDf - as.data.frame(myPointsSp) vals - extract(myRaster,myPointsSp) myPointsDf - cbind(myPointsDf,vals) so now the values are in your data.frame, or maybe also this is ok: myDf - extract(myRaster,myPointsSp,df=TRUE) Ross

[R-sig-Geo] Antw: Re: project google map to Sinusoidal

2013-03-02 Thread Matteo Mattiuzzi
to an equal area projection (Sinusoidal): myRaster - projectExtent(r,crs=+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs) Using the obeyRes function kindly given to me by Matteo Mattiuzzi ( https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20130224/3247ffd4/atta

[R-sig-Geo] Antw: project google map to Sinusoidal

2013-03-01 Thread Matteo Mattiuzzi
=+proj=longlat +ellps=WGS84 +datum=WGS84) Ive projected the raster to an equal area projection (Sinusoidal): myRaster - projectExtent(r,crs=+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs) Using the obeyRes function kindly given to me by Matteo Mattiuzzi (https

[R-sig-Geo] Antw: Re: Extract max.... es: PROBLEM writing geotiff

2013-03-01 Thread Matteo Mattiuzzi
Hi Zia, instead of writeGDAL you can use the writeRaster function: r-writeRaster(r,tr,options=TFW=YES) Matteo Zia Uddin Ahmed z...@cornell.edu 01.03.2013 15:38 Thanks everybody. It works fine with following codes for extracting max value from list from a huge data set (max pixel value of

Re: [R-sig-Geo] Antw: project google map to Sinusoidal

2013-03-01 Thread Matteo Mattiuzzi
to Sinusoidal, perhaps I could first draw the polygons on the WSG84 google map, then re-project each polygon to Sinusoidal? Thanks Ross From: Matteo Mattiuzzi Date: Friday, 1 March 2013 14:42 To: Ross Ahmed , Subject: Antw: [R-sig-Geo] project google map to Sinusoidal myExtent - extent(c

[R-sig-Geo] Antw: arithmetic with layers from a raster stack/brick

2013-02-28 Thread Matteo Mattiuzzi
Dear Ani, Your a and b are not objects, they are the name the layers in your object s. So you can't treat it that way. Maybe this is what you want? require(raster) r- raster(nrows=2, ncols=2) r[]-1:ncell(r) s-stack(r,r) names(s)-c(a,b) r1- s[[a]] + s[[b]] Matteo aniruddha ghosh

Re: [R-sig-Geo] raster resolution

2013-02-25 Thread Matteo Mattiuzzi
cell in raster is 300^2km sqrt(800)*800 = each cell in raster is 800^2km Could you let me know if these are correct? Ross On 24 Feb 2013, at 10:16, Matteo Mattiuzzi wrote: Dear Ross, in your mail you wrote 100 qkm and 1000 qkm. The map unit of sinusoidal is [m] as you see in the CRS. sqrt

Re: [R-sig-Geo] raster resolution

2013-02-24 Thread Matteo Mattiuzzi
is 1000^2m, you have provided this code: ext1000 - obeyRes(extent(EAE),resolution=sqrt(1000)*1000) Why have you used sqrt(1000)*1000? Why not 1000*1000? Ross On 20/02/2013 16:08, Matteo Mattiuzzi wrote: Dear Ross, You have 2 problems, one is that by changing the resolution you change in most

[R-sig-Geo] R-SEXTANTE-QGIS

2013-02-22 Thread Matteo Mattiuzzi
Dear List, I want to invite you to that discussion http://osgeo-org.1560.n6.nabble.com/QGIS-SEXTANTE-R-td5036108.html about the integration of R in SEXTANTE-QGIS. I think SEXTANTE offers a really interesting possibility to use R from within Q-GIS. So also people not comfortable with R could

Re: [R-sig-Geo] raster resolution

2013-02-20 Thread Matteo Mattiuzzi
Dear Ross, You have 2 problems, one is that by changing the resolution you change in most of the cases also the extent, and second you cannot generate a regular raster (same area for all pixels) based on LAT/LON. You will have to use to an equal area projection.

Re: [R-sig-Geo] arcStats: do not know how to convert 'locDates' to class Date

2013-02-19 Thread Matteo Mattiuzzi
Dear Abdulhakim, which version is your MODIS package? In the last version 0.8-04 this should work! Matteo Abdulhakim Abdi 02/19/13 2:19 PM Dear List, I'm trying to execute the arcStats function in the MODIS package: arcStats(product=MYD17A2, collection=005,

Re: [R-sig-Geo] R version of gdal_polygonize.py

2013-02-13 Thread Matteo Mattiuzzi
Hi Jonathan, for what I understand from your question the main issue is the resizing of the pixels to a larger size. The solution below is 1 not very performant and 2 not fully memory save as polygonToRaster is used again, but maybe you find something usefull. Matteo # largest area function

Re: [R-sig-Geo] wget error While downloading a MODIS Tile

2012-12-10 Thread Matteo Mattiuzzi
Dear Wesley, You may give a try to the MODIS package. Currently it has build problems in R-Forge but you can also install ZIP or TAR from here: https://www.dropbox.com/sh/18t0rgcm6bga7xt/-4k_Xwojxr/MODIS If you just want to download the data you are fine with that. If you want to also

Re: [R-sig-Geo] wget error While downloading a MODIS Tile

2012-12-10 Thread Matteo Mattiuzzi
example scripts I could use to become more familiar with the tools? I have the manual and will use that for now. Many thanks, Wesley On Mon, Dec 10, 2012 at 3:48 PM, Matteo Mattiuzzi matteo.mattiu...@boku.ac.at wrote: Dear Wesley, You may give a try to the MODIS package. Currently it has build

[R-sig-Geo] Antw: [raster] formal way of addressing specific layer in RasterStack?

2012-12-05 Thread Matteo Mattiuzzi
Hi, using the example of ?extract you can do: r - raster(ncol=36, nrow=18) r[] - 1:ncell(r) r - stack(r,r,r) cds1 - rbind(c(-180,-20), c(-160,5), c(-60, 0), c(-160,-60), c(-180,-20)) cds2 - rbind(c(80,0), c(100,60), c(120,0), c(120,-55), c(80,0)) polys -

[R-sig-Geo] Antw: How convert day of the year in year/month/day

2012-12-02 Thread Matteo Mattiuzzi
Dear Julio, format(as.Date(2005135,%Y%j),%Y/%b/%d) Here a nice description of possibilities: http://statistics.berkeley.edu/classes/s133/dates.html Matteo Julio Oliveira 02.12.12 18.34 Uhr Dears, I have dates of the type ddd (ex.: 2005135), where 2005 is the year and 135 is day of

[R-sig-Geo] Antw: Creating a spatialPolygonsDataFrame from a data frame

2012-10-07 Thread Matteo Mattiuzzi
Hi Steve, what about this? DF - structure(list(v = c(4L, 4L, 4L, 4L, 4L, 4L, 4L), h = 8:14, ll_lon = c(-131.0149, -117.7464, -104.5202, -91.3388, -78.2083, -65.15, -52.1199), ll_lat = c(39.7081, 39.7342, 39.7557, 39.7728, 39.7858, 39.7937, 39.7994), ul_lon = c(-156.8405, -140.7952,

[R-sig-Geo] Antw: Re: Creating a spatialPolygonsDataFrame from a data frame

2012-10-07 Thread Matteo Mattiuzzi
,lr_lat) On Sun, Oct 7, 2012 at 9:51 AM, Matteo Mattiuzzi matteo.mattiu...@boku.ac.at wrote: Hi Steve, what about this? DF - structure(list(v = c(4L, 4L, 4L, 4L, 4L, 4L, 4L), h = 8:14, ll_lon = c(-131.0149, -117.7464, -104.5202, -91.3388, -78.2083, -65.15, -52.1199), ll_lat = c(39.7081

[R-sig-Geo] Antw: Re: Re: Creating a spatialPolygonsDataFrame from a data frame

2012-10-07 Thread Matteo Mattiuzzi
interactive map. and I just wanted a very simple super simple api. getVH(lonlat) or a case that accepts poly or bbox as input. On Sun, Oct 7, 2012 at 10:23 AM, Matteo Mattiuzzi matteo.mattiu...@boku.ac.at wrote: If MODIS tiles are your aim why don't you use? MODIS:::getTile() steven mosher

[R-sig-Geo] Antw: Re: Re: Re: Creating a spatialPolygonsDataFrame from a data frame

2012-10-07 Thread Matteo Mattiuzzi
, 2012 at 10:53 AM, Matteo Mattiuzzi matteo.mattiu...@boku.ac.at wrote: This is what I can serve: getTile(extent=path/to/your/file.shp)$tile # poly getTile(extent=path/to/your/raster.file)$tile # rasterfile getTile(extent=extent(raster.file))$tile # raster extent getTile(extent=austria)$tile

[R-sig-Geo] Antw: Writing Raster values to .txt file

2012-10-03 Thread Matteo Mattiuzzi
Hi, the only way I can see is to use ?xyFromCell r - raster() r[] - 1:ncell(r) r - brick(r,r*2) vals - getValues(r) coords - xyFromCell(r,1:ncell(r)) res - cbind(coords,vals) write.table(res,file1.txt) Matteo Tiffany Smith 03.10.12 22.34 Uhr Hello, I'm trying to write out the

[R-sig-Geo] Antw: Extracting weird temperature and EVI values from MODIS data

2012-09-24 Thread Matteo Mattiuzzi
Dear David, lets say you are getting the EVI from MOD13Q1 product: https://lpdaac.usgs.gov/products/modis_products_table/mod13q1 scroll down and click on layers. Here you find every infromation about scaling and in case of EVI it is : layer Name: 250m 16 days EVI Units: EVI bit type: 16-bit

[R-sig-Geo] Antw: Re: MODIS imagery

2012-05-30 Thread Matteo Mattiuzzi
Dear all! I have done some changes regarding the dependencies of the MODIS package (current version 0.3-16). I have removed nearly every dependency and moved less central packages to the suggested once (probably I have exaggerated a bit with it!). To work reasonably you need also some of the

Re: [R-sig-Geo] Antw: Re: Antw: Error when using rowSums along with a RasterStack object

2012-05-29 Thread Matteo Mattiuzzi
, fun, filename=fout)) user system elapsed 393.477 79.516 2197.248 Same 45 images took ~36 minutes to be integrated using 'rowSums' function!! Thanks for this tip - it will certainly speed up my work! All the best, Thiago. From: Matteo Mattiuzzi

[R-sig-Geo] Antw: Re: Antw: Error when using rowSums along with a RasterStack object

2012-05-13 Thread Matteo Mattiuzzi
=FALSE) Best, Robert On Sat, May 12, 2012 at 2:26 AM, Matteo Mattiuzzi wrote: Dear Thiago, is this what you need? library(raster) r - raster() r[]-1:ncell(r) r2 - raster() r2[]-ncell(r):1 r -brick(r,r2) plot(r) sos - calc(r,sum) x11() plot(sos) Matteo sos - calc(r

[R-sig-Geo] Antw: Error when using rowSums along with a RasterStack object

2012-05-12 Thread Matteo Mattiuzzi
Dear Thiago, is this what you need? library(raster) r - raster() r[]-1:ncell(r) r2 - raster() r2[]-ncell(r):1 r -brick(r,r2) plot(r) sos - calc(r,sum) x11() plot(sos) Matteo sos - calc(r,sum) plot(sos) Thiago Veloso 11.05.12 23.29 Uhr Dear R-colleagues, I am trying to sum all

[R-sig-Geo] Antw: Re: Intersection of Polygons (sp)

2012-05-09 Thread Matteo Mattiuzzi
don't close in the way I want it. Polygons crossing lon +-180 close by crossing the entire globe and not crossing the line lon +-180...Is there a way to control this? Thanks Matteo Edzer Pebesma edzer.pebe...@uni-muenster.de 5/9/2012 3:20 pm On 05/09/2012 03:07 PM, Matteo Mattiuzzi

[R-sig-Geo] Antw.: Antw: Re: HDF format

2012-01-30 Thread Matteo Mattiuzzi
- Reply message - Von: Vikram Ranga babuaw...@gmail.com An: Matteo Mattiuzzi matteo.mattiu...@boku.ac.at Cc: r-sig-geo@r-project.org Betreff: Antw: Re: [R-sig-Geo] HDF format Datum: Mo., Jan. 30, 2012 13:06 Hi Matteo, The gdalinfo --verison of my fwtools is C:/gdalinfo --verison GDAL 1.7.0b2

Re: [R-sig-Geo] Antw: Re: HDF format

2012-01-27 Thread Matteo Mattiuzzi
\sysWOW64\ but the output is 'gdalinfo' is not recognised as an internal or external command, operable program or batch file. Thank you very much Matteo for your work. Regards, Vikram. On 1/27/2012 1:56 PM, Matteo Mattiuzzi wrote: Hi Vikram, I had to leave yesterday but I'm back at office now

[R-sig-Geo] Antw: Re: HDF format

2012-01-26 Thread Matteo Mattiuzzi
Hi Vikram, Isn't Aster HDF not an HDF4 format (like MODIS)? HDF4 and HDF5 are not really comparable/compatible each to other. If I'm right, you can open the file using GDAL, or even with the raster package, but you have to point the path to the layer (SDS) and not only to the file. There was

Re: [R-sig-Geo] Antw: Re: HDF format

2012-01-26 Thread Matteo Mattiuzzi
(strangely) Regards, Vikram. On 1/26/2012 11:29 AM, Matteo Mattiuzzi wrote: Hi Vikram, Isn't Aster HDF not an HDF4 format (like MODIS)? HDF4 and HDF5 are not really comparable/compatible each to other. If I'm right, you can open the file using GDAL, or even with the raster package, but you have

Re: [R-sig-Geo] Antw: Re: HDF format

2012-01-26 Thread Matteo Mattiuzzi
H:/new aster/AST_09_00304012003053127_20120124074826_13837.hdf' had status 1 but It is still returning NULL values... sds $SDSnames NULL $SDS4gdal NULL On 1/26/2012 3:25 PM, Matteo Mattiuzzi wrote: Ok, I piked a ASTEfile: ftp://e4ftl01.cr.usgs.gov/ASTER_B/ASTT/AST_L1B.003/2000.03.30

Re: [R-sig-Geo] Antw: Re: HDF format

2012-01-26 Thread Matteo Mattiuzzi
. Please send always the outputs... Matteo Matteo Mattiuzzi matteo.mattiu...@boku.ac.at 1/26/2012 3:53 pm ok should be simple...remove the space in: c:/new aster and try again Vikram Ranga babuaw...@gmail.com 1/26/2012 3:45 pm OK I tried this, sds-getSDS(HdfName=H:/new aster

[R-sig-Geo] Antw: problem with ndvi

2012-01-24 Thread Matteo Mattiuzzi
Dear Vikram, I have update the RemoteSensing package in order to easily compute the DN to reflectance conversion. For Unix system you should be able to update RemoteSensing to 0.4.2 with this updates. On Windows you have to wait a little more. try: metafile -

Re: [R-sig-Geo] Antw: problem with ndvi

2012-01-19 Thread Matteo Mattiuzzi
Hi Agus, no I mean the RemoteSensing package https://r-forge.r-project.org/projects/remotesensing/ Cheers Agustin Lobo alobolis...@gmail.com 19.01.2012 11:26 Matteo, by RemoteSensing package you mean the landsat package? Agus 2012/1/18 Matteo Mattiuzzi matteo.mattiu...@boku.ac.at: Dear

[R-sig-Geo] Antw: problem with ndvi

2012-01-18 Thread Matteo Mattiuzzi
Dear Vikram, It is not good to calculate NDVI from DN. The purpose of DN (digital number) is only for packing as much information as possible into a given “BIT-size” (in Landsat 8-bit/pixel/band). DN is practically the radiance (I think TOA?) modified with an offset and a gain in order to

[R-sig-Geo] Tiling a raster

2011-11-17 Thread Matteo Mattiuzzi
Default Title Dear List, I'm looking for a method to tile raster files with an fixed origin and fixed size. So the indexing (HxxVxx) would be important too. Does anybody know a good solution for my problem. Thanks, Matteo Mattiuzzi [[alternative HTML version deleted

[R-sig-Geo] Antw: Re: ModisDownload

2011-10-28 Thread Matteo Mattiuzzi
@Barak I would remove this option completely, it often leads to problems with server connection (not deeper investigated!). My suggestion is: Instead of: getlist - strsplit(getURL(paste(FTP,/,dirs[i], /, sep=), .opts=curlOptions(ftplistonly=TRUE)), \r*\n)[[1]] do something like: ftpfiles

[R-sig-Geo] Antw: Re: Antw: Re: MODIS download

2011-10-27 Thread Matteo Mattiuzzi
base other attached packages: [1] audio_0.1-4getMODIS_0.2-9 RCurl_1.6-10 bitops_1.0-4.1 loaded via a namespace (and not attached): [1] tools_2.13.2 Any tip on what might be causing this error? Best wishes, Thiago. --- On Thu, 27/10/11, Matteo Mattiuzzi wrote: From

[R-sig-Geo] Antw: Supervised landscape classification according to NDVI time series

2011-06-12 Thread Matteo Mattiuzzi
Hi, I think the main difference and problem, comparing a features space of spectral bands and one of NDVI values in the time domain is that the spectral bands do not shift, but a NDVI pattern does. I.e. Wheat in different climatological areas (mountain/valley, north/south, continental/...)

[R-sig-Geo] Antw: NA raster replace

2011-05-11 Thread Matteo Mattiuzzi
Hi Alfredo, Wilfrieds code is without doubt the fastest, but not memory safe! calc calls the function for each pixel, so x is a single pixel (if test is a single layer), I think this makes calc slow. If the solution below is still to slow, you could think using more cores if you machine