Bug report #5513
Field calculator doesn't work on MultiPoint geometry for the calculation of the coordinates X and Y
| Status: | Closed | ||
|---|---|---|---|
| Priority: | High | ||
| Assignee: | - | ||
| Category: | Data Provider | ||
| Affected QGIS version: | master | Regression?: | No |
| Operating System: | Easy fix?: | No | |
| Pull Request or Patch supplied: | No | Resolution: | fixed |
| Crashes QGIS or corrupts data: | No | Copied to github as #: | 15116 |
Description
The following functions ($x and $y) return 0 value if geometry is Multipoint type:
static QVariant fcnX( const QVariantList& , QgsFeature* f, QgsExpression* )
{
ENSURE_GEOM_TYPE( f, g, QGis::Point );
return g->asPoint().x();
}
static QVariant fcnY( const QVariantList& , QgsFeature* f, QgsExpression* )
{
ENSURE_GEOM_TYPE( f, g, QGis::Point );
return g->asPoint().y();
}
Likely related to #5293
Associated revisions
multipoint geometry support in Field Calculator (fix #5513)
History
#1
Updated by Alexander Bruy over 13 years ago
- Status changed from Open to Closed
Fixed in changeset 4e70885db9156a5e357c119745a585106ac8ea25.
#2
Updated by Alexander Bruy over 13 years ago
- Resolution set to fixed