On 8 October 2010 19:52, Barry Rowlingson <b.rowling...@lancaster.ac.uk>wrote:
> On Fri, Oct 8, 2010 at 5:32 PM, ogbos okike <ogbos.ok...@gmail.com> wrote: > > > My data points are given in latitude and longitude (geographic). Using > AACGM > > geomagnetic coordinate software, I converted them to magnetic > coordinates. > > World map (such as implemented in R, which can be generated using maps > has > > no data points). It is only implemented in R such that one can use maps > > library to generate it. However, that is in geographic coordinates. > > I'm not sure what world map you are referring to here. Can you tell > us the R commands that plot it? > > library(maps) data(worldMapEnv) map("world") The three steps above in R gives you the world map I mean. The data points are in there somewhere, Yes. The points are there. Thanks. But I wonder how R use those few data points to create the map. Transforming them will be easy for me but how to feed them back to R so as to use map library to generate the world map will be a problem. Plotting the transformed coordinates (world) using raster will not make meaning as it will not appear as map. What I am doing involves using raster package to plot huge lightning strikes detected over the globe and using map("world", add = TRUE) to add world map to the raster plots. That works perfectly well if I leave my data in geographic coordinates. But since I wish to know how this behaves in magnetic coordinates, I need to transform both (i.e. I also need the world map above in magnetic coordinate. > and if you want to transform > them with something that isn't spTransform then we'll have to tell you > how to get them. If the map is a SpatialPolygonsDataFrame then the > coordinates are obtained by getting the individual polygons which are > made up of rings which are made up of points and so on. Messy but > possible to apply a generic transformation function to them. > > What does your conversion software work on? Text files? > > Yes Ogbos > Barry > [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo