kuva-reader 1.0.0__tar.gz → 1.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of kuva-reader might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kuva-reader
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: Manipulate the Kuva Space image and metadata formats
5
5
  License: MIT
6
6
  Author: Guillem Ballesteros
@@ -11,8 +11,8 @@ Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
- Requires-Dist: kuva-geometry @ file:///home/olli/projects/kuva-repos/kuva-data-processing/kuva-geometry
15
- Requires-Dist: kuva-metadata @ file:///home/olli/projects/kuva-repos/kuva-data-processing/kuva-metadata
14
+ Requires-Dist: kuva-geometry
15
+ Requires-Dist: kuva-metadata
16
16
  Requires-Dist: numpy (>=1.26.4,<2.0.0)
17
17
  Requires-Dist: numpy-quaternion (>=2022.4.4,<2023.0.0)
18
18
  Requires-Dist: pint (>=0.22,<0.23)
@@ -53,15 +53,16 @@ pip install kuva-reader
53
53
 
54
54
  ## Minimal example
55
55
 
56
- This is a minimal example that allows you to read and print the image shape of a L1 product. \
57
- The result product is in this case an L1C product (as seen from the folder name).
56
+ This is a minimal example that allows you to read and print the image shape of a L2 product.
57
+
58
+ The result product is in this case an L2A product (as seen from the folder name).
58
59
  The loaded product is stored in a `rioxarray` object, which contains extensive GIS functionalities [(examples for usage)](https://corteva.github.io/rioxarray/stable/examples/examples.html).
59
60
 
60
61
  ```python
61
62
  from kuva_reader import read_product
62
63
 
63
64
  l2a_product = read_product("my_data_folder/hyperfield1a_L2A_20250105T092548")
64
- print(product) # Will show some main information such as image shape and CRS
65
+ print(l2a_product) # Will show some main information such as image shape and CRS
65
66
  ```
66
67
 
67
68
  This assumes a mostly untouched folder after distributing. Otherwise, you may need to
@@ -30,15 +30,16 @@ pip install kuva-reader
30
30
 
31
31
  ## Minimal example
32
32
 
33
- This is a minimal example that allows you to read and print the image shape of a L1 product. \
34
- The result product is in this case an L1C product (as seen from the folder name).
33
+ This is a minimal example that allows you to read and print the image shape of a L2 product.
34
+
35
+ The result product is in this case an L2A product (as seen from the folder name).
35
36
  The loaded product is stored in a `rioxarray` object, which contains extensive GIS functionalities [(examples for usage)](https://corteva.github.io/rioxarray/stable/examples/examples.html).
36
37
 
37
38
  ```python
38
39
  from kuva_reader import read_product
39
40
 
40
41
  l2a_product = read_product("my_data_folder/hyperfield1a_L2A_20250105T092548")
41
- print(product) # Will show some main information such as image shape and CRS
42
+ print(l2a_product) # Will show some main information such as image shape and CRS
42
43
  ```
43
44
 
44
45
  This assumes a mostly untouched folder after distributing. Otherwise, you may need to
@@ -233,6 +233,16 @@ class Level0Product(ProductBase[MetadataLevel0]):
233
233
  bad_pixel_filename = f"{camera}_per_frame_cloud_mask.tif"
234
234
  return self._read_array(self.image_path / bad_pixel_filename)
235
235
 
236
+ def release_memory(self):
237
+ """Explicitely releases the memory of the `images` variable.
238
+
239
+ NOTE: this function is implemented because of a memory leak inside the Rioxarray
240
+ library that doesn't release memory properly. Only use it when the image data is
241
+ not needed anymore.
242
+ """
243
+ del self.images
244
+ self.images = None
245
+
236
246
 
237
247
  def generate_level_0_metafile():
238
248
  """Example function for reading a product and generating a metadata file from the
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "kuva-reader"
7
- version = "1.0.0"
7
+ version = "1.0.2"
8
8
  description = "Manipulate the Kuva Space image and metadata formats"
9
9
  authors = ["Guillem Ballesteros <guillem@kuvaspace.com>" , "Lennert Antson <lennert.antson@kuvaspace.com>", "Arthur Vandenhoeke <arthur.vandenhoeke@kuvaspace.com>", "Olli Eloranta <olli.eloranta@kuvaspace.com>"]
10
10
  readme = "README.md"
@@ -30,17 +30,17 @@ pint = "^0.22"
30
30
  rasterio = "^1.4.1"
31
31
  xarray = "^2022.12.0"
32
32
  rioxarray = "^0.12.4"
33
- # kuva-geometry = "*"
34
- # kuva-metadata = "*"
33
+ kuva-geometry = "*"
34
+ kuva-metadata = "*"
35
35
 
36
36
  # Temporarily can replace pypi version with relative dep if doing local development
37
- [tool.poetry.dependencies.kuva-geometry]
38
- path = "../kuva-geometry"
39
- develop = true
37
+ # [tool.poetry.dependencies.kuva-geometry]
38
+ # path = "../kuva-geometry"
39
+ # develop = true
40
40
 
41
- [tool.poetry.dependencies.kuva-metadata]
42
- path = "../kuva-metadata"
43
- develop = true
41
+ # [tool.poetry.dependencies.kuva-metadata]
42
+ # path = "../kuva-metadata"
43
+ # develop = true
44
44
 
45
45
 
46
46
  [tool.ruff.lint]