[postgis-users] Storing and querying 3d objects from PostGIS

Johan de Koning johan.de.koning at geodan.nl
Fri Apr 8 05:39:40 PDT 2005


Hi all,

I am looking at the possibilities in PostGIS with 3D data. I want to store 
3D data and query it using a box boundary. I was looking at the Box3D 
functionality but i get no results. How can i do a query on the data that 
is stored like 3d polygons?

I was using the next sql statements for inserting the data

create table buildings (BUILDING_ID int4, BUILDING_NAME varchar(128));
select AddGeometryColumn('buildings','building_shape',-1,'GEOMETRY',3);

insert into buildings(BUILDING_ID, BUILDING_NAME, BUILDING_SHAPE) values 
(0, 'Building 0', GeomFromEWKT('POLYGON((0 0 0, 0 5 0, 5 5 0, 5 0 0, 0 0 
0),(0 0 0, 0 5 0, 0 5 5, 0 0 5, 0 0 0),(5 5 0, 5 5 5, 0 5 5, 0 5 0, 5 5 
0),(5 0 0, 5 0 5, 5 5 5, 5 5 0, 5 0 0),(5 0 0, 5 0 5, 0 0 5, 0 0 0, 5 0 0), 
(0 0 5, 0 5 5, 5 5 5, 5 0 5, 0 0 5))'));

BTW Are there other ways to store 3d data. I know i can separate all faces 
and use two tables like body and face with relations between it.

Hope somebody can help me

Thanx

Johan 






More information about the postgis-users mailing list