pyresample._spatial_mp module

Multiprocessing versions of KDTree and Proj classes.

class pyresample._spatial_mp.Cartesian(*args, **kwargs)

Bases: object

Cartesian coordinates.

__init__(*args, **kwargs)
transform_lonlats(lons, lats)

Transform longitudes and latitues to cartesian coordinates.

pyresample._spatial_mp.Cartesian_MP

alias of Cartesian

class pyresample._spatial_mp.Proj_MP(*args, **kwargs)

Bases: object

Multi-processing version of the pyproj Proj class.

__init__(*args, **kwargs)
pyresample._spatial_mp._parallel_proj(scheduler, data1, data2, res1, res2, proj_args, proj_kwargs, inverse, radians, errcheck, ierr, warn_msg)
pyresample._spatial_mp._parallel_query(scheduler, data, ndata, ndim, leafsize, x, nx, d, i, k, eps, p, dub, ierr, warn_msg)
pyresample._spatial_mp._parallel_transform(scheduler, lons, lats, n, coords, ierr, warn_msg)
pyresample._spatial_mp._run_jobs(target, args, nprocs)

Run process pool.

class pyresample._spatial_mp.cKDTree_MP(data, leafsize=10, nprocs=2, chunk=None, schedule='guided')

Bases: object

Multiprocessing cKDTree subclass, shared memory.

Prepare shared memory for KDTree operations.

Same as cKDTree.__init__ except that an internal copy of data to shared memory is made.

Extra keyword arguments: chunk : Minimum chunk size for the load balancer. schedule: Strategy for balancing work load (‘static’, ‘dynamic’ or ‘guided’).

__init__(data, leafsize=10, nprocs=2, chunk=None, schedule='guided')

Prepare shared memory for KDTree operations.

Same as cKDTree.__init__ except that an internal copy of data to shared memory is made.

Extra keyword arguments: chunk : Minimum chunk size for the load balancer. schedule: Strategy for balancing work load (‘static’, ‘dynamic’ or ‘guided’).

query(x, k=1, eps=0, p=2, distance_upper_bound=inf)

Query for points at index ‘x’ parallelized with multiple processes and shared memory.