# Rotation matrix in the EPSG

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?

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