Hi Dimitri
you can use the col.regions argument in case groups is a factor:
can2@data$groups-as.factor(can2@data$groups)
spplot(can2,zcol=groups,col.regions=c('red','blue','yellow','lightblue','green','orange'))
Hope this does what you were looking for...
Rafi
On 26.01.2012, at 21:42, Dimitri
Dear All,
I have build a small package, that main object is to compute:
1. city names that are close to another city
2. city names that are close to a zipcode
I have two questions:
-
a. for now, dataset is french data (zipcode + city + lat,lon): I would
like someting like:
Hi,
Do you have one layer of segments or two?
You'll find what you need in the spatstat package.
See
(self)crossing.psp find crossing points between two line segment patterns
Afterwards, it must possible to build new segments based on the
intersection points
Also, you have the GRASS v.clean
Hi,
You could use spatstat::nndist/nnwhich to find the nearest points.
Best,
Mathieu
2012/1/27 Antoine Lucas antoinelu...@gmail.com
Dear All,
I have build a small package, that main object is to compute:
1. city names that are close to another city
2. city names that are close to a
Hallo,
I try to use function remove.holes (library wild1) to remove holes from a
SPDF.
If test is a SPDF. It works with
for(i in (1:length(test@polygons))){
test@polygons[[i]] - remove.holes(test@polygons[[i]])
}
I think there must be a way without a loop. Maybe:
untried:
lapply(test@polygons, remove.holes)
On 01/27/2012 12:10 PM, Ingo Holz wrote:
Hallo,
I try to use function remove.holes (library wild1) to remove holes from a
SPDF.
If test is a SPDF. It works with
for(i in (1:length(test@polygons))){
test@polygons[[i]] -
Dear R-Geo List!
This is my first post on this list as I have a geographical task/problem
to solve.
I want to perform Species Distribution Models (SDM) and therefore
I have the points of occurence of several Species.
Unforunately all the environmental maps (climatic maps etc.) are in long-lat
Hi Matteo,
Ok, When I type on the cmd it is something like that
C:\Users\vikramgdalinfo the output is
'gdalinfo' is not recognised as an internal or external command,
operable program or batch file.
But I installed FWTools with it command prompt I tried,
C:\Program Files (x86)\FWtools2.4.7. The
FWTools uses a GDAL version older than 1.8.0 take care and check it with
'gdalinfo --version'. This would mean that all your GTiff files have an
offset of half a pixel!!
If 'gdalinfo --version' tells you something like that:
C:\gdalinfo --version
GDAL 1.7.0b2, FWTools 2.4.7, released 2010/01/19
Vielen-vielen Dank, Rafael.
A factor!
That does exactly what I wanted! Thanks a million!
Still can't figure out how to get rid of the legend on the right. I
couldn't find the solution here:
http://127.0.0.1:14681/library/sp/html/spplot.html
Or, if it's impossible, maybe one could at least change
I found an important part of the solution - was able to get rid of the legend!
library(raster)
can2-getData('GADM', country=CAN, level=2)
nrofunits-length(can2$NAME_2)
groups-c(rep(1:6,(nrofunits
%/%6)),rep(1,5))[order(c(rep(1:6,(nrofunits %/% 6)),rep(1,5)))]
# adding values (grouping values) to
Thanks a lot, everyone - I solved most of my challenges:
the last line of my code should read:
spplot(can2,zcol=groups,col.regions=classcolors,colorkey =
FALSE,lwd=.4,col='white',
par.settings = list(axis.line = list(col='transparent')))
Thanks a lot for your help!
Dimitri
On Fri, Jan 27,
Hello!
I have 2 maps - both created in ssplot and both identical in terms of
outline. Is there any way to superimpose Map1 (which has black borders
between Canadian provinces) onto Map2 (which is also a map of Canada)?
Thanks a lot for your hints!
Dimitri
### A. Reading in Canada data at the
13 matches
Mail list logo