Unable to rotate geom if map crs and layer crs is different

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Unable to rotate geom if map crs and layer crs is different

Trupti Pol
This post has NOT been accepted by the mailing list yet.

We have a rotateGeom service implemented as follows
    1)select the geom, get its coordinates
    2)convert them to screen coordinates
    4)convert back to world coordinates
    5)finally build the resultant geometry.

Now this rotateGeom works fine if map CRS and Layer CRS is same.
But if Map CRS is polyconic and say layer CRS is geographic then it is not giving me the correct output.

Here i understand the fact that geometry processes as
  1) Geom in LayerCRS
  2) Geom in MAP CRS
  3) Geom in Screen Coordinates
  4) rotate in Screen Coordinates
  5) Rotated Geom in MAP CRS

So i added one more step  
  6) transform rotated geometry from MAP CRS to layer CRS

But still i am getting the rotated geometry placed somewhere else on the map and not restoring its original position.

Please suggest me what can be done further to solve this or correct me if i am doing some mistake in overall process.