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

Metadata for raster datasets #79

Closed effjot closed 2 years ago

effjot commented 3 years ago

Sorry for flooding the Issues with enhancement ideas ;-)

I’ve realised that it is already possible to enter metadata for rasters. After that, the layer can be found and added with the locator search bar. However, the added layer is a vector layer with its datasource set to the raster dataset, so the warning triangle about a missing datasource is shown.

The other way round, when I add the raster layer, the corresponding metadata is not shown, probably because PgMetadata only looks for information for vector layers.

So several aspects of using raster data with PgMetadata already work. Would it be difficult to add full raster layer support? I can have a look at it.

Gustry commented 3 years ago

Sorry for flooding the Issues with enhancement ideas ;-)

It's nice to see some feedback on an opensource project

The locator is indeed creating a vector layer. It mustn't be difficult to know if it's a vector or raster from PostGIS. Maybe it's already in the QGIS database API ?

The other way round, when I add the raster layer, the corresponding metadata is not shown, probably because PgMetadata only looks for information for vector layers.

Yes, the dock is checking first if it's a QgsVectorLayer before making the query to the database.

Would it be difficult to add full raster layer support? I can have a look at it.

It seems indeed not that difficult. We can assist you if you make a PR.

effjot commented 3 years ago

Thanks for your feedback! I’ll look into it in the next few days.