Re: [R-sig-Geo] execGRASS parsing problem

2010-04-22 Thread Roger Bivand
On Thu, 22 Apr 2010, Paulo van Breugel wrote: Dear list, In my GRASS GIS database I have the vector map 'inmap', which is a vegetation map with different vegetation types defined in column 'VT'. I want to split the vector map according to the VT in different vector maps as part of a larger scri

Re: [R-sig-Geo] assigning raster cell values based on predefined criteria

2010-04-22 Thread Robert J. Hijmans
I suspect this is because the raster you are using has a longitude/latitude CRS. This is the default if you create it using raster() -- I may change that. Set it to NA (or to what it really is) projection(r) <- NA And try again... Robert The picture suggest that you are not computing the dis

Re: [R-sig-Geo] Adding a shape with writeOGR

2010-04-22 Thread Alex Mandel
German Sanchez Hernandez wrote: > Dear all, > > I'm trying to save some shapes to a postGIS table. I can do it by: > > shape <- readShapePoly(...) > writeOGR(shape, dsn="PG:dbname=gis user=gis password=...", layer='onetable', > driver="PostgreSQL", layer_options="overwrite=yes") > > It emptie

Re: [R-sig-Geo] With spplot how to control panel font size?

2010-04-22 Thread Thomas Adams
Dylan, Thank you so much! That's just the tidbit I needed… BTW, I have your iPhone app — it's awesome! Regards, Tom Dylan Beaudette wrote: Hi Thomas, check out the generic lattice argument "par.strip.text". It accepts a list with common formatting options. Cheers, Dylan On Thu, Apr 22, 20

Re: [R-sig-Geo] With spplot how to control panel font size?

2010-04-22 Thread Dylan Beaudette
Hi Thomas, check out the generic lattice argument "par.strip.text". It accepts a list with common formatting options. Cheers, Dylan On Thu, Apr 22, 2010 at 8:32 AM, Thomas Adams wrote: > All: > > I am using spplot to automatically generate a 21-panel eps graphic within a > script where the titl

[R-sig-Geo] With spplot how to control panel font size?

2010-04-22 Thread Thomas Adams
All: I am using spplot to automatically generate a 21-panel eps graphic within a script where the titles for the individual panes are too large and they get cut-off at the beginning and end of the string. I have not been able to find how to fix the font size so the titles will fit. I've tried

[R-sig-Geo] execGRASS parsing problem

2010-04-22 Thread Paulo van Breugel
Dear list, In my GRASS GIS database I have the vector map 'inmap', which is a vegetation map with different vegetation types defined in column 'VT'. I want to split the vector map according to the VT in different vector maps as part of a larger script. I wrote a small script following the step

Re: [R-sig-Geo] assigning raster cell values based on predefined criteria

2010-04-22 Thread Marcelino de la Cruz
Sorry, that was the distance to the border of the polygon. For the distance to the centroid: # A example of polygon: ho_sp <- SpatialPolygons(list(Polygons(list(Polygon(cbind(c(0,1,1,0,0), c(0,0,1,1,0, ID="ho"))) ho.win <- as(ho_sp,"owin") centroide <- centroid.owin(ho.win) h2.ppp<

Re: [R-sig-Geo] assigning raster cell values based on predefined criteria

2010-04-22 Thread Marcelino de la Cruz
How about this?: library(spatstat) library(maptools) # A example of polygon: ho_sp <- SpatialPolygons(list(Polygons(list(Polygon(cbind(c(0,1,1,0,0), c(0,0,1,1,0, ID="ho"))) plot(ho_sp) ho.win <- as(ho_sp,"owin") ho.mask <- as.mask(ho.win) ho.dist<-bdist.pixels(ho.mask) plot(ho.dist) h

Re: [R-sig-Geo] assigning raster cell values based on predefined criteria

2010-04-22 Thread Roman Luštrik
This is the normal behavior (see image here) when I use option A-ish (calculating distance to a single point). Intuitively, however, I would expect the plot to look something like this (crudely drawn for your amusement

[R-sig-Geo] Adding a shape with writeOGR

2010-04-22 Thread German Sanchez Hernandez
Dear all, I'm trying to save some shapes to a postGIS table. I can do it by: shape <- readShapePoly(...) writeOGR(shape, dsn="PG:dbname=gis user=gis password=...", layer='onetable', driver="PostgreSQL", layer_options="overwrite=yes") It empties the "onetable" table. Then, how could I do if I