pyremap.descriptor.ProjectionGridDescriptor¶
- class pyremap.descriptor.ProjectionGridDescriptor(projection)[source]¶
A class for describing a general logically rectangular grid that can be defined by a pyproj projection.
- __init__(projection)[source]¶
Constructor stores the projection
- Parameters
projection (
pyproj.Proj
object) – The projection used to map from grid x-y space to latitude and longitude
Methods
__init__
(projection)Constructor stores the projection
create
(projection, x, y, meshName)Given x and y coordinates defining the axes of the logically rectangular grid, save the coordinates interpolate/extrapolate to locate corners.
project_to_lat_lon
(X, Y)Given X and Y locations of points in a projection, returns the corresponding latitude and longitude of each point.
read
(projection, fileName[, meshName, …])Given a grid file with x and y coordinates defining the axes of the logically rectangular grid, read in the x and y coordinates and interpolate/extrapolate to locate corners.
to_scrip
(scripFileName)Create a SCRIP file based on the grid and projection.