Re: [Qgis-developer] Hierarchy of new geometry classes

2015-06-23 Thread Marco Hugentobler

http://osgeo-org.1560.x6.nabble.com/Questions-regarding-new-geometry-engine-td5208770.html#a5209162

On 23.06.2015 05:58, Martin Dobias wrote:

Hi

Recently I have been looking a bit at the new geometry classes and
there is one thing I do not understand: if QgsLineStringV2 is derived
from QgsCurveV2 and QgsPolygonV2 is derived from QgsSurfaceV2, why is
not the same approach used for multi-part geometries? Currently
QgsMultiLineStringV2 and QgsMultiPolygonV2 are subclasses of
QgsGeometryCollectionV2 - but why they are not derived from
QgsMultiCurveV2 and QgsMultiSurfaceV2 respectively?

It looks like OGR uses that approach too (multi-polygon from
multi-surface and multi-linestring from multi-curve):
http://www.gdal.org/classOGRGeometry.html


Regards
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Hierarchy of new geometry classes

2015-06-23 Thread Martin Dobias
Hi Marco

On Tue, Jun 23, 2015 at 2:27 PM, Marco Hugentobler
marco.hugentob...@sourcepole.ch wrote:
 http://osgeo-org.1560.x6.nabble.com/Questions-regarding-new-geometry-engine-td5208770.html#a5209162

Thanks - I thought this was already asked, but couldn't find where...

IMO the hierarchy in QGIS should follow the one in ISO and OGC models.
Maybe right now there is no practical advantage for the implementation
to follow the hierarchy, but is there a strong reason to deviate from
it? It seems confusing that multi-polygon cannot be cast to
multi-surface. I am afraid that things like this can bite us later...

Regards
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Hierarchy of new geometry classes

2015-06-23 Thread Marco Hugentobler

Hi Martin


but is there a strong reason to deviate from
it?


Only a week reason ( clone() method ). But I think you are right and it 
might be better to follow the ISO model to be more compatible with other 
libs.


Regards,
Marco

On 23.06.2015 08:39, Martin Dobias wrote:

Hi Marco

On Tue, Jun 23, 2015 at 2:27 PM, Marco Hugentobler
marco.hugentob...@sourcepole.ch wrote:

http://osgeo-org.1560.x6.nabble.com/Questions-regarding-new-geometry-engine-td5208770.html#a5209162

Thanks - I thought this was already asked, but couldn't find where...

IMO the hierarchy in QGIS should follow the one in ISO and OGC models.
Maybe right now there is no practical advantage for the implementation
to follow the hierarchy, but is there a strong reason to deviate from
it? It seems confusing that multi-polygon cannot be cast to
multi-surface. I am afraid that things like this can bite us later...

Regards
Martin



--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer