Re: [R-sig-Geo] inconsistent as.data.frame(SpatialPointsDF)

2015-03-20 Thread dschneiderch
73002225 2 77002347 3 91252781 4 79902435 5 92002804 6 71002164 Dominik Schneider o 303.735.6296 | c 518.956.3978 On Fri, Mar 20, 2015 at 11:02 AM, dschneiderch [via R-sig-geo] ml-node+s2731867n758792

Re: [R-sig-Geo] inconsistent as.data.frame(SpatialPointsDF)

2015-03-20 Thread dschneiderch
Hi - Thanks for your replies. I should have mentioned, I made sure to test this with a clean workspace before posting and confirmed the behavior this morning. it sounds like the names of the coordinates should never change? another example of the names being converted at the prompt from Longitude,

Re: [R-sig-Geo] inconsistent as.data.frame(SpatialPointsDF)

2015-03-20 Thread dschneiderch
Edzer - Look like we posted at the same time. In my example my coordinates are named, no? I tried your example in my R environment and can replicate the behavior I mentioned. df = data.frame(x=1:2, y=2:1, z = 3:4) df1 = df library(sp) coordinates(df1) = ~x+y as.data.frame(df1) x y z 1 1 2

[R-sig-Geo] inconsistent as.data.frame(SpatialPointsDF)

2015-03-19 Thread dschneiderch
I have a spatial points dF that is causing me trouble. I've figured out what is happening but without a clue why. at the prompt, I do locs class : SpatialPointsDataFrame features: 10 extent : -112.0623, -109.0571, 33.65387, 36.32678 (xmin, xmax, ymin, ymax) coord. ref. :

Re: [R-sig-Geo] stack many files without loading into memory

2015-02-25 Thread dschneiderch
, 2015 at 1:30 PM, dschneiderch [via R-sig-geo] ml-node+s2731867n7587748...@n2.nabble.com wrote: Ok - Looks like it worked this time for 112 files from 2012. The netcdf is 2.25 GB while the compressed multiband geotiff is 510MB. Does the netcdf have so much overhead- the 112 file at 10MB each

Re: [R-sig-Geo] stack many files without loading into memory

2015-02-06 Thread dschneiderch
Ok - Looks like it worked this time for 112 files from 2012. The netcdf is 2.25 GB while the compressed multiband geotiff is 510MB. Does the netcdf have so much overhead- the 112 file at 10MB each are only 1.12 GB individually? I like the tidiness of 1 file per year so I'll have to play with how

Re: [R-sig-Geo] writeRaster does not preserve names when writing to NetCDF

2015-02-06 Thread dschneiderch
I was running into this problem and wondering if there was any progress? As a workaround, I was trying to add an attribute to my variable using ncput_att but it doesn't show more than 1 (no warning was shown that only 1 could be accepted and the min/max attributes have a value for each layer).

Re: [R-sig-Geo] stack many files without loading into memory

2015-02-06 Thread dschneiderch
Hi Michael - Yes saving as GTiff with the compression options reduced the file size from ~10MB to ~2.5M for a single file but I am having a lot of trouble getting it to save the whole stack. I'm definitely running out of memory on my computer so maybe R is being slow and timing out? I've left it

Re: [R-sig-Geo] Count values greater than in rasterbrick layers

2014-07-22 Thread dschneiderch
Thiago - With regards to your original attempt for part b, I believe using length() instead of sum() will get you what you want. In this case, sum(x) and sum(x[x1]) are the same assuming you have no values less than 1. Length can be used as a proxy for counting how many days rain1. -- View

Re: [R-sig-Geo] spatial modelling projection question

2014-05-14 Thread dschneiderch
thanks for everyone's input. I have looked through the USGS publication but will also check out those articles. I suppose, like with everything, some sensitivity tests for the variogram models is in order. My domain is the Upper Colorado River basin and covers 4 UTM zones (12,13: S, T) which is

Re: [R-sig-Geo] plot raster: how to eliminate surrounding white space?

2013-08-28 Thread dschneiderch
In the past I've plotted it, adjusted the window by hand until the white space is gone and then used dev.size() to get the dimensions. In your script you can then specify those dimensions. Not a very practical way to do it but if you are plotting several images of the same size it helps. --

Re: [R-sig-Geo] raster::stack() help

2013-07-31 Thread dschneiderch
Thanks for the advice Robert. I'll give those a try if I continue to have problems. For now my code is running again. -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/raster-stack-help-tp7584298p7584313.html Sent from the R-sig-geo mailing list archive at Nabble.com.

Re: [R-sig-Geo] NoData value in writeRaster function

2013-07-30 Thread dschneiderch
Did you look at help(writeRaster)? You should be able to specify /NAflag: Numeric. To overwrite the default value used to represent NA in a file/You may need to manually change all your existing nodata values in i1 to NA first. -- View this message in context:

Re: [R-sig-Geo] raster::stack() help

2013-07-30 Thread dschneiderch
Yeah I figure it'll work for most people. I just logged into my desktop from home to get my sessioninfo and now a.stack-stack() worked as expected, at least in terminal as opposed to emacs or R gui. aarrrgg. anyway, thanks for responding. sessionInfo() R version 2.15.2 (2012-10-26) Platform:

Re: [R-sig-Geo] Trouble with universal kriging

2013-06-21 Thread dschneiderch
Thanks for the heads up on +proj. I had not noticed that difference. I read chapter 8, twice now. It is not clear to me what the error message I'm getting means: Error in gstat.formula.predict(d$formula, newdata, na.action = na.action, : NROW(locs) != NROW(X): this should not occur In