I would like to transform from lon/lat (EPSG:4326) to a local x/y coordinate system for large scale equidistant maps with a map size of ca. 20 km. I need to do this mapping all over the globe apart from regions close to the poles. Looking at https://projectionwizard.org/ it suggests for 1x1 degs something like +proj=cass +lon_0=-121.5 +datum=WGS84 +units=m +no_defs.

However, when looking at distances e.g. high up in Norway, the distances are way off. I must be doing something wrong, but I have no clue what it is.

self.trans_proj = pyproj.Transformer.from_crs(
    'proj': 'cass',  # tmerc
    'x_0': '500000.0',
    'lon_0': str(self._lon),
    'lat_0': str(self._lat),
    'k_0': '0.9999',
    'datum': 'WGS84'

x, y, = self.trans_proj.transform(lon, lat, radians=False)

I set the lon_0 and lat_0 attributes to the current lon/lat of the centre of the map.

  • +proj=cass is cassini projection that only preserves (arc of greatcircle) distances in direction +-90 degrees from the central meridian of the projection.
    – swatchai
    Nov 8 '20 at 13:15

Using always_xy=True as the third parameter in the .from_crs() method solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.