3liz / qgis-pgmetadata-plugin

QGIS Plugin to manage some metadata from PostgreSQL layer
GNU General Public License v2.0
12 stars 10 forks source link

Add icons for “M” (linear referencing) geometry types #160

Closed effjot closed 7 months ago

effjot commented 8 months ago

Show geometry icons in locator search results for geometry types with “M” coordinate, e.g. LINESTRINGM.

Gustry commented 7 months ago

Hum, the geometry is a string, because we get it from ... d.geometry_type, ... FROM pgmetadata.export_datasets_as_flat_table('{locale}') d, not sure it's worth it to build the QgsMapLayer to use QgsIconUtils.

effjot commented 7 months ago

return QgsIconUtils.iconForWkbType(QgsWkbTypes.parseType(geometry_type)) should do the trick, but I haven’t tested it fully yet.

Gustry commented 7 months ago

Thanks for checking. I haven't tried, but just to keep notes : https://github.com/3liz/qgis-pgmetadata-plugin/pull/161