Returns a new pcpatch object containing only the points from a pcpatch that fall within the given geometry.
Syntax
pcpatch ST_Intersection(pcpatch pc, geometry geom);Parameters
| Parameter | Description |
|---|---|
pc | The pcpatch object. |
geom | The geometry object. Must be a valid Ganos Geometry type. |
Example
The following query clips a point cloud patch to a triangular polygon and returns the individual points within the intersection.
SELECT ST_AsText(ST_Explode(ST_Intersection(
pa,
'SRID=4326;POLYGON((-126.451 45.552, -126.42 47.55, -126.40 45.552, -126.451 45.552))'::geometry
)))
FROM patches WHERE id = 7;Output:
st_astext
--------------------------------------
{"pcid":1,"pt":[-126.44,45.56,56,5]}
{"pcid":1,"pt":[-126.43,45.57,57,5]}
{"pcid":1,"pt":[-126.42,45.58,58,5]}
{"pcid":1,"pt":[-126.41,45.59,59,5]}该文章对您有帮助吗?