#246 geometryType() method for entities
Metadata
Property | Value |
---|---|
Reported by | Carsten Gräser (graeser@math.fu-berlin.de) |
Reported at | Jan 25, 2007 17:26 |
Type | Feature Request |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Oliver Sander (oliver.sander@tu-dresden.de) |
Last edited at | Nov 14, 2007 17:35 |
Closed by | Oliver Sander (oliver.sander@tu-dresden.de) |
Closed at | Nov 14, 2007 17:35 |
Closed in version | Unknown |
Resolution | Implemented |
Comment | Method added to the interface in revision 3627 (2007-04-05). Last relevant specializations (ALUGRID) in revision 3909. |
Description
I suggest to introduce a method geometryType() in entity for the following reasons:
1)Currently one has to use entity.geometry().type() to get the GeometryType of an entity. This seems to be a very costly way e.g. in ALUGRID. I guess ALUGRID constructs Geometry objects when geometry() is called and therefore everytime the GeometryType of an entity is needed. 2)This problem occurs everytime you want to write portable code for different grids which could have different element types. E.g. the mcmgmapper works this way. 3)The GeometryType is primary a property of the entity and not only of the geometry. This is obvious since you need (GeometryType,level, levelindex) or (GeometryType, leafindex) to fully qualify an entity. 4)The method is easy to implement, since grids with only one type now it apriory and grids with multiple types could just forward geometry().type() if there is no better way.