Re: [R-sig-Geo] raster resolution

2013-02-25 Thread Matteo Mattiuzzi
Dear Ross, no you missunderstud. The area of a (square) pixel is computed by a^2 where 'a' is the length of one pixel side. In your case a^2 = 100 qkm (and a^2 = 1000 qkm in the second case). So if you want 'a' from your area's you have to make sqrt(100[km]) and sqrt(1000[km]), the result is

Re: [R-sig-Geo] units of spatial distance in variogram

2013-02-25 Thread Edzer Pebesma
if your data are latitude/longitude, and you specified them to be so (i.e., is.projected(object) is TRUE), then distance is in km, else distance is in the units of the original data coordinates. (I recognized your output to come from gstat::variogram, but please mention such details in future

[R-sig-Geo] Spatiotemporal inquiry

2013-02-25 Thread ping yang
Dear R, I have a question for conducting a spatio-temporal inquiry, suppose I have a time series of air temperature data for 100 years for my domain, can I perform a inquiry like this *How many days are there temperature above 40 degree *(CC) and get all these days, I noticed there are evolving

Re: [R-sig-Geo] Spatiotemporal inquiry

2013-02-25 Thread Edzer Pebesma
On 02/25/2013 02:24 PM, ping yang wrote: Dear R, I have a question for conducting a spatio-temporal inquiry, suppose I have a time series of air temperature data for 100 years for my domain, can I perform a inquiry like this *How many days are there temperature above 40 degree *(CC) and get

[R-sig-Geo] Parallel processing engine for raster now available on CRAN

2013-02-25 Thread Jonathan Greenberg
Folks: After about a year of working on this package, I finally got spatial.tools pushed out to CRAN this weekend. The core function (?focal.hpc) provides an engine for realizing parallel/cluster processing of raster files with some features to make the development of the functions easier for

[R-sig-Geo] foreach progress bar?

2013-02-25 Thread Jonathan Greenberg
Folks: Has anyone figured out a general solution to create a foreach progress bar, updated as each iteration is completed? --j -- Jonathan A. Greenberg, PhD Assistant Professor Global Environmental Analysis and Remote Sensing (GEARS) Laboratory Department of Geography and Geographic

Re: [R-sig-Geo] foreach progress bar?

2013-02-25 Thread Forrest Stevens
On Mon, Feb 25, 2013 at 2:12 PM, Jonathan Greenberg j...@illinois.edu wrote: Folks: Has anyone figured out a general solution to create a foreach progress bar, updated as each iteration is completed? --j The following is what I use frequently, but you should note that the raster package

Re: [R-sig-Geo] Lightning density map

2013-02-25 Thread Adrian Antonescu
Hi, Two weeks ago I have asked a question regarding the use of R for plotting lightning density maps. Thanks to you answers I was able to go one step further. Attached is the .R script and a sample of the data. The script is counting the number of lightning strikes in hexagons, and then is

[R-sig-Geo] interoperating SpatialLinesDataFrame, SpatialPolygonsDataFrame

2013-02-25 Thread Tom Roche
How to cast SpatialPolygonsDataFrame (SPDF) to SpatialLinesDataFrame (SLDF), or vice versa? Alternatively, how best to write a function to use either an SPDF or an SLDF as a map overlay in levelplot(...)? Why I ask: https://bitbucket.org/tlroche/clm_cn_global_to_aqmeii-na regrids a dataset from

Re: [R-sig-Geo] MADIFA results

2013-02-25 Thread Mathieu Basille
Dear Michela, I apologize for the late answer. From the help of mahasuhab, section Details: ?mahasuhab The function ‘mahasuhab’ first computes this mean vector as well as the variance-covariance matrix of the niche density function, based on the value of habitat variables in the

[R-sig-Geo] converting from NAD83 datum to lat,lon

2013-02-25 Thread Migun Shakya
Hi all, Is there a way/package/trick to convert the NAD83 formatted file to lat lon format? I downloaded the Major Hydrography dataset from NC,USA to plot rivers into a NC map. However, the dataset is in NAD83 or in state plane projection, but i need it to be in lat/lon. Any help would be

Re: [R-sig-Geo] converting from NAD83 datum to lat,lon

2013-02-25 Thread Hodgess, Erin
Hi! Suppose your data set is called nc1.df. Then you can do: library(rgdal) nc1.wgs84 - spTransform(nc1.df,CRS(+proj=longlat +datum=WGS84)) From: r-sig-geo-boun...@r-project.org [r-sig-geo-boun...@r-project.org] on behalf of Migun Shakya

Re: [R-sig-Geo] Lightning density map

2013-02-25 Thread Edzer Pebesma
On 02/25/2013 11:00 PM, Adrian Antonescu wrote: Hi, Two weeks ago I have asked a question regarding the use of R for plotting lightning density maps. Thanks to you answers I was able to go one step further. Attached is the .R script and a sample of the data. The script is counting the

Re: [R-sig-Geo] interoperating SpatialLinesDataFrame, SpatialPolygonsDataFrame

2013-02-25 Thread Edzer Pebesma
Tom, say x is your SpatialPolygonsDataFrame, did you try the obvious, as(x, SpatialLinesDataFrame) ? On 02/25/2013 11:18 PM, Tom Roche wrote: How to cast SpatialPolygonsDataFrame (SPDF) to SpatialLinesDataFrame (SLDF), or vice versa? Alternatively, how best to write a function to use either

Re: [R-sig-Geo] converting from NAD83 datum to lat,lon

2013-02-25 Thread Migun Shakya
Hi Erin, I tried that but ended up getting this error. Does the spTransform function requires the data to be as data.frame? Here is what i did to read the data library(maptools) library(rgdal) nc.river-readShapeSpatial(~/hydromaj/hydromaj_arc.shp) #reading the shape file nc1.wgs84 -

Re: [R-sig-Geo] converting from NAD83 datum to lat,lon

2013-02-25 Thread Hodgess, Erin
Hi Migun: Do an str(nc.river) Is the proj4string string set, please? Thanks, Erin From: Migun Shakya [microbea...@gmail.com] Sent: Monday, February 25, 2013 7:45 PM To: Hodgess, Erin Cc: r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] converting from

Re: [R-sig-Geo] converting from NAD83 datum to lat,lon

2013-02-25 Thread Michael Sumner
You need an input projection on the data, it doesn't know what you are transforming FROM. Did you read this with maptools::readShapePoly? Try with rgdal:readOGR so you get the projection automatically with the object. I cannot download the data from the link you provide, but if you post the text

Re: [R-sig-Geo] converting from NAD83 datum to lat,lon

2013-02-25 Thread Hodgess, Erin
Try something like this: proj4string(nc.river) - CRS(+proj=lcc +lat_1=36.16 +lat_2=34.34 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs) From: Migun Shakya [microbea...@gmail.com]

Re: [R-sig-Geo] converting from NAD83 datum to lat,lon

2013-02-25 Thread Michael Sumner
Since you can install rgdal it would be best to go that way (I had completely missed that you obviously had access to rgdal::spTransform, please provide the code you are using as asked by the mailing list guidelines). library(rgdal) See ?readOGR You need a layer name, which can just be the

Re: [R-sig-Geo] converting from NAD83 datum to lat,lon

2013-02-25 Thread Migun Shakya
Hi Mike and Erin, I added the projection to the shape file as suggested by Erin. Then i plotted the rivers over and plotted my data points (places where i collected samples). All my data points look accurate. Thank you so much. This was my first try working with GIS data. And, it was fun.