torch-geopooling 1.0.0__cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

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 torch-geopooling might be problematic. Click here for more details.

@@ -0,0 +1,37 @@
1
+ # Copyright (C) 2024, Yakau Bubnou
2
+ #
3
+ # This program is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # This program is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
15
+
16
+ import torch
17
+
18
+ from torch_geopooling.transforms import TileWKT
19
+
20
+
21
+ def test_tile_wkt() -> None:
22
+ tile_wkt4 = TileWKT(exterior=(0.0, 0.0, 10.0, 10.0), internal=False)
23
+ tile_wkt5 = TileWKT(exterior=(0.0, 0.0, 10.0, 10.0), internal=True)
24
+
25
+ tiles = torch.tensor(
26
+ [
27
+ [0, 0, 0],
28
+ [1, 0, 0],
29
+ [1, 0, 1],
30
+ [1, 1, 0],
31
+ [1, 1, 1],
32
+ ],
33
+ dtype=torch.int32,
34
+ )
35
+
36
+ assert len(list(tile_wkt4(tiles))) == 4
37
+ assert len(list(tile_wkt5(tiles))) == 5