Re: [R-sig-Geo] projecting data from decimal degrees to meters

2014-02-17 Thread vikram ranga
Hi Tiago, The first two points are in water?? This might be helpful: library(sp) library(rgdal) orig - data.frame(lat = c(23.2383,23.2383,23.2383), long = c(-78.3133, -78.3100,-78.3100), elv = c(4.01, 4.00, 4.00)) coordinates(orig) - ~long+lat proj4string(orig) - CRS(+proj=longlat +ellps=WGS84)

[R-sig-Geo] multiple ring buffer

2013-07-02 Thread vikram ranga
Dear all, I am trying to make multiple ring buffers using points; I have created buffers of different widths using gBuffer from library(rgeos) but this does not solve my purpose. I want to have three different rings of varying widths for each point. gUnion is not useful in this case as point are

[R-sig-Geo] auto.key=FALSE does not work: spplot without legends

2013-05-09 Thread vikram ranga
Dear All, I was trying to plot a polygon data without legends but legends get plotted anyways. I read this post: https://stat.ethz.ch/pipermail/r-sig-geo/2009-September/006509.html according to this sp package should be taking the argument auto.key=FALSE and not plot legends but it is not

[R-sig-Geo] Error in model frame while using ppm function

2013-03-15 Thread vikram ranga
Dear list, I am having this error while running ppm function from spatstat package: Error in model.frame.default(formula = fmla, data = glmdata, subset = .mpl.SUBSET, : variable lengths differ (found for 'variables$var1') What i was trying to do:- is shown using toy example:

Re: [R-sig-Geo] eastings/northings to long/lat

2013-03-06 Thread vikram ranga
Hi Ross, which projection does it have?? I think it can be done using spTransform but for that you need to provide projection info. This code might be useful # need library (rgdal) and (sp). a-data.frame(easting,northing) coordinates(a)= ~easting + northing proj4string(a)-CRS(Need projection info

[R-sig-Geo] Not able to write shp file

2013-02-06 Thread vikram ranga
Dear list, I was trying to write a shapefile within a small function (to calculate centroids to polygons) but not able to do so My code was x-readOGR(dsn=C:/., layer=x) get.centroids-function(x) { x.polyset-SpatialPolygons2PolySet(x) centroids - calcCentroid(x.polyset, rollup=2)

[R-sig-Geo] Package: Remote Sensing: HelpFile

2012-07-16 Thread Vikram Ranga
Hello, I have recently installed the 'RemoteSensing' package but I could not find any help file with package describing about the functions. I have R 2.13.2 version, so it could be installed by first downloading the package from the repository and installing from downloaded file (.zip). Is

Re: [R-sig-Geo] How to open and work with an .hdf map

2012-07-06 Thread Vikram Ranga
Hello Marc, I have used HEG tool to convert *.hdf files to *.geotiff. I found it very easy here is the link http://hdfeos.org/software/heg.php/ though, you can also use FWTools. Here is the example how to do that in FWTool which is link of earlier conversation on the same topic.

Re: [R-sig-Geo] read MODIS image in HDF format

2012-04-11 Thread Vikram Ranga
Hi Julio, Have you seen the similar discussion on the list. Here is the link http://r-sig-geo.2731867.n2.nabble.com/Antw-Re-HDF-format-tt7226577.html#a7227038 Though, I found it is easier to do with NASA's Java based tool http://eosweb.larc.nasa.gov/PRODOCS/misr/tools/geotiff_tool.html But if

Re: [R-sig-Geo] writeGDAL: pseudocolor image?

2012-02-27 Thread Vikram Ranga
Hello Agus, Have you tried writeRaster() command from raster package? I have tried it and it works wonderfully. I have tried it like this octstack-stack(croctb1,croctb2,croctb3,croctb4,croctb5,croctb7) writeRaster(octstack,H:/../map_oct.tif, overwrite=T) you can also write *.img and a number

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

2012-01-30 Thread Vikram Ranga
/jzl5325/wordpress/?p=60 Vikram Ranga babuaw...@gmail.com 1/27/2012 4:04 pm Hi Matteo, Ok, When I type on the cmd it is something like that C:\Users\vikramgdalinfo the output is 'gdalinfo' is not recognised as an internal or external command, operable program or batch file. But I installed

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

2012-01-30 Thread Vikram Ranga
- Reply message - Von: Vikram Ranga babuaw...@gmail.com mailto:babuaw...@gmail.com An: Matteo Mattiuzzi matteo.mattiu...@boku.ac.at mailto:matteo.mattiu...@boku.ac.at Cc: r-sig-geo@r-project.org mailto:r-sig-geo@r-project.org Betreff: Antw: Re: [R-sig-Geo] HDF format

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

2012-01-27 Thread Vikram Ranga
, 0, 4200 (xmin, xmax, ymin, ymax) coord. ref. : NA values : HDF4_EOS:EOS_SWATH:/home/matteo/Desktop/AST_09_00304012003053127_20120124074826_13837.hdf:SurfaceRadianceVNIR:Band1 min value : -32768 max value : 32767 Vikram Ranga babuaw...@gmail.com 1/26/2012 5:05 pm Hi Matteo

[R-sig-Geo] HDF format

2012-01-26 Thread Vikram Ranga
Hello List, I was trying to open HDF format files. Though I have followed the discussion on HDF5 format but really cant figure out as I tried to convert HDF to Geotiff but the tool is not working on my system. As the package is not for windows my options are very limited. Can anyone suggest me

Re: [R-sig-Geo] HDF format

2012-01-26 Thread Vikram Ranga
*. In the discussion Roger pointed out that building gdal against hdf format might help but I do not have a clue how to do that. let me know if you want more info from my end. Regards, Vikram. On 1/26/2012 10:01 AM, Paul Hiemstra wrote: On 01/26/2012 08:53 AM, Vikram Ranga wrote: Hello List, I

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

2012-01-26 Thread Vikram Ranga
to determinatate the full path to the SDS you wand to extract. Vikram Ranga babuaw...@gmail.com 26.01.12 10.20 Uhr Hello Paul, sorry for abstruse mail. I am using R version 2.13.2 on windows (64 bit). I am trying to open ASTER data files(*.hdf). Though, I tried few things like readGDAL

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

2012-01-26 Thread Vikram Ranga
(Pixels are not squared but more polygons of different size). So you can't do many things you could do with an GRID File! ...Maybe you send me a link to download the file you are using (if you use d different type!) Matteo Vikram Ranga babuaw...@gmail.com 1/26/2012 2:55 pm Hi Matteo, I am

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

2012-01-26 Thread Vikram Ranga
:-( still persists !!! may be I will try on linux machine to get some luck On 1/26/2012 3:53 PM, Matteo Mattiuzzi wrote: 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

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

2012-01-26 Thread Vikram Ranga
with R*. In the discussion Roger pointed out that building gdal against hdf format might help but I do not have a clue how to do that. let me know if you want more info from my end. Regards, Vikram. On 1/26/2012 10:01 AM, Paul Hiemstra wrote: On 01/26/2012 08:53 AM, Vikram Ranga wrote: Hello

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

2012-01-26 Thread Vikram Ranga
... 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

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

2012-01-24 Thread Vikram Ranga
hope this makes it little easier, Cheers Matteo Vikram Ranga babuaw...@gmail.com 18.01.2012 10:49 Hello list, I am working with landsat images and would like to create a phenological cycle with NDVI. I am using R for that but NDVI values changes if i use on sensor reflectance instead of DN

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

2012-01-18 Thread Vikram Ranga
you can use MODIS data to sample ndvi changes within a longer period with more temporal resolution. I hope this help. Best, Jorge *From:* Vikram Ranga babuaw...@gmail.com *To:* r-sig-geo@r-project.org *Sent

[R-sig-Geo] for loop for raster class

2012-01-12 Thread Vikram Ranga
Hi, I am trying to crop images using raster library it works fine but when i put that on loop it does not work my syntax is febb3-raster(C:/landsat/New Landsat/February/L5146041_04120110201_B30.tif) febb4-raster(C:/landsat/New Landsat/February/L5146041_04120110201_B40.tif) . . . . so on

[R-sig-Geo] K-means clustering with landsat data

2012-01-11 Thread Vikram Ranga
Hello Everyone, I am trying to run k-means algorithm with R on Landsat images but it is giving error that the data type is not supported. My syntax is juneb1-readGDAL(G:/landsat/New Landsat/June/2002-06-08/8juneb10.tif) kmenjuneb-kmeans(juneb1,10,iter.max = 6, nstart = 1, algorithm =