File: test_products_z.py

package info (click to toggle)
python-shapely 2.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,528 kB
  • sloc: python: 18,648; ansic: 6,615; makefile: 88; sh: 62
file content (13 lines) | stat: -rw-r--r-- 388 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
import unittest

from shapely.geometry import LineString


class ProductZTestCase(unittest.TestCase):
    def test_line_intersection(self):
        line1 = LineString([(0, 0, 0), (1, 1, 1)])
        line2 = LineString([(0, 1, 1), (1, 0, 0)])
        interxn = line1.intersection(line2)
        assert interxn.has_z
        assert interxn._ndim == 3
        assert 0.0 <= interxn.z <= 1.0