Hi All,
I am using ggplot2 to map shape files – I have been successful until now.
I ran the NOAA Hysplit model which creates a GIS shapefile.
I use library(rgdal) and library(rgeos) to read the shp using the folowing code:
HA <- readOGR("q:/20130430", "GIS_traj01_199021")
HA <- spTransform(HA, CRS("+proj=longlat +datum=WGS84"))
HA@data$id = rownames(HA@data)
HA.points = fortify(HA, region="id")
HA.df = join(HA.points, HA@data, by="id")
But I get the following message:
Error: ggplot2 doesn't know how to deal with data of class SpatialPointsDataFrame
Any advice?
Thanks.
Cheers,
Jean-Paul Huys