Example #1
0
def _oblique_mercator(cf_params):
    """
    http://cfconventions.org/cf-conventions/cf-conventions.html#_oblique_mercator
    """
    return HotineObliqueMercatorBConversion(
        latitude_projection_centre=cf_params["latitude_of_projection_origin"],
        longitude_projection_centre=cf_params[
            "longitude_of_projection_origin"],
        azimuth_initial_line=cf_params["azimuth_of_central_line"],
        angle_from_rectified_to_skew_grid=0.0,
        scale_factor_on_initial_line=cf_params.get(
            "scale_factor_at_projection_origin", 1.0),
        easting_projection_centre=cf_params.get("false_easting", 0.0),
        northing_projection_centre=cf_params.get("false_northing", 0.0),
    )
def test_hotline_oblique_mercator_b_operation__defaults():
    hop = HotineObliqueMercatorBConversion(
        latitude_projection_centre=0,
        longitude_projection_centre=0,
        azimuth_initial_line=0,
        angle_from_rectified_to_skew_grid=0,
    )
    assert hop.name == "unknown"
    assert hop.method_name == "Hotine Oblique Mercator (variant B)"
    assert _to_dict(hop) == {
        "Latitude of projection centre": 0.0,
        "Longitude of projection centre": 0.0,
        "Azimuth of initial line": 0.0,
        "Angle from Rectified to Skew Grid": 0.0,
        "Scale factor on initial line": 1.0,
        "Easting at projection centre": 0.0,
        "Northing at projection centre": 0.0,
    }