Example #1
0
def test_latlon2gmuds_transform():
    gmuds_grid = gm.GmudsGrid()
    latln_grid = gm.LatLonGrid()
    x, y = -1500000, 4000000
    lon, lat = latln_grid.itransform(gmuds_grid, x, y)
    x_, y_ = latln_grid.transform(gmuds_grid, lon, lat)
    assert gm.np.isclose((x_, y_), (x, y)).all()
Example #2
0
def test_latlon2gmuds_forward():
    gmuds_grid = gm.GmudsGrid()
    latln_grid = gm.LatLonGrid()
    col, row = 1500, 1000
    #using transform
    x, y = gmuds_grid.forward(col, row)
    lon, lat = latln_grid.itransform(gmuds_grid, x, y)
    # using forward
    lon_, lat_ = gmuds_grid.forward(col, row, grid=latln_grid)
    assert gm.np.isclose((lon_, lat_), (lon, lat)).all()
Example #3
0
def test_latlon2gmuds_inverse():
    gmuds_grid = gm.GmudsGrid()
    latln_grid = gm.LatLonGrid()
    #using transform
    lat, lon = 28.4044168199, 85.3545670252
    x, y = latln_grid.transform(gmuds_grid, lon, lat)
    row, col =  gmuds_grid.inverse(x, y)
    # using inverse
    row_, col_ = gmuds_grid.inverse(lon, lat, grid=latln_grid)
    assert gm.np.isclose((col_, row_), (col, row)).all()
Example #4
0
def test_gmuds_forward():
    gmuds_grid = gm.GmudsGrid()
    col, row = 1500, 1000
    col_, row_ = gmuds_grid.inverse(*gmuds_grid.forward(col, row))
    assert gm.np.isclose((col_, row_), (col, row)).all()
Example #5
0
def test_gmuds_transform():
    gmuds_grid = gm.GmudsGrid()
    x, y = 100, 100
    x_, y_ = gmuds_grid.itransform(*[gmuds_grid] + list(gmuds_grid.transform(gmuds_grid, x, y)))
    assert gm.np.isclose((x_, y_), (x, y)).all()
Example #6
0
def test_gmuds_grid():
    gmuds_grid = gm.GmudsGrid()
    assert True