projection.EquiRectangular

projection.EquiRectangular(width, height, area=None)

Methods

Name Description
get_coordinates Get the latitude and longitude coordinates for each pixel in the equirectangular projection.
is_in_bounds Check if coordinates are within the projection area bounds.
is_valid_index Check if pixel indexes are valid (not FILL_VALUE).
project_to_indexes Projects latitude and longitude coordinates to pixel indexes in the equirectangular projection.

get_coordinates

projection.EquiRectangular.get_coordinates()

Get the latitude and longitude coordinates for each pixel in the equirectangular projection. Returns coordinates based on the defined area bounds.

Returns: tuple[np.ndarray, np.ndarray]: The latitude and longitude coordinates for each pixel in the equirectangular projection.

is_in_bounds

projection.EquiRectangular.is_in_bounds(latitude, longitude)

Check if coordinates are within the projection area bounds.

Args: latitude (float|np.ndarray): The latitude value(s) to check. longitude (float|np.ndarray): The longitude value(s) to check.

Returns: np.ndarray: Boolean array indicating which coordinates are in bounds.

is_valid_index

projection.EquiRectangular.is_valid_index(x_indexes, y_indexes)

Check if pixel indexes are valid (not FILL_VALUE).

Args: x_indexes (np.ndarray): The x pixel indexes to check. y_indexes (np.ndarray): The y pixel indexes to check.

Returns: np.ndarray: Boolean array indicating which indexes are valid (not out-of-bounds).

project_to_indexes

projection.EquiRectangular.project_to_indexes(latitude, longitude)

Projects latitude and longitude coordinates to pixel indexes in the equirectangular projection.

Args: latitude (float|np.ndarray): The latitude value(s) to project. longitude (float|np.ndarray): The longitude value(s) to project.

Returns: tuple[np.ndarray, np.ndarray]: The x and y pixel indexes in the equirectangular projection. Returns (FILL_VALUE, FILL_VALUE) for coordinates outside the area. Check with is_valid_index() or compare against projection.FILL_VALUE.