Re: [R-sig-Geo] legend does not appear in all cases in a plot?

2010-10-14 Thread Edzer Pebesma
The x and y ranges of your plot depend on your data, but the (first) legend command hard codes coordinate values (-2, 0.5). These coordinate values may not be near enough to you data values to see it. On 10/14/2010 03:36 AM, govin...@msu.edu wrote: Hello all, Here I am with a plot issue -

[R-sig-Geo] problem with the sp.layout command

2010-10-14 Thread Klaus Vormoor
Dear list, I try to produce a map by sp.plot showing runoff forecasts along a river network. Additionally to the river network (lines), I want to plot a coast line (lines) and lakes (polygons) by using the sp.layout command. The drawing order should be the following: 1. rivers, 2. coast line, 3.

Re: [R-sig-Geo] Creating density heatmaps for geographical data

2010-10-14 Thread Karl Ove Hufthammer
Karl Ove Hufthammer wrote: However, since the ‘heatmap’ is really a density estimate, it integrates to 1. I would instead want the heatmap colours to correspond to real frequencies (of course, they do, but the actual mapping is not visible on the colour scale). I have been thinking a bit

Re: [R-sig-Geo] problem with the sp.layout command

2010-10-14 Thread Lyndon Estes
Hi Klaus, I recently wrote about the same problem, which Edzer has fixed with an sp package update: http://r-sig-geo.2731867.n2.nabble.com/spplot-1-filling-background-polygon-without-overwriting-foreground-polygon-2-left-justifying-sp-layot-td5615087.html#a5615087 Cheers, Lyndon On Thu, Oct

Re: [R-sig-Geo] Creating density heatmaps for geographical data

2010-10-14 Thread Sean O'Riordain
Karl, Thank you for that - some interesting ideas there. While not a solution for you - I'm working on a similar problem and I've discovered mapserver(.org) for the display side of things. It will handle rasters and shape files and display them quickly on a google map background. It will also

Re: [R-sig-Geo] Creating density heatmaps for geographical data

2010-10-14 Thread Michael Sumner
Just answering your first question, you could call sm.density for each point individually, then trim back to whatever level you want. Sum each grid for each point and you might get a better trim. Otherwise, you'd need to hack the density functions in kde2d or sm.density, or maybe in KernSmooth to

Re: [R-sig-Geo] DBF file size

2010-10-14 Thread Barry Rowlingson
On Wed, Oct 13, 2010 at 9:20 PM, kapo coulibaly kmcou...@gmail.com wrote: I'm doing Groundwater Modeling and that is the appropriate input format for the GUI I'm using (Groundwater vistas) for what I'm trying to do. Funny enough I was able to create a dbf with 512 columns in ArcGIS but as I

Re: [R-sig-Geo] reading .grd file in R?

2010-10-14 Thread govindas
 sure.. and thanks, i have not tried it yet! will let u know about it! thanks again! Thanks, Mahalakshmi Quoting Thiago Veloso thi_vel...@yahoo.com.br:   My suggestion is to convert your .grd files to self-descriptive ones, for example netcdf. Considering that you have some experience

[R-sig-Geo] How to build a spatial weights list for pooled data

2010-10-14 Thread Angela Parenti
Hello Roger and everybody else. I have another question about Weight Matrices. For one of my models I estimate a pooled regression. Then, in order run the Moran test on the pooled regression residuals I need to construct a spatial weights list of the same dimension. I already found the way

[R-sig-Geo] Rgshhs for getting maps around longitude 0

2010-10-14 Thread Karl Ove Hufthammer
Dear list members The GSHHS map data uses longitudes from 0 to 360, which causes problems fetching maps around longitude 0. Example: library(maptools) gpclibPermit() gshhs.c.b - system.file(share/gshhs_c.b, package=maptools) xl=c(-30,30) yl=c(50,80) rmap=Rgshhs(gshhs.c.b, xlim=xl, ylim=yl)

Re: [R-sig-Geo] Creating density heatmaps for geographical data

2010-10-14 Thread Karl Ove Hufthammer
Sean O'Riordain wrote: Thank you for that - some interesting ideas there. While not a solution for you - I'm working on a similar problem and I've discovered mapserver(.org) for the display side of things. It will handle rasters and shape files and display them quickly on a google map

[R-sig-Geo] Clip a raster

2010-10-14 Thread Manuel Spínola
Dear list members, I download bioclim data in a raster format (estension: .bil) and I would like to clip the variables to a ploygon stored as a shapefile (Costa Rica outline). How can I do that? I read the raster file like this: x - readGDAL(bio1_23.bil) Thank you very much in advance.

[R-sig-Geo] Requesting Jenks natural breaks implementation in R or Statistica

2010-10-14 Thread Macdonald, Robert
Dear r-sig-geo, I have data distributions (particle size distributions) and I have been advised to separate parts of the distributions using jenks natural breaks procedure. I am seeking a macro written directly for Statistica that can implement this, or else I am seeking Jenks natural breaks

Re: [R-sig-Geo] Clip a raster

2010-10-14 Thread Johannes Signer
Hi, with the raster package you could use: polygons to raster (?polygonsToRaster), converting the Costa Rica shapefile to a raster and then use mask (?mask). Best Johannes On Thu, Oct 14, 2010 at 5:16 PM, Manuel Spínola mspinol...@gmail.com wrote:  Dear list members, I download bioclim data

Re: [R-sig-Geo] Requesting Jenks natural breaks implementation in R or Statistica

