Swiss Grid Tools

I just published a utility class to facilitate coordinate transformations between latlon (WGS84, or ETRS89, not so clear) and the “old” Swiss reference frame, LV03/CH1903. The class allows transformations using either the PROJ.4 library, or it uses the REST-API provied by swisstopo. Comparing the two gives some peace of mind regarding correctness: The difference is mostly about 1 centimeter. Still need to put the “new” LV95/CH1903+ into it.

Example:

from WGS84-LV03 import Convert

bern = (7.43861, 46.951)
zurich = (8.55, 47.37)
C = Convert()
C.convert([bern, zurich])

Out[1]: 
[(599998.2101365564, 199990.7321469287),
 (683940.6285646699, 247167.5578803884)]