<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Philippe,<br>
<br>
You may be trying to this entirely programmatically, but if you're
willing to get a little help from an outside shapefile (and you have a
shapefile of UTM zones) you can overlay your data in R. If you have
ArcGIS it probably came with the ESRI Data and Maps which has a UTM
zones shapefile. Then you could use code like the following:<br>
<br>
library(rgdal)<br>
library(maptools)<br>
<br>
<br>
utm.zones<-readShapePoly("d:/gisdata/world/utmzone.shp")<br>
<br>
# here I read in my monitors, but you could create the file from your
points<br>
monitors<-readShapePoints("d:/pilot_monitors.shp")<br>
x<-overlay(monitors, utm.zones)<br>
<br>
<br>
proj4string(monitors)<-CRS("+proj=longlat +datum=WGS84")<br>
<br>
monitors$utm.zone<-as.character(as(utm.zones[,],
"data.frame")[my.overlay,"ZONE"])<br>
monitors$utm.row<-as.character(as(utm.zones[,],
"data.frame")[my.overlay,"ROW"])<br>
<br>
And then you could loop through the zones that exist and do the
projection.<br>
<br>
zone10<-spTransform(zone10, CRS("+proj=utm +zone=10 +ellps=GRS80
+datum=NAD83 +units=m +no_defs +towgs84=0,0,0"))<br>
<br>
Zev<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:r-sig-geo-request@stat.math.ethz.ch">r-sig-geo-request@stat.math.ethz.ch</a> wrote:
<blockquote
cite="midmailman.21.1156500005.25916.r-sig-geo@stat.math.ethz.ch"
type="cite">
<pre wrap="">Send R-sig-Geo mailing list submissions to
        <a class="moz-txt-link-abbreviated" href="mailto:r-sig-geo@stat.math.ethz.ch">r-sig-geo@stat.math.ethz.ch</a>
To subscribe or unsubscribe via the World Wide Web, visit
        <a class="moz-txt-link-freetext" href="https://stat.ethz.ch/mailman/listinfo/r-sig-geo">https://stat.ethz.ch/mailman/listinfo/r-sig-geo</a>
or, via email, send a message with subject or body 'help' to
        <a class="moz-txt-link-abbreviated" href="mailto:r-sig-geo-request@stat.math.ethz.ch">r-sig-geo-request@stat.math.ethz.ch</a>
You can reach the person managing the list at
        <a class="moz-txt-link-abbreviated" href="mailto:r-sig-geo-owner@stat.math.ethz.ch">r-sig-geo-owner@stat.math.ethz.ch</a>
When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-sig-Geo digest..."
Today's Topics:
1. Mass conversions of Lat/Long to UTM (many zone) (Philippe Roy)
2. Re: Mass conversions of Lat/Long to UTM (many zone) (Roger Bivand)
3. Spatial Panel data, random effects model (<a class="moz-txt-link-abbreviated" href="mailto:mzh@ualberta.ca">mzh@ualberta.ca</a>)
4. Re: Spatial Panel data, random effects model (Edzer J. Pebesma)
5. problem assigning POSIX class to AttributeList column
(Edzer J. Pebesma)
----------------------------------------------------------------------
Message: 1
Date: Thu, 24 Aug 2006 13:25:48 -0400
From: "Philippe Roy" <a class="moz-txt-link-rfc2396E" href="mailto:Roy.Philippe@ouranos.ca"><Roy.Philippe@ouranos.ca></a>
Subject: [R-sig-Geo] Mass conversions of Lat/Long to UTM (many zone)
To: <a class="moz-txt-link-rfc2396E" href="mailto:r-sig-geo@stat.math.ethz.ch"><r-sig-geo@stat.math.ethz.ch></a>
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:B114F711FB1C3247AABAF298491DA8242E357A@climat.ouranos.ca"><B114F711FB1C3247AABAF298491DA8242E357A@climat.ouranos.ca></a>
Content-Type: text/plain
Hi everyone! I'm new to R. I'll try using it for some Kriging. My aim in the short-term is to convert my 2300 stations database from lat-long to UTM. This network of stations goes from Virginia to the south, to Montréal to the north, east coast to Michigan in the west. So, I have a lot of UTM zones to consider.
Reading the archives, I've seen this formula to calculate the zones, based on lat-long coordinates :
UTM = floor((lon + 180) / 6) + 1
So, if I understand correctly, I need to run this formula on each station to get their zone, abnd then I use something like convUL ?
        [[alternative HTML version deleted]]
------------------------------
Message: 2
Date: Thu, 24 Aug 2006 21:28:28 +0200 (CEST)
From: Roger Bivand <a class="moz-txt-link-rfc2396E" href="mailto:Roger.Bivand@nhh.no"><Roger.Bivand@nhh.no></a>
Subject: Re: [R-sig-Geo] Mass conversions of Lat/Long to UTM (many
        zone)
To: Philippe Roy <a class="moz-txt-link-rfc2396E" href="mailto:Roy.Philippe@ouranos.ca"><Roy.Philippe@ouranos.ca></a>
Cc: <a class="moz-txt-link-abbreviated" href="mailto:r-sig-geo@stat.math.ethz.ch">r-sig-geo@stat.math.ethz.ch</a>
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:Pine.LNX.4.44.0608242114230.17874-100000@reclus.nhh.no"><Pine.LNX.4.44.0608242114230.17874-100000@reclus.nhh.no></a>
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
On Thu, 24 Aug 2006, Philippe Roy wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi everyone! I'm new to R. I'll try using it for some Kriging. My aim
in the short-term is to convert my 2300 stations database from lat-long
to UTM. This network of stations goes from Virginia to the south, to
Montr?al to the north, east coast to Michigan in the west. So, I have a
lot of UTM zones to consider.
Reading the archives, I've seen this formula to calculate the zones,
based on lat-long coordinates :
UTM = floor((lon + 180) / 6) + 1
So, if I understand correctly, I need to run this formula on each
station to get their zone, abnd then I use something like convUL ?
</pre>
</blockquote>
<pre wrap=""><!---->
If you want to use all the stations together, then they must be in the
same zone (otherwise the western edge of the zone will jump for stations
in different zones). I think that for continental North America a central
UTM zone will not be a very good idea, and that probably a Lambert
Azimuthal Equal Area is a better choice.
You can then use project() or spTransform() in the rgdal package, for
example, with EPSG code 2163:
US National Atlas Equal Area
+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m
with some modification of +lat_0 and +lon_0 to suit your region.
</pre>
<blockquote type="cite">
<pre wrap="">        [[alternative HTML version deleted]]
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Zev Ross
ZevRoss Spatial Analysis
303 Fairmount Ave.
Ithaca, NY 14850
(607) 277-0004 (phone)
(866) 877-3690 (fax toll-free)
<a class="moz-txt-link-abbreviated" href="mailto:zev@zevross.com">zev@zevross.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.zevross.com">www.zevross.com</a></pre>
<br>
<pre class="moz-signature" cols="72">--
Zev Ross
ZevRoss Spatial Analysis
303 Fairmount Ave.
Ithaca, NY 14850
(607) 277-0004 (phone)
(866) 877-3690 (fax toll-free)
<a class="moz-txt-link-abbreviated" href="mailto:zev@zevross.com">zev@zevross.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.zevross.com">www.zevross.com</a></pre>
</body>
</html>