2010-10-14 Thread Sean O'Riordain
Robert, I'm afraid I know nothing of the detail - but the ClassInt package does implement a number of different breaks algorithms. Refer http://cran.r-project.org/web/packages/classInt/ from which you can download the sources of course. Kind regards, Sean O'Riordain On 14 October 2010 16:26,

Re: [R-sig-Geo] DBF file size

2010-10-14 Thread Alex Mandel
Oh right I was thinking about max number of characters in a text field. It's possibly that the limit is based on the maximum number of bytes that can be used to hold one record. So the number of Columns would vary with how much data is actually in them.

Re: [R-sig-Geo] Clip a raster

2010-10-14 Thread Robert J. Hijmans
Manuel, if costarica is a SpatialPolygons* object, you can do: r - raster(bio1_23.bil) cr - crop(r, costarica) Robert On Thu, Oct 14, 2010 at 8:16 AM, Manuel Spínola mspinol...@gmail.com wrote:  Dear list members, I download bioclim data in a raster format (estension: .bil) and I would

Re: [R-sig-Geo] Clip a raster

2010-10-14 Thread Manuel Spínola
Thank you Roman and Johannes, What I am doing wrong? x - readGDAL(bio1_23.bil) xr = raster(x) map - readOGR(dsn=C:/ProyectoRespacial/EvalHab_reporte, layer=Cr_wgs84_meso) # shapefile r2 - polygonsToRaster(map, xr) Found 1 region(s) and 1 polygon(s) Error: no se puede ubicar un vector de

Re: [R-sig-Geo] Clip a raster

2010-10-14 Thread Manuel Spínola
Thank you very much Robert. That's works perfect. Manuel On 14/10/2010 10:21 a.m., Robert J. Hijmans wrote: Manuel, if costarica is a SpatialPolygons* object, you can do: r- raster(bio1_23.bil) cr- crop(r, costarica) Robert On Thu, Oct 14, 2010 at 8:16 AM, Manuel

Re: [R-sig-Geo] Convert asc grid to points

2010-10-14 Thread Rolf Turner
On 14/10/2010, at 8:34 AM, Arnaud Mosnier wrote: Dear GeoR users, Is there a function to convert ascii grid (created with adehabitat kernel function) into a points format (ppp or others). I don't know from ``ascii grid'' or ``adehabitat kernel'' but it is possible that you may find useful

[R-sig-Geo] Problems with mask (raster)

2010-10-14 Thread Manuel Spínola
Dear list members, I am working with bioclim variables to model species distribution. The files downloaded from Worldclim.org are generic raster files (.bil) I transform this files to raster: bio1 - raster(bio1_23.bil) cr = readOGR(dsn=C:/ProyectoRespacial/EvalHab_reporte,

Re: [R-sig-Geo] Problems with mask (raster)

2010-10-14 Thread Robert J. Hijmans
I think it should be: res - mask(bio1cr, crmask) On Thu, Oct 14, 2010 at 1:22 PM, Manuel Spínola mspinol...@gmail.com wrote:  Dear list members, I am working with bioclim variables to model species distribution. The files downloaded from Worldclim.org are generic raster files (.bil) I

[R-sig-Geo] trouble with readOGR() and shapes files

2010-10-14 Thread Ricardo Rodríguez
hi all I'm having problems with a shape file using the package with the following statement rgdal. *readOGR(dsn=/var/www/outputs/,layer=capa.dbf) * get this error or this error: *Error in ogrInfo(dsn = dsn, layer = layer, input_field_name_encoding = input_field_name_encoding) : Cannot open

Re: [R-sig-Geo] trouble with readOGR() and shapes files

2010-10-14 Thread Michael Sumner
Maybe try not using NULL but NULL (which is default anyway, so you could leave it out): readOGR(dsn=**/var/www/outputs/**, p4s=NULL, layer=**capa.dbf**)* I don't know about the asterisks - why are you using those in the second call with p4s, and not the first, and why is the layer name

Re: [R-sig-Geo] Problems with mask (raster)

2010-10-14 Thread Manuel Spínola
Thank you very much Robert, Now I have this error: me - maxent(bio1res, arb) Error en .local(x, p, ...) : more than half of the presence points have NA predictor values It could be related to the raster bio1res? The origin of this file is .bil files. Which is the best file format to

[R-sig-Geo] trouble with idw and writeGDAL

2010-10-14 Thread Ricardo Rodríguez
hi all I'm having problems, an IDW interpolation with the gstat package, using: *pruebar - idw(grado~1, prueba, prueba, idp = 2.0)* and when I create an image: *writeGDAL(pruebaR,prueba.tiff,type=Float32,driver=GTiff)* get the following error *Error: gridded(dataset) is not TRUE* how I can

[R-sig-Geo] Raster Package Aggregate new coordinates?

2010-10-14 Thread Elizabeth Crisfield
I'm using aggregate in the raster package. It looks like it uses the coordinate pair of the northwest corner of the original high res dataset as the new northwest corner of the aggregated dataset. This would be right if the coordinates were taken to be grid centered. But when I browse the data in

Re: [R-sig-Geo] Raster Package Aggregate new coordinates?

2010-10-14 Thread Robert J. Hijmans
On Thu, Oct 14, 2010 at 8:11 PM, Elizabeth Crisfield ea...@psu.edu wrote: I'm using aggregate in the raster package. It looks like it uses the coordinate pair of the northwest corner of the original high res dataset as the new northwest corner of the aggregated dataset. Correct, and the SE