Skip to content

Commit 6ac6939

Browse files
committedDec 23, 2017
Sipify
1 parent 676bba2 commit 6ac6939

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed
 

‎python/core/geometry/qgsgeometryutils.sip

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -115,27 +115,27 @@ Returns the squared distance between a point and a line.
115115

116116
:return: Whether the segments intersect
117117
* Example:
118-
\code{.py}
119-
ret = QgsGeometryUtils.segmentIntersection( QgsPoint( 0, 0 ), QgsPoint( 0, 1 ), QgsPoint( 1, 1 ), QgsPoint( 1, 0 ) )
120-
ret[0], ret[1].asWkt(), ret[2]
121-
# Whether the segments intersect, the intersection point, is intersect
122-
# (False, 'Point (0 0)', False)
123-
ret = QgsGeometryUtils.segmentIntersection( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 0, 5 ), QgsPoint( 1, 5 ) )
124-
ret[0], ret[1].asWkt(), ret[2]
125-
# (False, 'Point (0 5)', True)
126-
ret = QgsGeometryUtils.segmentIntersection( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 0, 5 ), QgsPoint( 1, 5 ), acceptImproperIntersection=True )
127-
ret[0], ret[1].asWkt(), ret[2]
128-
# (True, 'Point (0 5)', True)
129-
ret = QgsGeometryUtils.segmentIntersection( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 0, 2 ), QgsPoint( 1, 5 ) )
130-
ret[0], ret[1].asWkt(), ret[2]
131-
# (False, 'Point (0 2)', True)
132-
ret = QgsGeometryUtils.segmentIntersection( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 0, 2 ), QgsPoint( 1, 5 ), acceptImproperIntersection=True )
133-
ret[0], ret[1].asWkt(), ret[2]
134-
# (True, 'Point (0 2)', True)
135-
ret = QgsGeometryUtils.segmentIntersection( QgsPoint( 0, -5 ), QgsPoint( 0, 5 ), QgsPoint( 2, 0 ), QgsPoint( -1, 0 ) )
136-
ret[0], ret[1].asWkt(), ret[2]
137-
# (True, 'Point (0 0)', True)
138-
\endcode
118+
.. code-block:: python
119+
120+
ret = QgsGeometryUtils.segmentIntersection( QgsPoint( 0, 0 ), QgsPoint( 0, 1 ), QgsPoint( 1, 1 ), QgsPoint( 1, 0 ) )
121+
ret[0], ret[1].asWkt(), ret[2]
122+
# Whether the segments intersect, the intersection point, is intersect
123+
# (False, 'Point (0 0)', False)
124+
ret = QgsGeometryUtils.segmentIntersection( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 0, 5 ), QgsPoint( 1, 5 ) )
125+
ret[0], ret[1].asWkt(), ret[2]
126+
# (False, 'Point (0 5)', True)
127+
ret = QgsGeometryUtils.segmentIntersection( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 0, 5 ), QgsPoint( 1, 5 ), acceptImproperIntersection=True )
128+
ret[0], ret[1].asWkt(), ret[2]
129+
# (True, 'Point (0 5)', True)
130+
ret = QgsGeometryUtils.segmentIntersection( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 0, 2 ), QgsPoint( 1, 5 ) )
131+
ret[0], ret[1].asWkt(), ret[2]
132+
# (False, 'Point (0 2)', True)
133+
ret = QgsGeometryUtils.segmentIntersection( QgsPoint( 0, 0 ), QgsPoint( 0, 5 ), QgsPoint( 0, 2 ), QgsPoint( 1, 5 ), acceptImproperIntersection=True )
134+
ret[0], ret[1].asWkt(), ret[2]
135+
# (True, 'Point (0 2)', True)
136+
ret = QgsGeometryUtils.segmentIntersection( QgsPoint( 0, -5 ), QgsPoint( 0, 5 ), QgsPoint( 2, 0 ), QgsPoint( -1, 0 ) )
137+
ret[0], ret[1].asWkt(), ret[2]
138+
# (True, 'Point (0 0)', True)
139139
%End
140140

141141
static QgsPoint projPointOnSegment( const QgsPoint &p, const QgsPoint &s1, const QgsPoint &s2 );

0 commit comments

Comments
 (0)
Please sign in to comment.