An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110506/e884dc32/attachment.pl>
how to change provincial boundaries and combine two regions
3 messages · 王国成, Barry Rowlingson
On Fri, May 6, 2011 at 11:56 AM, ??? <wangguocheng1986 at gmail.com> wrote:
Hi, all
I recently have a problem about Chinese map drawing. The original code as
follows:
*library(maps)
library(mapdata)
map('china')*
This is a China map with provincial boundaries. First, how to change the
boundaries into dashed lines? Second, how to combine two regions (like Xin
Jiang and Tibet) together and create a new bold boundary of this new region
combined by Xin Jiang and Tibet?
?map says:
...: Extra arguments passed to ?polygon? or ?lines?.
and if you read ?lines and ?polygon you'll see that dashed lines can
be drawn using the lty parameter.
map("china",lty=2) will get you dashed lines.
Your second question is a bit harder. The china data in the mapdata
package seems to not have the region names, and merging regions from
maps package data format might be a bit tricky.
Try getting China map data in shapefile or RData format from
www.gadm.org - then you can merge areas using some of the functions of
the sp package, or you can do it interactively using a GIS - I
recommend Quantum GIS as a free, open-source package which can do this
kind of editing very easily.
Barry
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110507/90e04d5c/attachment.pl>