3liz / qgis-atlasprint

Export PDF using composer atlas feature, usable in server
13 stars 14 forks source link

Replace $id if it is numeric not only int #44

Closed rldhont closed 3 years ago

rldhont commented 3 years ago

The plugin only replace $id bay the corresponding field if it is an Int. https://github.com/3liz/qgis-atlasprint/blob/master/atlasprint/core.py#L249

QGIS Server is able to use numeric field as feature id.

So to fix some issue in generated atlas, it will be good to use

if not field.isNumeric():
    return expression
Gustry commented 3 years ago

Done in 0ef1d9ecf1c54b6335353d5598405a0543b43e4b with test case