[Qgis-developer] inheriting QgSGeometry with 3D, topology and CAD functionality
Nico Hardebol - CITG
N.J.Hardebol at tudelft.nl
Mon Jun 4 01:27:29 PDT 2012
Dear developers,
Thanks for the great efforts put into QGIS- the versatile and clear layout API and bindings to python help us greatly in the design of our custom (/academic) (structural) geologic field acquisition tool, DigiFract.
On behalf of Martijn, our c++ developer who currently seeks to implement some 3D geometry (/CAD) functionality, we have a few questions.
We want to extend QGIS with geometries that support two important features. The geometries should:
(a) 'live' in three dimensions and function both as a QgsGeometry and CAD object. For the CAD functionality we use OpenCascade (http://www.opencascade.org/).
(b) support the possibility to 'share' vertices. Notice that by 'sharing' we do not mean based on proximity by sharing vertices between different geometries.
We had the following design in mind:
We create a VertexSet that stores vertices in 2 or 3 dimensions. we want to create a XGeometry class that is derived from qgsGeometry. The XGeometry class has a reference to a VertexSet object. The geometries stored in a XGeometry object are actually indices of vertices that are stored in the VertexSet. So a line geometry is represented in the XGeometry object by: [1, 2, 3], indicating the indices of the vertices that span the line. Because the VertexSet can be shared by many geometries, vertices can easily be shared.
This would seem like an ok design (in my view), however, the qgisGeometry class is not designed as a base class. Unlike some other classes in the QGIS API, it contains no virtual functions for example. If it did, I would (re-) implement a few virtual functions (such as the ones that are used to read and write a geometry object to file for example) and it would almost seamlessly integrate into QGIS without too much effort (ok, this is extremely naive of course).
Our questions are:
(1) Since qgisGeometry is not designed with virtual function. Does anybody have any suggestions how we could tackle this problem in a nice and elegant way?
(2) QGIS build-and-install seem not to have an automake with configure. Is the most straightforward way for compiling our custom (QGIS derived) library by placing it in a QGIS_source and adjusting CMakeLists files? Is there a better way?
(3) QGIS shows well equipped to support our custom class and academic software design for structural geologic purpose, aiming at better integration of some GIS and 3D CAD functionality. We are interested to learn from and contribute to those in QGIS community with similar aim. We notice how some 1.8-2.0 QGIS design aiming at, for instance, refined topology handling, but true 3D CAD is most probably not in the scope of QGIS development. Anyway, interested to learn who might have a similar development goal.
Kind regards,
Nico Hardebol, on behalf of Martijn Stroeven
----------------------------------------------------
TU Delft
Civil Engineering and Geosciences
Dept. Applied Geology
Room 3.17
2628 CN Delft, NL
Tel +31 15 27 82707
Fax +31 15 27 81189
N.J.Hardebol at tudelft.nl<mailto:N.J.Hardebol at tudelft.nl>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20120604/60af8644/attachment.html>
More information about the Qgis-developer
mailing list