Re: [R-sig-Geo] New package > RStoolbox: Remote Sensing Data Analysis in R

2015-09-14 Thread Anand Sookun
Hi

Thanks for theis. I needed this for land cover claasification for landsat 8
and hope it will be useful. I may contact you for help if required.

Cheers

Anand
University of Mauritius

On Mon, Sep 14, 2015 at 10:36 AM, Benjamin Leutner <
benjamin.leut...@uni-wuerzburg.de> wrote:

> Dear list members,
>
> We are happy to announce the initial release of our *RStoolbox* package.
> RStoolbox provides various tools for remote sensing data analysis and is
> now available from CRAN:
>https://cran.r-project.org/web/packages/RStoolbox
>
> The main focus of RStoolbox is to provide a set of high-level remote
> sensing tools for various classification tasks. This includes unsupervised
> and supervised classification with different classifiers, fractional cover
> analysis and a spectral angle mapper. Furthermore, several spectral
> transformations like vegetation indices, principal component analysis or
> tasseled cap transformation are available as well.
>
> Besides that, we provide a set of data import and pre-processing
> functions. These include reading and tidying Landsat meta-data, importing
> ENVI spectral libraries, histogram matching, automatic image
> co-registration, topographic illumination correction and so on.
>
> Last but not least, RStoolbox ships with two functions dedicated to
> plotting remote sensing data (*raster* objects) with *ggplot2* including
> RGB color compositing with various contrast stretching options.
>
> RStoolbox is built on top of the *raster* package. To improve performance
> some functions use embedded C++ code via the *Rcpp* package. Moreover, most
> functions have built-in support for parallel processing, which is activated
> by running raster::beginCluster() beforehand
>
> RStoolbox is hosted at www.github.com/bleutner/RStoolbox
>
> For a more details, including executed examples, please see
> http://bleutner.github.io/RStoolbox/rstbx-docu/
>
> We sincerely hope that this package may be helpful for some people and are
> looking forward to any feedback, suggestions and bug reports.
>
> --
> Benjamin Leutner
> Ned Horning
>
> --
> -
> Benjamin Leutner M.Sc.
>
> Julius-Maximilians-Universität Würzburg
> Institut für Geographie und Geologie
> Lehrstuhl für Fernerkundung
> Campus Hubland Nord -86-
> 97074 Würzburg
>
> ---
> Tel: +49-(0)931-31 89594
> Fax: +49-(0)931-31 89594-0
> eMail: benjamin.leut...@uni-wuerzburg.de
> Web: http://www.fernerkundung.uni-wuerzburg.de
>
> ___
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
---

