Looking through other answers on converting to or from NAD27 CONUS, I don't see an answer that seems to fit my problem.
I am creating paper topographic maps by layering information derived from USGS DEM data (NAD83) for contours and slope shading. I am using OpenStreetMap (OSM) data (WGS84) for trails, roads, water features, etc. Finally I am overlaying a UTM grid. All this is being formatted using Mapnik.
Everything is aligning well (trails and road appear correct with respect to the contours. The waterways from OSM also nicely match up with the drainages as shown by contours derived from USGS DEM data, etc.) And if I use WGS84 for my UTM grid it seems to line up well too, at least the positions of map features are the same within my measuring capability as a USGS topo map. But if I overlay a NAD27 UTM grid my easting grid lines appear to be off by about 85 meters. The northing grid lines appear to be correct. I could live with 5 or 10 meters as that is the accuracy of my GPS but not 85 meters.
I create the UTM grid by determining the UTM measurements for the edges of my map and then going to points the nearest even 1000 meters off paper and putting ways/lines between the points so located. The position of the points is converted to from UTM to lat,lon and the points and ways are written to a OSM XML file which is used as the source for the UTM grid layer in Mapnik.
Conversion of UTM to lat,lon is using pyproj in a Python script. My instantiation of the projection objects is as follows:
wgs84utm = pyproj.Proj(proj='utm', zone=v['zone'], datum='WGS84', ellps='WGS84') nad27utm = pyproj.Proj(proj='utm', zone=v['zone'], datum='NAD27', ellps='clrk66')
When I convert a point from UTM to lat,lon I use the following:
if (proj == 'wgs84'): point = wgs84utm(easting, northing, inverse=True) elif (proj == 'nad27'): point = nad27utm(easting, northing, inverse=True)
One thing that confuses me is I only see one NAD27 UTM setup in the pyproj espg list. Based on my GPS and other mapping programs I was expecting to see several (CONUS, Alaska, Canada, etc.). There is a NAD27 CONUS but it is an Albers projection, not a UTM projection. Based on values for that I tried
nad27utm = pyproj.Proj(proj='utm', zone=v['zone'], datum='NAD27', ellps='clrk66', lat_1=29.5, lat_2=45.5, lat_0=23, lon_0=-96, x_0=0, y_0=0)
But the results were the identical.
I am new with Python and map projection conversions, so I'm pretty sure that I've made some mistake in my usage of the projection library but don't know what.