You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Save binning indices or results to disk for later use.
62
-
63
-
**Parameters**:
64
-
-**obj**: Object to save (binning index or dataset)
65
-
-**filepath** (*str*): Path where to save the file
66
-
67
-
**Example**:
68
-
```python
69
-
from map_binning.index_store import save
70
-
save(binning_index, 'my_index.pkl')
71
-
```
72
-
73
-
### load()
74
-
75
32
```{eval-rst}
76
33
.. autofunction:: map_binning.load
77
-
```
78
-
79
-
Load previously saved binning indices or results from disk.
80
-
81
-
**Parameters**:
82
-
-**filepath** (*str*): Path to the saved file
83
-
84
-
**Returns**: Loaded object
85
-
86
-
**Example**:
87
-
```python
88
-
from map_binning.index_store import load
89
-
index = load('my_index.pkl')
90
-
```
91
-
92
-
## Index Store Module
93
-
94
-
```{eval-rst}
95
-
.. automodule:: map_binning.index_store
96
-
:members:
97
-
:undoc-members:
98
-
:show-inheritance:
99
-
```
100
-
101
-
Module for managing persistent storage of binning indices.
102
-
103
-
## Constants and Configuration
104
-
105
-
### Default Parameters
106
-
107
-
-**DEFAULT_RADIUS**: By default, the search radius for binning is set to 60% of the maximum average spacing between latitude and longitude points in the low-resolution grid. This is calculated as `max(mean_lat_spacing, mean_lon_spacing) * 0.6`.
108
-
109
-
### Supported Save/Load Format
110
-
111
-
-**SUPPORTED_FORMATS**: Only pickle files (`.pkl`) generated by the package are supported for save and load operations.
112
-
113
-
## Error Handling
114
-
115
-
The package defines custom exceptions for different error conditions:
116
-
117
-
-**BinningError**: Base exception for binning-related errors
118
-
-**InvalidDatasetError**: Raised when input datasets are invalid
119
-
-**IndexError**: Raised when binning index operations fail
120
-
121
-
## Data Types
122
-
123
-
### Coordinate Systems
124
-
125
-
The package supports various coordinate systems and projections:
126
-
127
-
- Geographic coordinates (latitude/longitude)
128
-
- Projected coordinate systems
129
-
- Custom grid definitions
130
-
131
-
### Supported Data Formats
132
-
133
-
Input datasets can be in various formats supported by xarray:
0 commit comments