示例#1
0
 def toGeographicLonLat(self, x, y):
     """
     convert geographic lat / lon to rotated coordinates
     """
     p = lat_lon.lon_lat_to_cartesian(x, y, R=1)
     p = self.rot_matrix.T * np.mat(p).T
     return lat_lon.cartesian_to_lon_lat(p.A1)
示例#2
0
 def toGeographicLonLat(self, x, y):
     """
     convert geographic lat / lon to rotated coordinates
     """
     p = lat_lon.lon_lat_to_cartesian(x, y, R=1)
     p = self.rot_matrix.T * np.mat(p).T
     return lat_lon.cartesian_to_lon_lat(p.A1)
示例#3
0
    def toProjectionXY(self, lon, lat):
        """
        Convert geographic lon/lat coordinates to the rotated lat lon coordinates
        """

        p = lat_lon.lon_lat_to_cartesian(lon, lat, R=1)
        p = self.rot_matrix * np.mat(p).T
        return lat_lon.cartesian_to_lon_lat(p.A1)
示例#4
0
    def toProjectionXY(self, lon, lat):
        """
        Convert geographic lon/lat coordinates to the rotated lat lon coordinates
        """

        p = lat_lon.lon_lat_to_cartesian(lon, lat, R=1)
        p = self.rot_matrix * np.mat(p).T
        return lat_lon.cartesian_to_lon_lat(p.A1)
示例#5
0
 def get_true_pole_coords_in_rotated_system(self):
     """
     needed for lon_0 in basemap
     """
     rot_pole = self.rot_matrix.T * np.mat([0, 0, 1]).T
     return lat_lon.cartesian_to_lon_lat(rot_pole.A1)
示例#6
0
 def get_north_pole_coords(self):
     """
     get true coordinates of the rotated north pole
     """
     rot_pole = self.rot_matrix * np.mat([0, 0, 1]).T
     return lat_lon.cartesian_to_lon_lat(rot_pole.A1)
示例#7
0
 def get_south_pol_coords(self):
     rot_pole = self.rot_matrix * np.mat([0, 0, -1]).T
     return lat_lon.cartesian_to_lon_lat(rot_pole.A1)
     pass
示例#8
0
 def get_true_pole_coords_in_rotated_system(self):
     """
     needed for lon_0 in basemap
     """
     rot_pole = self.rot_matrix.T * np.mat([0, 0, 1]).T
     return lat_lon.cartesian_to_lon_lat(rot_pole.A1)
示例#9
0
 def get_north_pole_coords(self):
     """
     get true coordinates of the rotated north pole
     """
     rot_pole = self.rot_matrix * np.mat([0, 0, 1]).T
     return lat_lon.cartesian_to_lon_lat(rot_pole.A1)
示例#10
0
 def get_south_pol_coords(self):
     rot_pole = self.rot_matrix * np.mat([0, 0, -1]).T
     return lat_lon.cartesian_to_lon_lat(rot_pole.A1)
     pass