Message-ID: <DB7363DD-79BA-44FC-89AF-C73F951D994D@eva.mpg.de>
Date: 2009-01-07T14:32:44Z
From: Hans-Jörg Bibiko
Subject: no boundaries between countries by using unionSpatialPolygons
Hi,
I have a tiny problem. I'm using Roger Bivand's ( http://spatial.nhh.no/R/etc/TM_WORLD_BORDERS_SIMPL-0.2.RData
) to create a plot showing two countries without boundaries. I did
this:
library("foreign")
library("sp")
library("maptools")
library("gpclib")
load("TM_WORLD_BORDERS_SIMPL-0.2.RData")
pe_bo_data <- wrld_simpl[wrld_simpl$NAME %in% c("Bolivia","Peru"),]
lps <- coordinates(pe_bo_data)
ID <- cut(lps[,1], quantile(lps[,1]), include.lowest=TRUE)
pe_bo <- unionSpatialPolygons(pe_bo_data, ID, threshold = NULL)
plot(pe_bo)
but the plot still shows the boundary between Peru and Bolivia. I also
tried to set a proper threshold but unfortunately no success.
What's wrong with my approach? I'd be glad for any hint!
I'm using R version 2.8.0 (2008-10-20) on Mac OSX 10.5.6 (Intel)
Thanks in advance,
--Hans