[mapserver-users] 3D Building Howto?

Stephen Woodbridge woodbri at swoodbridge.com
Mon Feb 14 18:11:37 EST 2011


Hi all,

Has anyone been able to render 3D building with mapserver?

I have a polygon layer with the building outlines and a height attribute.

Any thoughts on how to render nice buildings like Google does?

I can preprocess the data and extrude it into 3D shapes, but I'm not 
sure that gets me anywhere.

My one thought was to draw the polygon, then draw it again with an xy 
offset based on a function of the height. But this does not generate the 
vertical edges of the building.

I suppose I could generate all the vertical faces and the top of the 
build and then sort them all based on the z value of the centroid. I 
could event remove all the back facing polygons faces.

It would be cool if mapserver had:

LAYER
   TYPE POLYGON3D
   HEIGHT [height]
   ...
END

Thoughts?
   -Steve W


More information about the mapserver-users mailing list