[Gdal-dev] SHAPE 3D support?

Markus Neteler neteler at itc.it
Wed Apr 13 11:37:37 EDT 2005

Dear list,

from a customer we received a 3D SHAPE file which,
according to the customer, contains 3D buildings.

I tried to import the map with v.in.ogr into GRASS 
which worked well except for the 3rd dimension.
Using shpdump I found:

shpdump SaviglianoZI_CN4410.shp | head
Shapefile Type: PolygonZ   # of Shapes: 24

File Bounds: (  393994.326, 4944791.347,0,0)
         to  (  394305.613, 4945138.609,4.2794e-08,nan)

Shape:0 (PolygonZ)  nVertices=9, nParts=1
  Bounds:(  394243.242, 4944978.999, 4.2794e-08, -1.79769e+308)
      to (  394298.322, 4945091.844, 4.2794e-08, -1.79769e+308)
     (  394259.825, 4945091.844, 4.2794e-08, -1.79769e+308) Ring
     (  394298.322, 4945079.994, 4.2794e-08, -1.79769e+308)
     (  394287.595, 4945045.143, 4.2794e-08, -1.79769e+308)
     (  394296.197, 4945042.495, 4.2794e-08, -1.79769e+308)
     (  394276.652, 4944978.999, 4.2794e-08, -1.79769e+308)
     (  394244.045, 4944989.036, 4.2794e-08, -1.79769e+308)
     (  394258.615, 4945036.368, 4.2794e-08, -1.79769e+308)
     (  394243.242, 4945041.101, 4.2794e-08, -1.79769e+308)
     (  394259.825, 4945091.844, 4.2794e-08, -1.79769e+308)


It seems that the 3rd dimension is missing in the file (say,
it's unused). According to 
OGR should grab the 3rd dimension properly.

Someone else was showing me the file in ArcGIS. It was flat unless
the "extrude" function was used which transfers values from a 
selected numeric column (e.g., height) to the third dimension.

It seems that we either have to program a 'shp2dto3d' program
or to program v.extrude in GRASS 6?
Suggestions welcome - maybe someone in this community already
solved the problem...


PS: Importing 3D DXF/DWG in GRASS 6 works out of the box
    supposed you have compiled it with opendwg-toolkit.

More information about the Gdal-dev mailing list