Hello, I'm starting to use the mpl_toolkits.basemap.pyproj.Proj class to do lon/lat to UTM coordinate conversion. I did some tests and noticed that there is a discrepancy between the mpl_toolkits.basemap.pyproj.Proj output and the proj commandline tool output.
e.g.: I'm converting the coordinates lat=48.2; lon=16.5 to UTM coordinates UTM zone 33 with WGS84 ellipse. I'm using the following proj4 string for the conversion: +proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs The output using mpl_toolkits.basemap.pyproj.Proj is: x: 611458.865; y: 5339596.032 The proj commandline tool using the same proj4 string gives: x: 611458.69 y: 5339617.54 As you can see, the y coordinate differs significantly. Here's the code used with the basemap pyproy classes: -------------------------------------------------- from mpl_toolkits.basemap.pyproj import Proj # I got the proj string from # http://spatialreference.org/ref/epsg/32633 myProj = Proj("+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs") lat = 48.2 lon = 16.5 (x,y) = myProj(lon, lat) print "x: %.3f; y: %.3f" % (x,y) --------------------------------------------------- Can somebody explain me this behavior? Regards, Stefan.
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users