togo 0.1.1__cp314-cp314t-musllinux_1_2_x86_64.whl → 0.1.2__cp314-cp314t-musllinux_1_2_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 togo might be problematic. Click here for more details.
- {togo-0.1.1.dist-info → togo-0.1.2.dist-info}/METADATA +32 -1
- togo-0.1.2.dist-info/RECORD +6 -0
- togo.cpython-314t-x86_64-linux-musl.so +0 -0
- togo-0.1.1.dist-info/RECORD +0 -6
- {togo-0.1.1.dist-info → togo-0.1.2.dist-info}/WHEEL +0 -0
- {togo-0.1.1.dist-info → togo-0.1.2.dist-info}/licenses/LICENSE +0 -0
- {togo-0.1.1.dist-info → togo-0.1.2.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: togo
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Lightweight Python bindings for the TG geometry library
|
|
5
5
|
Author-email: Giorgio Salluzzo <giorgio.salluzzo@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -86,6 +86,12 @@ g1.within(g2)
|
|
|
86
86
|
# Format conversion
|
|
87
87
|
g1.to_wkt()
|
|
88
88
|
g1.to_geojson()
|
|
89
|
+
|
|
90
|
+
# Access sub-geometries by index (e.g., for GeometryCollection, MultiPoint, etc.)
|
|
91
|
+
gc = Geometry('GEOMETRYCOLLECTION(POINT(1 2),POINT(3 4))', fmt='wkt')
|
|
92
|
+
first = gc[0] # Bound to TG function call tg_geom_geometry_at(idx)
|
|
93
|
+
second = gc[1]
|
|
94
|
+
print(first.type_string()) # 'Point'
|
|
89
95
|
```
|
|
90
96
|
|
|
91
97
|
### Point, Line, Ring, Poly
|
|
@@ -128,6 +134,31 @@ poly2 = Poly(Ring([(2,2), (3,2), (3,3), (2,3), (2,2)]))
|
|
|
128
134
|
multi_poly = Geometry.from_multipolygon([poly1, poly2])
|
|
129
135
|
```
|
|
130
136
|
|
|
137
|
+
### Segment
|
|
138
|
+
|
|
139
|
+
Represents a line segment between two points:
|
|
140
|
+
|
|
141
|
+
```python
|
|
142
|
+
from togo import Segment, Point
|
|
143
|
+
|
|
144
|
+
# Create a segment from two points (or tuples)
|
|
145
|
+
seg = Segment(Point(0, 0), Point(1, 1))
|
|
146
|
+
# Or using tuples
|
|
147
|
+
tuple_seg = Segment((0, 0), (1, 1))
|
|
148
|
+
|
|
149
|
+
# Access endpoints
|
|
150
|
+
print(seg.a) # Point(0, 0)
|
|
151
|
+
print(seg.b) # Point(1, 1)
|
|
152
|
+
|
|
153
|
+
# Get the bounding rectangle
|
|
154
|
+
rect = seg.rect()
|
|
155
|
+
print(rect) # ((0.0, 0.0), (1.0, 1.0))
|
|
156
|
+
|
|
157
|
+
# Check intersection with another segment
|
|
158
|
+
other = Segment((1, 1), (2, 2))
|
|
159
|
+
print(seg.intersects(other)) # True or False
|
|
160
|
+
```
|
|
161
|
+
|
|
131
162
|
## Polygon Indexing
|
|
132
163
|
|
|
133
164
|
Togo supports different polygon indexing strategies for optimized spatial operations:
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
togo.cpython-314t-x86_64-linux-musl.so,sha256=Nnr-a-HekjOJpj5sVmOXS2OScCgU2qO_o8Bd3O4bMzk,2653792
|
|
2
|
+
togo-0.1.2.dist-info/METADATA,sha256=YHTXCAcsWj8Qs61iTDJHDuWGjfiyfvBAwaqomdPsXas,4936
|
|
3
|
+
togo-0.1.2.dist-info/WHEEL,sha256=zXoM281zyz8wppofreMuq3eZjd9HP4BgZS1rfYnrpIs,113
|
|
4
|
+
togo-0.1.2.dist-info/top_level.txt,sha256=bldd6tssR8THqoSDFauQQdh_pg79DMHBDhiNKgS4ttM,5
|
|
5
|
+
togo-0.1.2.dist-info/RECORD,,
|
|
6
|
+
togo-0.1.2.dist-info/licenses/LICENSE,sha256=OfTFHFMDSt9X89g-BWUVis-GuTPWAdjplg2z9d2dBCw,1073
|
|
Binary file
|
togo-0.1.1.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
togo.cpython-314t-x86_64-linux-musl.so,sha256=nHREUd5wrynYRc1qKArVcehVTcyRiorGmtn2BbX6NKE,2434688
|
|
2
|
-
togo-0.1.1.dist-info/METADATA,sha256=smJ-qt2aCBBDfYMWWUQHrO8gjVvXQk3KB4RXAG3wQOE,4128
|
|
3
|
-
togo-0.1.1.dist-info/WHEEL,sha256=zXoM281zyz8wppofreMuq3eZjd9HP4BgZS1rfYnrpIs,113
|
|
4
|
-
togo-0.1.1.dist-info/top_level.txt,sha256=bldd6tssR8THqoSDFauQQdh_pg79DMHBDhiNKgS4ttM,5
|
|
5
|
-
togo-0.1.1.dist-info/RECORD,,
|
|
6
|
-
togo-0.1.1.dist-info/licenses/LICENSE,sha256=OfTFHFMDSt9X89g-BWUVis-GuTPWAdjplg2z9d2dBCw,1073
|
|
File without changes
|
|
File without changes
|
|
File without changes
|