I use Proj4j for a WebGIS and I have to create a new ESPG. I tried on QGIS to convert coordinates from a local system (in Greece) to a world coordinates system.

First, I have to do a 2D transformation: 2 translations (Tx ans Ty) and a rotation (Rz) of about 0.58931 radians around the "z axis" (in the plane of the local system) between the local coordinates and the Greek coordinates (EGSA87).

So I think that the rotation matrix is: [cos(Rz),-sin(Rz);sin(Rz),cos(Rz)] and without the cos and sin I have [0.8313242,-0.5557878;0.5557878,0.8313242].

Then, I can reuse the parameters of the EPSG:2100 definition:

+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +units=m +no_defs

I think I can insert the translations (Tx and Ty) in the x_0 and y_0, but I don’t know how to insert the rotation matrix. How can I insert a transformation with a matrix in a new EPSG?

I found on the internet that the +xform= command seems good, but I don’t know how to use it. I tried:

+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=-869388.894 +y_0=-4260031.458 +xform=[0.8313242,-0.5557878,0.5557878,0.8313242] +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +units=m +no_defs

But apparently it isn’t a good solution. So, does anyone know how I can use this command in my new EPSG or where I can find the proj4 documentation?


You can set up a local oblique mercator projection to get the rotation, as I described in my answer here:

Using customized Coordinate System in ArcGIS Desktop?

Your rotation parameter +alpha would be 33.765 degrees. You have to expriment about the sign to be used.

The Proj.4 parameters are listed here: http://trac.osgeo.org/proj/wiki/GenParms, but xform is not included.

| improve this answer | |

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.