1

I need to project my long/lat data over different utm zones in R as my data spans from Gabon to Central African Republic. The code I have written to project to zone 34 is as below:

library(rgdal)
EleSubSet$Xlong <- project(cbind(EleSubSet$location.long, EleSubSet$location.lat), 
                           "+proj=utm +zone=34 = south +ellps=WGS84") [,1]  

EleSubSet$Xlat <- project(cbind(EleSubSet$location.long, EleSubSet$location.lat), 
                          "+proj=utm + zone=34 = south +ellps=WGS84") [,2]

I presume I cannot simply add on another utm zone? e.g.

EleSubSet$Xlong <- project(cbind(EleSubSet$location.long, EleSubSet$location.lat),
                           "+proj=utm +zone=33 + 34 = south +ellps=WGS84") [,1]  

Anyone know if anything can be done?

rawr
  • 20,481
  • 4
  • 44
  • 78
  • please add a small example of the data, eg, `dput(head(EleSubSet))`, to your question along with the desired output – rawr Apr 28 '16 at 16:55
  • I'm sorry, I've never been on this site before and I can't find how to upload data. My desired output would be to project my longitude and latitude over UTM zone 33 and 34. – Natalie Matthews Apr 28 '16 at 17:25
  • `dput(data)` will write your `data` as text to your console so that you can copy/paste the output to your question – rawr Apr 28 '16 at 19:25

1 Answers1

1

Just adding the two zones in the projection definition will not work ("+proj=utm +zone=33 + 34 = south +ellps=WGS84".

You sometimes see people working with "modified" UTM projections, where a border (say a state or province) crosses the edge of a zone. In that case, you adopt the dominant zone's projection, but apply to a larger extent (and accept the limitations of that in terms of breaking the assumptions of that projection).

If you are mapping an area large enough to require 4 UTM zones, I would strongly consider looking for an alternative projection, for instance Albers Equal Area with custom reference latitude and longitude parameters. The choice depends entirely on what the map will be used for (are shapes important, areas, etc.) and this is well discussed in the literature (USGS, Wikipedia, etc.).

Benjamin
  • 11,560
  • 13
  • 70
  • 119