示例#1
0
 def __init__(self, central_longitude=0.0):
     proj4_params = [('proj', 'cea'), ('lon_0', central_longitude)]
     globe = Globe(semimajor_axis=math.degrees(1))
     super(LambertCylindrical, self).__init__(proj4_params,
                                              180,
                                              math.degrees(1),
                                              globe=globe)
示例#2
0
    def __init__(self,
                 central_longitude=0,
                 globe=None,
                 false_easting=None,
                 false_northing=None):
        """
        %(proj.init)s
        """
        from cartopy._crs import Globe
        from cartopy.crs import WGS84_SEMIMAJOR_AXIS
        if globe is None:
            globe = Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS, ellipse=None)

        a = globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS
        b = globe.semiminor_axis or a
        if b != a or globe.ellipse is not None:
            warnings.warn(f'The {self.name!r} projection does not handle '
                          'elliptical globes.')

        proj4_params = {'proj': 'aitoff', 'lon_0': central_longitude}
        super().__init__(proj4_params,
                         central_longitude,
                         false_easting=false_easting,
                         false_northing=false_northing,
                         globe=globe)
示例#3
0
 def __init__(self):
     super(OSGB, self).__init__(central_longitude=-2,
                                central_latitude=49,
                                scale_factor=0.9996012717,
                                false_easting=400000,
                                false_northing=-100000,
                                globe=Globe(datum='OSGB36', ellipse='airy'))
示例#4
0
 def __init__(self):
     proj4_params = [('proj', 'tmerc'),
                     ('lat_0', 50), ('lon_0', 9),
                     ('k', 0.9996),
                     ('x_0', 1750000), ('y_0', 1500000),
                     ('zone', 32),
                     ('units', 'm')]
     globe = Globe(ellipse='intl', towgs84='-87,-98,-121')
     super(EuroPP, self).__init__(proj4_params, globe=globe)
示例#5
0
 def __init__(self):
     globe = Globe(semimajor_axis=6377340.189,
                   semiminor_axis=6356034.447938534)
     super(OSNI, self).__init__(central_longitude=-8,
                                central_latitude=53.5,
                                scale_factor=1.000035,
                                false_easting=200000,
                                false_northing=250000,
                                globe=globe)
示例#6
0
 def __init__(self, central_longitude=0.0, globe=None):
     proj4_params = [('proj', 'eqc'), ('lon_0', central_longitude)]
     if globe is None:
         globe = Globe(semimajor_axis=math.degrees(1))
     x_max = math.radians(globe.semimajor_axis or 6378137.0) * 180
     y_max = math.radians(globe.semimajor_axis or 6378137.0) * 90
     # Set the threshold around 0.5 if the x max is 180.
     self._threshold = x_max / 360.
     super(PlateCarree, self).__init__(proj4_params, x_max, y_max,
                                       globe=globe)
示例#7
0
    def __init__(self, pole_longitude, pole_latitude, globe=None):
        """
        Create a RotatedGeodetic CRS.

        Args:

            * pole_longitude - Pole longitude position, in unrotated degrees.
            * pole_latitude - Pole latitude position, in unrotated degrees.

        Kwargs:

            * globe - An optional :class:`cartopy.crs.Globe`.
                      Defaults to a "WGS84" datum.

        """
        proj4_params = [('proj', 'ob_tran'), ('o_proj', 'latlon'),
                        ('o_lon_p', 0), ('o_lat_p', pole_latitude),
                        ('lon_0', 180 + pole_longitude),
                        ('to_meter', math.radians(1))]
        globe = globe or Globe(datum='WGS84')
        super(RotatedGeodetic, self).__init__(proj4_params, globe=globe)
示例#8
0
 def __init__(self, central_longitude=0.0):
     proj4_params = [('proj', 'mill'), ('lon_0', central_longitude)]
     globe = Globe(semimajor_axis=math.degrees(1))
     # XXX How can we derive the vertical limit of 131.98?
     super(Miller, self).__init__(proj4_params, 180, 131.98, globe=globe)
示例#9
0
 def __init__(self):
     globe = Globe(ellipse='intl')
     super(EuroPP, self).__init__(32, globe=globe)