Anna,<br><br>You should probably install those &#39;datum shift grid files&#39; as per <a href="http://trac.osgeo.org/proj/">http://trac.osgeo.org/proj/</a>, and set up their location in the PROJ_LIB environment setting.<br>
In case if you&#39;re on Windows the files are already included in the pre-compiled packages available from here: <a href="http://vbkto.dyndns.org:1280/sdk/">http://vbkto.dyndns.org:1280/sdk/</a><br>The files are located in the /bin/proj/SHARE subdirectory.<br>
<br>Best regards,<br><br>Tamas<br><br><br><br><div class="gmail_quote">2009/10/5 Anna Hentzel <span dir="ltr">&lt;<a href="mailto:wibge@gmail.com">wibge@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I&#39;m trying to convert WGS84 coordinates to UTM and NAD27. I&#39;m using<br>
the route-me library, which is a thin wrapper on proj4. It just<br>
creates the PJ objects using pj_init_plus on the strings, and calls<br>
pg_transform. The transformation to UTM works correctly, but the NAD27<br>
transformation doesn&#39;t change the coordinates. Does anyone know what I<br>
might be doing wrong?<br>
<br>
CLLocationCoordinate2D coord = {60, -119};<br>
int zone = ((coord.longitude + 186) / 6);<br>
<br>
RMProjection* latLonProj = [[RMProjection alloc]<br>
initWithString:@&quot;+proj=latlong +ellps=WGS84 +datum=WGS84&quot;];<br>
RMProjection* utmProj = [[RMProjection alloc] initWithString:<br>
[NSString stringWithFormat:@&quot;+proj=utm +zone=%d +ellps=WGS84&quot;, zone]];<br>
<br>
RMTransform* trans = [[RMTransform alloc] initFrom:latLonProj To:utmProj];<br>
<br>
CLLocationCoordinate2D transCoord = [trans projectForward:coord AtZoom:9];<br>
NSLog(@&quot;UTM Coord %f, %f %d&quot; , transCoord.latitude, transCoord.longitude, zone);<br>
<br>
RMProjection* nad27Proj = [[RMProjection alloc]<br>
initWithString:@&quot;+proj=latlong +ellps=WGS84 +datum=NAD27 +no_defs&quot;];<br>
trans = [[RMTransform alloc] initFrom:latLonProj To:nad27Proj];<br>
transCoord = [trans projectForward:coord AtZoom:9];<br>
NSLog(@&quot;NAD27 Coord %f, %f&quot; , transCoord.latitude, transCoord.longitude);<br>
<br>
**output**<br>
UTM Coord 6653097.435298, 388455.958023 11<br>
NAD27 Coord 60.000000, -119.000000<br>
<br>
<br>
Thanks,<br>
Anna<br>
_______________________________________________<br>
Proj mailing list<br>
<a href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/proj" target="_blank">http://lists.maptools.org/mailman/listinfo/proj</a><br>
</blockquote></div><br>