# Path: pyresample/future/geometry/area.py

# 
# Path: pyresample/future/geometry/swath.py

# 
# Path: pyresample/test/utils.py
# def create_test_latitude(start, stop, shape, twist_factor=0.0, dtype=np.float32):
#     """Get basic sample of latitude data."""
#     num_cols = 1 if len(shape) < 2 else shape[1]
#     lat_col = np.linspace(start, stop, num=shape[0]).astype(dtype).reshape((shape[0], 1))
#     twist_array = np.arange(num_cols) * twist_factor
#     lat_array = np.repeat(lat_col, num_cols, axis=1)
#     lat_array += twist_array
#     return lat_array
# 
# def create_test_longitude(start, stop, shape, twist_factor=0.0, dtype=np.float32):
#     """Get basic sample of longitude data."""
#     if start > 0 > stop:
#         # cross anti-meridian
#         stop += 360.0
# 
#     num_cols = 1 if len(shape) < 2 else shape[1]
#     lon_row = np.linspace(start, stop, num=num_cols).astype(dtype)
#     twist_array = np.arange(shape[0]).reshape((shape[0], 1)) * twist_factor
#     lon_array = np.repeat([lon_row], shape[0], axis=0)
#     lon_array += twist_array
# 
#     if stop > 360.0:
#         lon_array[lon_array > 360.0] -= 360
#     return lon_array


import dask.array as da
import numpy as np
import pytest
import xarray as xr
from pyproj import CRS
from pyresample.future.geometry import (
    AreaDefinition,
    CoordinateDefinition,
    SwathDefinition,
)
from pyresample.test.utils import create_test_latitude, create_test_longitude
    return lons, lats


def _antimeridian_lonlats():
    lons = create_test_longitude(172.0, 190.0, SRC_SWATH_2D_SHAPE)
    lons[lons > 180.0] = lons - 360.0
    lats = create_test_latitude(25.0, 33.0, SRC_SWATH_2D_SHAPE)
    return lons, lats


@pytest.fixture(scope="session")
def swath_def_2d_numpy():
    """Create a SwathDefinition with numpy arrays (200, 1500)."""
    lons, lats = _euro_lonlats()
    return SwathDefinition(lons, lats)


@pytest.fixture(scope="session")
def swath_def_2d_dask():
    """Create a SwathDefinition with dask arrays (200, 1500)."""
    lons, lats = _euro_lonlats_dask()
    return SwathDefinition(lons, lats)


@pytest.fixture(scope="session")
def swath_def_2d_xarray_numpy():
    """Create a SwathDefinition with DataArrays(numpy) (200, 1500)."""
    lons, lats = _euro_lonlats()
    lons = xr.DataArray(lons, dims=("y", "x"))
    lats = xr.DataArray(lats, dims=("y", "x"))

# Path: pyresample/future/geometry/area.py

# 
# Path: pyresample/future/geometry/swath.py

# 
# Path: pyresample/test/utils.py
# def create_test_latitude(start, stop, shape, twist_factor=0.0, dtype=np.float32):
#     """Get basic sample of latitude data."""
#     num_cols = 1 if len(shape) < 2 else shape[1]
#     lat_col = np.linspace(start, stop, num=shape[0]).astype(dtype).reshape((shape[0], 1))
#     twist_array = np.arange(num_cols) * twist_factor
#     lat_array = np.repeat(lat_col, num_cols, axis=1)
#     lat_array += twist_array
#     return lat_array
# 
# def create_test_longitude(start, stop, shape, twist_factor=0.0, dtype=np.float32):
#     """Get basic sample of longitude data."""
#     if start > 0 > stop:
#         # cross anti-meridian
#         stop += 360.0
# 
#     num_cols = 1 if len(shape) < 2 else shape[1]
#     lon_row = np.linspace(start, stop, num=num_cols).astype(dtype)
#     twist_array = np.arange(shape[0]).reshape((shape[0], 1)) * twist_factor
#     lon_array = np.repeat([lon_row], shape[0], axis=0)
#     lon_array += twist_array
# 
#     if stop > 360.0:
#         lon_array[lon_array > 360.0] -= 360
#     return lon_array


# Path: pyresample/test/conftest.py
import dask.array as da
import numpy as np
import pytest
import xarray as xr
from pyproj import CRS
from pyresample.future.geometry import (
    AreaDefinition,
    CoordinateDefinition,
    SwathDefinition,
)
from pyresample.test.utils import create_test_latitude, create_test_longitude

    return lons, lats


def _antimeridian_lonlats():
    lons = create_test_longitude(172.0, 190.0, SRC_SWATH_2D_SHAPE)
    lons[lons > 180.0] = lons - 360.0
    lats = create_test_latitude(25.0, 33.0, SRC_SWATH_2D_SHAPE)
    return lons, lats


@pytest.fixture(scope="session")
def swath_def_2d_numpy():
    """Create a SwathDefinition with numpy arrays (200, 1500)."""
    lons, lats = _euro_lonlats()
    return SwathDefinition(lons, lats)


@pytest.fixture(scope="session")
def swath_def_2d_dask():
    """Create a SwathDefinition with dask arrays (200, 1500)."""
    lons, lats = _euro_lonlats_dask()
    return SwathDefinition(lons, lats)


@pytest.fixture(scope="session")
def swath_def_2d_xarray_numpy():
    """Create a SwathDefinition with DataArrays(numpy) (200, 1500)."""
    lons, lats = _euro_lonlats()
    lons = xr.DataArray(lons, dims=("y", "x"))
    lats = xr.DataArray(lats, dims=("y", "x"))

    return SwathDefinition(lons, lats)