[postgis-devel] Polyhedral Containment
Paragon Corporation
lr at pcorp.us
Wed Feb 25 12:49:08 PST 2015
Oh forgot to mention – for current system, you'd have to use the ST_Extrude function (extrude a polygon up to a cube) and then it would automagically get treated as a solid.
From: postgis-devel-bounces at lists.osgeo.org [mailto:postgis-devel-bounces at lists.osgeo.org] On Behalf Of Paragon Corporation
Sent: Wednesday, February 25, 2015 3:45 PM
To: 'PostGIS Development Discussion'
Subject: Re: [postgis-devel] Polyhedral Containment
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> [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/09281c93/attachment.html>
More information about the postgis-devel
mailing list