Feature request #278

2.5D/3D geometry support

Added by holl-gdf-hannover-de - over 14 years ago. Updated over 11 years ago.

Assignee:Marco Hugentobler
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:10337


Hi developers,

currently I am writing a plugin for Oracle-access (similar to the postgres) through OGR. Loading a vector using QgisIface::addVectorLayer() works partly, the attribute-table gets populated with the correct attributes, but the geometry is unknown to QGIS.

The shell displays the following warning:

Debug: qgsogrprovider.cpp: 581: (getNextFeature) Feature is null
Debug: qgsvectorlayer.cpp: 948: (draw) Total features processed is 458
Debug: qgsmaprender.cpp: 285: (render) [[QgsMapRender]]::render: Done

Indeed, when I use ogrinfo to query my layers in Oracle it recognizes it at Geometry: Unknown (any).

I discussed this with Marco Off-list and he pointed out that QGIS cannot handle 3d geometry currently.
But OGR supports the following geometries so it could be included in QGIS as well:

typedef enum 
    wkbUnknown = 0,             /* non-standard */
    wkbPoint = 1,               /* rest are standard WKB type codes */
    wkbLineString = 2,
    wkbPolygon = 3,
    wkbMultiPoint = 4,
    wkbMultiLineString = 5,
    wkbMultiPolygon = 6,
    wkbGeometryCollection = 7,
    wkbNone = 100,              /* non-standard, for pure attribute records */
    wkbLinearRing = 101,        /* non-standard, just for createGeometry() */
    wkbPoint25D = 0x80000001,   /* 2.5D extensions as per 99-402 */
    wkbLineString25D = 0x80000002,
    wkbPolygon25D = 0x80000003,
    wkbMultiPoint25D = 0x80000004,
    wkbMultiLineString25D = 0x80000005,
    wkbMultiPolygon25D = 0x80000006,
    wkbGeometryCollection25D = 0x80000007
} OGRwkbGeometryType;

In future Versions it would be nice to have this included in QGIS, so that at least 25d layers could be loaded.

Best regards



#1 Updated by holl-gdf-hannover-de - over 14 years ago

Hi devs,

some additional hints, I have asked at the gdal-dev-listr1.

<Frank Warmerdam>
I am not aware of a dependable way of determining the geometry type of an
oracle geometry column.  So the driver just returns wkbUnknown which means
any geometry type may appear.

This is not uncommon with different kinds of drivers, so if QGIS can't handle
it, I think QGIS should be improved.
</Frank Warmerdam>

So this means QGIS should be extended in that way, that a provider/plugin can pass a geometry-type to QgisIface::addVectorLayer if possible?


r1 http://lists.maptools.org/pipermail/gdal-dev/2006-September/010130.html

#2 Updated by Martin Dobias over 14 years ago

Initial support for 2.5D geometries has been added in in order to fix #308. This support is now just basic to allow layers to be displayed. Z vaules are completely ignored.

#3 Updated by Marco Hugentobler about 14 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

#4 Updated by Anonymous over 11 years ago

Milestone Version 0.9 deleted

Also available in: Atom PDF