function [Xr,Yr]=RotateTopo(X,Y,x0,y0,theta0)

  %  x0=69141.4936;      %% coordinates northern Jarkus pole (exracted from the 5 Aug 2009 survey)
   % y0=447448.7293;
   % theta0 =-131.65534968173412+90;  %% angle ref line (fence) in add_surveygrid!

    
    
    Xr = -(X-x0).*sind(theta0) + (Y-y0)*cosd(theta0); 
    Yr =  -(X-x0)*cosd(theta0) - (Y-y0)*sind(theta0);    