[[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


Re: [R-sig-Geo] help: krigged map do not show colours

2015-08-05 Thread Anand Sookun
Dear Jon and Roman

Thanks for the reply.

Im attaching the code.

You may be right that the variogram may be problematic but it fitted well
visually.

I think also that the prediction grid was not well created. I wiould be
grateful to have to hints.code how to create a useful grid and also for the
spplot or other alternatives

I can send more info if required.

Cheers

Anand

On Tue, Aug 4, 2015 at 1:39 PM, Jon Skoien jon.sko...@jrc.ec.europa.eu
wrote:

 Hi,

 You have attached some data, but we still dont know exactly what you do
 with the data (do you use the logarithm, how many bins, did you project the
 data set...?). However, having had a quick look using the LatLong
 coordinates (not really recommended), I can see that the variogram from
 this data set is not particularly well defined, and it could well be that
 you fitted a model with pure nugget effect. In that case you will get the
 same prediction everywhere and no color differences.

 Have a look at
  summary(map)
 and particularly the summary of var1.pred.
 You could also plot the variogram of the data together with your model,
 vmf, and see how they fit.

 I am not sure what you mean by not being able to create a prediction grid
 with data included. Do you mean that you want a grid which exactly overlays
 some of the data points? Matching one point should not be difficult, 2 and
 3 should be possible, but you might get some problems with precision (FAQ
 7.31).

 Best wishes,
 Jon




 On 8/3/2015 5:30 PM, Anand Sookun wrote:

 Hi

 Thank you Roman for your kind response.

 The data is as attached which is part of the whole dataset.

 My other problem is that im not able to create an appropriate prediction
 grid with some data included.

 The codes which failed to show colour ramps are

 map - krige(logcarbseq ~ 1, locations = carbon_seq, newdata = map,model =
 vmf)
 str(map)
 print(spplot(map, var1.pred, asp=1, col.regions=bpy.colors(64),main=OK
 prediction, carbon))
 print(spplot(map, var1.var,col.regions=cm.colors(64),asp=1, main=OK
 prediction variance, carbon))

 I look forward to hopefully get some solutions.

 Thanks again and warm regards

 Anand

 On Mon, Aug 3, 2015 at 4:09 PM, Roman Luštrik roman.lust...@gmail.com
 wrote:

 What is the variability of the plotted variable?

 Cheers,
 Roman

 On Sun, Aug 2, 2015 at 11:03 AM, Anand Sookun  asoo...@gmail.com
 asoo...@gmail.com wrote:

 Hi

 I have kriged my data but the map shows uniform colours - no gradual
 contour colour plot on map

 code: print(spplot(k40, var1.pred, asp=1,
 col.regions=bpy.colors(64),main=OK prediction, log-ppm Zn))

 thnaks for any help

 Anand Sookun
 --
 ---
 *Anand Sookun (**MPhil. **PhD Candidate, University of Mauritius)*
 *Director cum Freelance Consultant*
 *Soft Sustainable Services (Mauritius)*
 *Research and Consultancy*

 Website: http://sustain-ability.webs.com/



 https://www.linkedin.com/profile/view?id=161468467trk=nav_responsive_tab_profile_pic

 [[alternative HTML version deleted]]

 ___
 R-sig-Geo mailing list
 R-sig-Geo@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-geo




 --
 In God we trust, all others bring data.




 --
 ---
 *Anand Sookun (**MPhil. **PhD Candidate, University of Mauritius)*
 *Director cum Freelance Consultant*
 *Soft Sustainable Services (Mauritius)*
 *Research and Consultancy*

 Website:  http://sustain-ability.webs.com/
 http://sustain-ability.webs.com/



 https://www.linkedin.com/profile/view?id=161468467trk=nav_responsive_tab_profile_pic
 https://www.linkedin.com/profile/view?id=161468467trk=nav_responsive_tab_profile_pic



 ___
 R-sig-Geo mailing 
 listR-sig-Geo@r-project.orghttps://stat.ethz.ch/mailman/listinfo/r-sig-geo


 --
 Jon Olav Skøien
 Joint Research Centre - European Commission
 Institute for Environment and Sustainability (IES)
 Climate Risk Management Unit

 Via Fermi 2749, TP 100-01,  I-21027 Ispra (VA), ITALY
 jon.sko...@jrc.ec.europa.eu
 Tel:  +39 0332 789205

 Disclaimer: Views expressed in this email are those of the individual and do 
 not necessarily represent official views of the European Commission.




-- 
---
*Anand Sookun (**MPhil. **PhD Candidate, University of Mauritius)*
*Director cum Freelance Consultant*
*Soft Sustainable Services (Mauritius)*
*Research and Consultancy*

Website: http://sustain-ability.webs.com/


https://www.linkedin.com/profile/view?id=161468467trk=nav_responsive_tab_profile_pic


To sig geoAug2015.R
Description: Binary data


vca_raster.grd
Description: Binary data
___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


Re: [R-sig-Geo] help: krigged map do not show colours

2015-08-05 Thread Anand Sookun
Dear Jon

I have to thank you so much for solving this issue. I did't notice that
there was a projection and grid problem.

I hope I would be able to move forward with my analysis with R and perhaps
still need your kind and much appreciated help.

Cheers

Anand

On Wed, Aug 5, 2015 at 12:08 PM, Jon Skoien jon.sko...@jrc.ec.europa.eu
wrote:

 Good.
 For the next function, I think you are trying to use an sp-function
 (gridded) on a raster object. You can convert between these, but not
 necessarily use the same functions. Use
 spgrid = rasterToPoints(YourRaster, spatial = TRUE)
 gridded(spgrid) = TRUE
 if you want to convert your raster layer to a spatial object.

 Best wishes,
 Jon



 On 8/5/2015 10:00 AM, Anand Sookun wrote:

 Dear John

 Thanks again.
 this time it worked but the variogram is not plotting well and some other
 problems croped.
 Error in (function (classes, fdef, mtable)  :
   unable to find an inherited method for function ‘gridded’ for signature
 ‘RasterLayer

 I will try by looking closely at the scripts and be back to you soon

 Best Wishes

 Anand

 On Wed, Aug 5, 2015 at 11:36 AM, Jon Skoien jon.sko...@jrc.ec.europa.eu
 wrote:

 Dear Anand

 On 8/5/2015 9:03 AM, Anand Sookun wrote:

 Dear John

 Greetings

 I really appreciate your help. Itried what you proposed but got stuck
 with the following:

  proj4string(carbon_seq) - CRS(+init=epsg 4326) # epsg-code for
 latlong
 Error in CRS(+init=epsg 4326) : no colon in init= string

 Sorry, there is a : missing, should be
 CRS(+init=epsg:4326)

 See if it works better!
 Jon


 Also I TRIED AGAIN
  proj4string(carbon_seq) - CRS(+init=epsg4326) # epsg-code for latlong
 Error in (function (classes, fdef, mtable)  :
   unable to find an inherited method for function ‘proj4string-’ for
 signature ‘data.frame, CRS

 I tried with rgdal but got the same eror
  require(rgdal)
 Loading required package: rgdal
 rgdal: version: 0.8-16, (SVN revision 498)
 Geospatial Data Abstraction Library extensions to R successfully loaded
 Loaded GDAL runtime: GDAL 1.10.1, released 2013/08/26
 Path to GDAL shared files:
 C:/Users/Anand/Documents/R/win-library/3.0/rgdal/gdal
 GDAL does not use iconv for recoding strings.
 Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
 Path to PROJ.4 shared files:
 C:/Users/Anand/Documents/R/win-library/3.0/rgdal/proj


 im attacing the gri file.

 Thanks for your time.

 CHEERS

 ANAND

 On Tue, Aug 4, 2015 at 4:55 PM, Jon Skoien 
 jon.sko...@jrc.ec.europa.eujon.sko...@jrc.ec.europa.eu wrote:

 Anand,

 I could not open your .grd file in R, I think the .gri file is missing.
 However, looking at it in a text editor, and comparing with your
 R-script, it seems something went wrong with your projections. Your
 .csv-file has LatLong coordinates, but you are setting the projection to
 +proj=utm +zone=40 +south +datum=WGS84 +units=m +no_defs +ellps=WGS84
 +towgs84=0,0,0, the same as you seem to have in your prediction raster.
 But you need to reproject your observations in this case.

 # First set the right projection:
 proj4string(carbon_seq) - CRS(+init=epsg4326) # epsg-code for latlong
 # Then transform
 carbon_seq = spTransform(carbon_seq, CRS(+proj=utm +zone=40 +south
 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0))

 If you do this, your prediction grid should overlap your observations,
 and the colors should reflect your color ramp. What you essentially did
 before was to make a prediction thousands of km away from your
 observations, and then all values will be the same.

 Best wishes,
 Jon


 On 8/4/2015 12:48 PM, Anand Sookun wrote:

 Dear Jon and Roman

 Thanks for the reply.

 Im attaching the code.

 You may be right that the variogram may be problematic but it fitted
 well visually.

 I think also that the prediction grid was not well created. I wiould be
 grateful to have to hints.code how to create a useful grid and also for
 the spplot or other alternatives

 I can send more info if required.

 Cheers

 Anand

 On Tue, Aug 4, 2015 at 1:39 PM, Jon Skoien jon.sko...@jrc.ec.europa.eu
 mailto:jon.sko...@jrc.ec.europa.eu wrote:

 Hi,

 You have attached some data, but we still dont know exactly what you
 do with the data (do you use the logarithm, how many bins, did you
 project the data set...?). However, having had a quick look using
 the LatLong coordinates (not really recommended), I can see that the
 variogram from this data set is not particularly well defined, and
 it could well be that you fitted a model with pure nugget effect. In
 that case you will get the same prediction everywhere and no color
 differences.

 Have a look at
   summary(map)
 and particularly the summary of var1.pred.
 You could also plot the variogram of the data together with your
 model, vmf, and see how they fit.

 I am not sure what you mean by not being able to create a prediction
 grid with data included. Do you mean that you want a grid which

Re: [R-sig-Geo] help: krigged map do not show colours

2015-08-04 Thread Anand Sookun
Hi

Thank you Roman for your kind response.

The data is as attached which is part of the whole dataset.

My other problem is that im not able to create an appropriate prediction
grid with some data included.

The codes which failed to show colour ramps are

map - krige(logcarbseq ~ 1, locations = carbon_seq, newdata = map,model =
vmf)
str(map)
print(spplot(map, var1.pred, asp=1, col.regions=bpy.colors(64),main=OK
prediction, carbon))
print(spplot(map, var1.var,col.regions=cm.colors(64),asp=1, main=OK
prediction variance, carbon))

I look forward to hopefully get some solutions.

Thanks again and warm regards

Anand

On Mon, Aug 3, 2015 at 4:09 PM, Roman Luštrik roman.lust...@gmail.com
wrote:

 What is the variability of the plotted variable?

 Cheers,
 Roman

 On Sun, Aug 2, 2015 at 11:03 AM, Anand Sookun asoo...@gmail.com wrote:

 Hi

 I have kriged my data but the map shows uniform colours - no gradual
 contour colour plot on map

 code: print(spplot(k40, var1.pred, asp=1,
 col.regions=bpy.colors(64),main=OK prediction, log-ppm Zn))

 thnaks for any help

 Anand Sookun
 --
 ---
 *Anand Sookun (**MPhil. **PhD Candidate, University of Mauritius)*
 *Director cum Freelance Consultant*
 *Soft Sustainable Services (Mauritius)*
 *Research and Consultancy*

 Website: http://sustain-ability.webs.com/



 https://www.linkedin.com/profile/view?id=161468467trk=nav_responsive_tab_profile_pic

 [[alternative HTML version deleted]]

 ___
 R-sig-Geo mailing list
 R-sig-Geo@r-project.org
 https://stat.ethz.ch/mailman/listinfo/r-sig-geo




 --
 In God we trust, all others bring data.




-- 
---
*Anand Sookun (**MPhil. **PhD Candidate, University of Mauritius)*
*Director cum Freelance Consultant*
*Soft Sustainable Services (Mauritius)*
*Research and Consultancy*

Website: http://sustain-ability.webs.com/


https://www.linkedin.com/profile/view?id=161468467trk=nav_responsive_tab_profile_pic
Lat,Lon,DCO2_Xpowr
57.4623,-20.1761,11.06449137
57.4938,-20.1628,12.30966604
57.5147,-20.1791,9.763761194
57.5135,-20.1634,9.907643355
57.5065,-20.1484,10.5670516
57.5385,-20.1694,9.838228196
57.5305,-20.1001,9.548338451
57.5573,-20.1171,7.809539255
57.5993,-20.1509,6.679576196
57.5674,-20.184,7.127874261
57.6036,-20.1257,8.265899517
57.5865,-20.0463,8.210560118
57.5753,-20.159,9.335306993
57.5667,-20.0743,7.818804659
57.5763,-20.1031,9.449380721
57.6265,-20.096,8.332084482
57.5923,-20.0699,9.688198548
57.5297,-20.0628,9.290967463
57.5431,-20.1272,10.08502632
57.5493,-20.0682,6.939564654
___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


Re: [R-sig-Geo] help: krigged map do not show colours

2015-08-04 Thread Anand Sookun
DearJon

Thnaks. I will try that soon.

Cheers

Anand

On Tue, Aug 4, 2015 at 4:55 PM, Jon Skoien jon.sko...@jrc.ec.europa.eu
wrote:

 Anand,

 I could not open your .grd file in R, I think the .gri file is missing.
 However, looking at it in a text editor, and comparing with your R-script,
 it seems something went wrong with your projections. Your .csv-file has
 LatLong coordinates, but you are setting the projection to +proj=utm
 +zone=40 +south +datum=WGS84 +units=m +no_defs +ellps=WGS84
 +towgs84=0,0,0, the same as you seem to have in your prediction raster.
 But you need to reproject your observations in this case.

 # First set the right projection:
 proj4string(carbon_seq) - CRS(+init=epsg4326) # epsg-code for latlong
 # Then transform
 carbon_seq = spTransform(carbon_seq, CRS(+proj=utm +zone=40 +south
 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0))

 If you do this, your prediction grid should overlap your observations, and
 the colors should reflect your color ramp. What you essentially did before
 was to make a prediction thousands of km away from your observations, and
 then all values will be the same.

 Best wishes,
 Jon


 On 8/4/2015 12:48 PM, Anand Sookun wrote:

 Dear Jon and Roman

 Thanks for the reply.

 Im attaching the code.

 You may be right that the variogram may be problematic but it fitted
 well visually.

 I think also that the prediction grid was not well created. I wiould be
 grateful to have to hints.code how to create a useful grid and also for
 the spplot or other alternatives

 I can send more info if required.

 Cheers

 Anand

 On Tue, Aug 4, 2015 at 1:39 PM, Jon Skoien jon.sko...@jrc.ec.europa.eu
 mailto:jon.sko...@jrc.ec.europa.eu wrote:

 Hi,

 You have attached some data, but we still dont know exactly what you
 do with the data (do you use the logarithm, how many bins, did you
 project the data set...?). However, having had a quick look using
 the LatLong coordinates (not really recommended), I can see that the
 variogram from this data set is not particularly well defined, and
 it could well be that you fitted a model with pure nugget effect. In
 that case you will get the same prediction everywhere and no color
 differences.

 Have a look at
   summary(map)
 and particularly the summary of var1.pred.
 You could also plot the variogram of the data together with your
 model, vmf, and see how they fit.

 I am not sure what you mean by not being able to create a prediction
 grid with data included. Do you mean that you want a grid which
 exactly overlays some of the data points? Matching one point should
 not be difficult, 2 and 3 should be possible, but you might get some
 problems with precision (FAQ 7.31).

 Best wishes,
 Jon




 On 8/3/2015 5:30 PM, Anand Sookun wrote:

 Hi

 Thank you Roman for your kind response.

 The data is as attached which is part of the whole dataset.

 My other problem is that im not able to create an appropriate
 prediction grid with some data included.

 The codes which failed to show colour ramps are

 map - krige(logcarbseq ~ 1, locations = carbon_seq, newdata =
 map,model = vmf)
 str(map)
 print(spplot(map, var1.pred, asp=1,
 col.regions=bpy.colors(64),main=OK prediction, carbon))
 print(spplot(map, var1.var,col.regions=cm.colors(64),asp=1,
 main=OK prediction variance, carbon))

 I look forward to hopefully get some solutions.

 Thanks again and warm regards

 Anand

 On Mon, Aug 3, 2015 at 4:09 PM, Roman Luštrik
 roman.lust...@gmail.com mailto:roman.lust...@gmail.com wrote:

 What is the variability of the plotted variable?

 Cheers,
 Roman

 On Sun, Aug 2, 2015 at 11:03 AM, Anand Sookun
 mailto:asoo...@gmail.comasoo...@gmail.com
 mailto:asoo...@gmail.com wrote:

 Hi

 I have kriged my data but the map shows uniform colours -
 no gradual
 contour colour plot on map

 code: print(spplot(k40, var1.pred, asp=1,
 col.regions=bpy.colors(64),main=OK prediction, log-ppm Zn))

 thnaks for any help

 Anand Sookun
 --
 ---
 *Anand Sookun (**MPhil. **PhD Candidate, University of
 Mauritius)*
 *Director cum Freelance Consultant*
 *Soft Sustainable Services (Mauritius)*
 *Research and Consultancy*

 Website: http://sustain-ability.webs.com/



 https://www.linkedin.com/profile/view?id=161468467trk=nav_responsive_tab_profile_pic

 [[alternative HTML version deleted]]

 ___
 R-sig-Geo mailing list
 R-sig-Geo@r-project.org mailto:R-sig-Geo@r-project.org
 https://stat.ethz.ch

[R-sig-Geo] help: krigged map do not show colours

2015-08-03 Thread Anand Sookun
Hi

I have kriged my data but the map shows uniform colours - no gradual
contour colour plot on map

code: print(spplot(k40, var1.pred, asp=1,
col.regions=bpy.colors(64),main=OK prediction, log-ppm Zn))

thnaks for any help

Anand Sookun
-- 
---
*Anand Sookun (**MPhil. **PhD Candidate, University of Mauritius)*
*Director cum Freelance Consultant*
*Soft Sustainable Services (Mauritius)*
*Research and Consultancy*

Website: http://sustain-ability.webs.com/


https://www.linkedin.com/profile/view?id=161468467trk=nav_responsive_tab_profile_pic

[[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo