[postgis-devel] Polyhedral Containment
Paragon Corporation
lr at pcorp.us
Wed Feb 25 12:45:18 PST 2015
Paul,
With the new function that Vince is going to put in, it would handle this.
And would be something like
SELECT ST_3DIntersects(
ST_MakeSolid( 'POLYHEDRALSURFACE(
((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)),
((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)),
((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)),
((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)),
((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)),
((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1))
)'::geometry), 'POINT(0.5 0.5 0.5)'::geometry);
Shame on you for not casting to geometry :)
See this note:
http://lists.osgeo.org/pipermail/postgis-devel/2015-January/024710.html
Hope that helps,
Regina
http://www.postgis.us
http://postgis.net
From: postgis-devel-bounces at lists.osgeo.org [mailto:postgis-devel-bounces at lists.osgeo.org] On Behalf Of Paul Ramsey
Sent: Wednesday, February 25, 2015 3:03 PM
To: PostGIS Development Discussion
Subject: [postgis-devel] Polyhedral Containment
Is there a 3d function that can answer this question and return true? (volumetric containment?)
ST_3dIntersects(
'POLYHEDRALSURFACE(
((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)),
((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)),
((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)),
((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)),
((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)),
((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1))
)', 'POINT(0.5 0.5 0.5)');
--
Paul Ramsey
http://cleverelephant.ca
http://postgis.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20150225/7f1ac277/attachment.html>
More information about the postgis-devel
mailing list