[Qgis-developer] QgsGeometry

Marco Hugentobler marco.hugentobler at karto.baug.ethz.ch
Sat Sep 8 10:03:19 EDT 2007


Dear qgis devs,

I'm currently doing some development in the geometry class (in the advanced 
editing branch). qgsgeometry.cpp now has about 5000 lines of code. Clearly 
too much for one class. 
I therefore plan to move some code that modifies the current geometry to other 
classes. For instance there could be a class 'QgsSplitGeometry' which has a 
pointer to a geometry object and a method that splits this geometry using the 
interface methods fromPolyline(), asPolyline(), etc. Like this, we could move 
much code away from qgsgeometry.cpp. The interface methods make copies of the 
geometry, but I think that this is no problem for manipulation methods, which 
are not performance critical. And the fromPolyline(), asPolyline(),... 
methods provide a proper interface that separates manipulation code from 
internal geometry representation (which is wkb).

Any objection about this? 
Maybe you have better ideas. If so, please post them here on the list.

Best regards,
Marco  

-- 
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee
marco.hugentobler at karto.baug.ethz.ch



More information about the Qgis-developer mailing list