[R-sig-Geo] symbols on a map

Drzyzga, Scott SADrzy at ship.edu
Mon Jun 27 15:06:53 CEST 2005


Susumu,

You might want to consider reading Paul Murrell's (2004) article, which
addresses the transparency issue.  His ideas can be used to achieve
great effects on both maps and plots.  Also, empirical scatterplots and
variogram clouds yield so much more information when the densities of
overlapping data can be observed and considered.  

All the best,
Scott Drzyzga

Geography & Earth Science Department
Shippensburg University


Murrel P (2004) Fonts, lines and transparency in R graphics. R News
4(2): 5-8.




-----Original Message-----
From: r-sig-geo-bounces at stat.math.ethz.ch
[mailto:r-sig-geo-bounces at stat.math.ethz.ch] On Behalf Of Susumu
Tanimura
Sent: Monday, June 27, 2005 8:33 AM
To: r-sig-geo at stat.math.ethz.ch
Subject: [R-sig-Geo] symbols on a map

Hi there,

My today's trial is to put symbols on a map.  After reading pnm files
(airport symbol) with read.pnm() from pixmap package, I overlaid the
pixmap objects on the map following their xy coordinates.

library(maptools)
library(pixmap)
airport <- function() {
  A <- "airp.shp"
  V <- "admin1.shp"
  plot((read.shape(V)))
  r <- read.pnm("air.ppm")
  a <- Map2points(read.shape(A))
  for (i in 1:length(a[,1]))
addlogo(r,px=c(a[i,1]-0.5,a[i,1]+0.5),py=c(a[i,2]-0.5,a[i,2]+0.5))
}

Unfortunately, resulted map was very ugly because the pnm format dose
not have transparency.  For mapping purpose, treating with a picture
format with alpha channel is needed.  Dose anyone succeed to put symbols
on a map of R?

It may very happy if I can use metapost, eps, or any other vector
formats for symbology of map.

--
Susumu Tanimura

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo




More information about the R-sig-Geo mailing list