[EDIT: In my original post, I had received an error that was based on a typo, so I scrapped that part of the question, but left the questions that still apply.]

In the ogr2ogr docs it says:

-nlt type:
Define the geometry type for the created layer. One of NONE, GEOMETRY, POINT, LINESTRING, POLYGON, GEOMETRYCOLLECTION, MULTIPOINT, MULTIPOLYGON or MULTILINESTRING. Add "25D" to the name to get 2.5D versions.

Does this part: Add "25D" to the name to get 2.5D versions apply to both loading things into postgres as well as exporting data from postgres to .shp files?

Additionally, I am assuming 25D to meant that one can have a z value that corresponds to each pair of xy coordinates (as is the case with PolygonZ shapefile types), but that these coordinates may not overlap. Is this correct? What is the intended distinction in this case between 2.5D and 3D?


  • To answer the first question: it is not necessary to use the -nlt with 25D for output to shapefiles. It appears that if I load shapefiles into Postgres using the -nlt MULTIPOLYGON25D option, and later export the resulting features as shapefiles without the -nlt option, the coordinates of each shape retains its individual z values. Mar 28, 2011 at 23:22

2 Answers 2


The term 2.5D is used instead of 3D because, although you have Z values, they are not taken into account when doing any of the spatial operations. Intersections, buffers, any of the spatial predicates (within, overlaps,etc) operate with by ignoring the Z value.


Not to disagree with or contradict, but to add to, Ragi's answer:

The distinction between 2D, 2.5D and 3D

Generally, a GIS holds (at least) 2D features on 2D maps. That is, features are geo-located in two primary geographic dimensions: X & Y. Depending on the context, we call them northings & eastings or latitudes & longitudes. The features are represented by points, lines and polygons, the elements of which are X-Y data pairs.

To be more useful, a GIS will hold geographic surfaces or even features sitting on such surfaces. The obvious case is the Earth's surface but it could be more abstract "surfaces" like local population density or local annual days of sunshine. There are the two primary geographic dimensions, X & Y, and a third dimension, Z. Such features are again represented by points, lines and polygons, but the elements of which are now X-Y-Z data triplets. So is it 3D? Yes and no. A distinguishing characteristic of a geographic surface is that, while it can exist everywhere in 2D X-Y space, it has only a single Z value at any given 2D location.

Even more useful is a system that holds geographic volumes. These are "true" 3D features existing in 3D spaces and can be enclosed by surfaces on all sides. Think sophisticated geological, oceanographic or meteorological models. Or multi-storey building or complex industrial plant models. They are represented by points, lines, polygons (as above) and polyhedrons. And as above, the elements are still X-Y-Z data triplets. However, a distinguishing characteristic of a geographic volume is that it can exist anywhere in 3D X-Y-Z space. And at any given 2D location there can be multiple Z values.

So what to call the middle type of data if it's more than 2D but less than true 3D?

  • 1
    thanks for taking the time to add to this. I think this makes a couple aspects more confusing. For example, there seems to be a conflation between the use of z values to indicate 3-dimensional spatial relationships and the use of z-values to hold other parameter values. Geographic surfaces are not more or less "true" 3D features than geographic volumes. Furthermore, this distinction between surfaces and volumes does not correspond to the significance of 2.5D in GDAL. Jun 5, 2014 at 17:22
  • Sounds like you're disagreeing with, or don't understand, what i've said? I don't know what you mean by "Z values to indicate 3D spatial relationships". After re-reading your last 2 sentences though, i see i do need to modify or add to my answer so far... Will do.
    – Martin F
    Jun 5, 2014 at 19:13
  • Sorry for not being clear. By "spatial relationships" I meant "elevation values". Your examples for surfaces use z-values to store parameters (population density, sunshine) while your examples for volumes all use z-values to store elevations. But surfaces may store elevations as z values and volumes may store parameters as z-values (time intervals, for example). Jun 5, 2014 at 19:24
  • Yes. Probably best if i remove any mention of non-elevation surfaces.
    – Martin F
    Jun 5, 2014 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.