togo 0.1.1__cp38-cp38-musllinux_1_2_x86_64.whl → 0.1.2__cp38-cp38-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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: togo
3
- Version: 0.1.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
@@ -84,6 +84,12 @@ g1.within(g2)
84
84
  # Format conversion
85
85
  g1.to_wkt()
86
86
  g1.to_geojson()
87
+
88
+ # Access sub-geometries by index (e.g., for GeometryCollection, MultiPoint, etc.)
89
+ gc = Geometry('GEOMETRYCOLLECTION(POINT(1 2),POINT(3 4))', fmt='wkt')
90
+ first = gc[0] # Bound to TG function call tg_geom_geometry_at(idx)
91
+ second = gc[1]
92
+ print(first.type_string()) # 'Point'
87
93
  ```
88
94
 
89
95
  ### Point, Line, Ring, Poly
@@ -126,6 +132,31 @@ poly2 = Poly(Ring([(2,2), (3,2), (3,3), (2,3), (2,2)]))
126
132
  multi_poly = Geometry.from_multipolygon([poly1, poly2])
127
133
  ```
128
134
 
135
+ ### Segment
136
+
137
+ Represents a line segment between two points:
138
+
139
+ ```python
140
+ from togo import Segment, Point
141
+
142
+ # Create a segment from two points (or tuples)
143
+ seg = Segment(Point(0, 0), Point(1, 1))
144
+ # Or using tuples
145
+ tuple_seg = Segment((0, 0), (1, 1))
146
+
147
+ # Access endpoints
148
+ print(seg.a) # Point(0, 0)
149
+ print(seg.b) # Point(1, 1)
150
+
151
+ # Get the bounding rectangle
152
+ rect = seg.rect()
153
+ print(rect) # ((0.0, 0.0), (1.0, 1.0))
154
+
155
+ # Check intersection with another segment
156
+ other = Segment((1, 1), (2, 2))
157
+ print(seg.intersects(other)) # True or False
158
+ ```
159
+
129
160
  ## Polygon Indexing
130
161
 
131
162
  Togo supports different polygon indexing strategies for optimized spatial operations:
@@ -0,0 +1,6 @@
1
+ togo.cpython-38-x86_64-linux-gnu.so,sha256=H_MJ0aPGj3-sVpLBX38PjiYDtBl_cJ1-466sE4RZGls,2616296
2
+ togo-0.1.2.dist-info/LICENSE,sha256=OfTFHFMDSt9X89g-BWUVis-GuTPWAdjplg2z9d2dBCw,1073
3
+ togo-0.1.2.dist-info/METADATA,sha256=g_-jjPQBASw6rWSrqArK8Ad9VHx14-oiegCsedd7Nm8,4897
4
+ togo-0.1.2.dist-info/WHEEL,sha256=AtKzrIIwO6LyEQPNa-CKogjoLSeXFnST8-hqmpwwZQA,110
5
+ togo-0.1.2.dist-info/top_level.txt,sha256=bldd6tssR8THqoSDFauQQdh_pg79DMHBDhiNKgS4ttM,5
6
+ togo-0.1.2.dist-info/RECORD,,
Binary file
@@ -1,6 +0,0 @@
1
- togo.cpython-38-x86_64-linux-gnu.so,sha256=gy8NG5S-M-AuUueHVSRh7OkHPSuDjiakSLlxD7OlU68,2440400
2
- togo-0.1.1.dist-info/LICENSE,sha256=OfTFHFMDSt9X89g-BWUVis-GuTPWAdjplg2z9d2dBCw,1073
3
- togo-0.1.1.dist-info/METADATA,sha256=n95sQj4JthTc3N48uAuLUStU48rChvQOpiLRb_M8kBg,4089
4
- togo-0.1.1.dist-info/WHEEL,sha256=AtKzrIIwO6LyEQPNa-CKogjoLSeXFnST8-hqmpwwZQA,110
5
- togo-0.1.1.dist-info/top_level.txt,sha256=bldd6tssR8THqoSDFauQQdh_pg79DMHBDhiNKgS4ttM,5
6
- togo-0.1.1.dist-info/RECORD,,
File without changes
File without changes