eehab40 at hotmail.com
Thu Oct 30 11:40:36 PDT 2008
below is your replay to a question i post before 12 days. i kindly asked you to look to
what it again since my building are not 3D boxes they are not squares or rectangles, they are polygons has z values
i need to find the lines that intersect these extruded polygons in 3D.
Indexes in PostGIS are still only 2D. Hopefully 3D indexes will be
added sometime in the future, but in the meantime, you can perform your
3D query using the cube module.
-- Sample 3D box table
CREATE TABLE boxes (box box3d);
INSERT INTO boxes SELECT 'BOX3D(0 0 0,2 2 2)'::box3d;
INSERT INTO boxes SELECT 'BOX3D(0 4 0,2 6 2)'::box3d;
-- Sample 3D index
CREATE INDEX boxes_box_cube_idx ON boxes USING GIST (
-- Sample 3D intersect query
WHERE '(-1,1,1),(3,1,1)'::cube &&
BOX3D(0 0 0,2 2 2)
eehab hamzeh wrote:
> I try to use the && operator to select the boxes that intersect one line
> in 3d .. i need help to develop the Sql statement,
> Select AsText(line_geom) as geom from line where line_geom &&
> geomFromText(Select astext(the_geom) from boxex)',-1);
> attached is a graph shows how the query result should looks i need just
> the red box to be seleced since the line intersect only the red box and
> not the another box which is lower than the line height.
Connect to the next generation of MSN Messenger
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users