Re: [Qgis-developer] Loading PostGIS Raster data via Add PostGIS Layer menu option

2014-07-22 Thread Paolo Cavallini
Il 22/07/2014 16:57, Jorge Arevalo ha scritto:

 I'm a developer of GDAL PostGIS Raster driver, and I'd like to know if it 
 would be
 possible to modify the Add PostGIS Layer menu option to allow adding 
 PostGIS Raster
 data, in addition to the PostGIS data.

This would be a much welcome feature.
Thanks!

-- 
Paolo Cavallini - www.faunalia.eu
Corsi QGIS e PostGIS: http://www.faunalia.eu/training.html
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Loading PostGIS Raster data via Add PostGIS Layer menu option

2014-07-22 Thread Giuseppe Sucameli
Hi Jorge,

On Tue, Jul 22, 2014 at 4:57 PM, Jorge Arevalo jorgearev...@libregis.org
wrote:

 I'm a developer of GDAL PostGIS Raster driver, and I'd like to know if it
 would be possible to modify the Add PostGIS Layer menu option to allow
 adding PostGIS Raster data, in addition to the PostGIS data.


I don't know how much effort could require to change that dialog to list PG
raster tables as well, but you may add a new option Add PostGIS Raster
Layer with a new dialog.

Opening the QgsPostgresProvider class definition [1], I see it inherits
 from QgsVectorDataProvider. I guess I could make the class also inherit
 from QgsRasterDataProvider, like GDAL does [2], but as I don't have any
 previous experience developing for QGIS core, I'm probably underestimating
 the difficulty (besides, I would also need GUI changes...).


You should develop a new provider which extends the QgsRasterDataProvider,
as the current one is for vectors only.

 I do have experience developing in C/C++, and developing for GDAL and
 PostGIS libraries. So, do you think this could be an affordable task,
 without changing a lot of existent code? I'd like this task to be my
 August project


It shouldn't be hard too much, but I'm quite sure you must create new
classes and not just change the existent ones.
Anyway, I hope someone who worked on raster stuff can give you any hints,
maybe it's easier than we can tell :)

Regards.



 Many thanks in advance.

 Best regards,
  --
 Jorge Arevalo

 http://about.me/jorgeas80

 [1]
 https://github.com/qgis/QGIS/blob/master/src/providers/postgres/qgspostgresprovider.h
 [2]
 https://github.com/qgis/QGIS/blob/master/src/providers/gdal/qgsgdalprovider.h

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
Giuseppe Sucameli
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer