[QGIS-Developer] geom_from_text() and GeomFromWKT()

Matthias Kuhn matthias at opengis.ch
Fri Nov 29 06:22:33 PST 2019


Yes, there are several aliases for existing functions defined.

[print(f.name() + ' -> ' + str(f.aliases())) for f in 
QgsExpression.Functions() if f.aliases()]

pi -> ['$pi']
to_int -> ['toint']
to_real -> ['toreal']
to_string -> ['tostring']
to_datetime -> ['todatetime']
to_date -> ['todate']
to_time -> ['totime']
to_interval -> ['tointerval']
to_dm -> ['todm']
to_dms -> ['todms']
now -> ['$now']
$x_at -> ['xat', 'x_at']
$y_at -> ['yat', 'y_at']
x_min -> ['xmin']
x_max -> ['xmax']
y_min -> ['ymin']
y_max -> ['ymax']
geom_from_wkt -> ['geomFromWKT']
geom_from_gml -> ['geomFromGML']
intersects_bbox -> ['bbox']
convex_hull -> ['convexHull']
sym_difference -> ['symDifference']
geom_to_wkt -> ['geomToWKT']
uuid -> ['$uuid']
get_feature -> ['QgsExpressionUtils::getFeature']


Regards
Matthias

On 11/29/19 2:31 PM, Raymond Nijssen wrote:
> In a qgis expression both
>
>   geom_from_wkt('point(0 0)')
>
> and
>
>   GeomFromWKT('point(0 0)')
>
> work!
>
>
> The first is listed in the expression functions but the second is not. 
> It is not a problem but it surprises me and I'm wondering if there are 
> more secret functions in expressions. Does anyone know?
>
> Kind regards,
> Raymond
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>


More information about the QGIS-Developer mailing list