[Qgis-user] PostGIS raster access in QGIS using DBManager (or wktraster)
Guido Lemoine
guido.lemoine at jrc.ec.europa.eu
Fri Mar 7 03:29:40 PST 2014
Jose Carlos,
Thanks for your answers. I know the option to Add to Canvas for a raster
layer that shows up in the DBManager interface.
Problem is that I connect over the network, and Landsat images are typically
150 Mb per band.
This is why I prefer to select well-delineated areas that are reasonable in
size, for which the raster selection query seem to be just the right
solution.
Even better would be a Add PostGIS raster layer on the left menu, that
would logically go for the re-sampled pyramid layers, if available in the
database, or warn when really big images would be requested [over a network
connection].
As a start, I guess I will have to dig out the old version of DBManager and
restore the raster functionality
Guido
From: qgis-user-bounces at lists.osgeo.org
[mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of José Carlos Martínez
Llario
Sent: 07 March 2014 10:45
To: qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] PostGIS raster access in QGIS using DBManager (or
wktraster)
Hi,
you just have to add the layer from db manager directly, it is working with
raster too.
I already did few days ago with QGIS 2.2 with PostGIS Raster, it worked
really well better than other previous versions of QGIS.
cheers,
Jose Carlos Martinez
On 07/03/2014 10:40, José Pedro Santos wrote:
Ciao Guido,
DBManager is only for vector layers..In the version 1.8 existed a plugin for
importing raster layers but wasn't update for this new version.
Regards,
José Santos
_____
From: guido.lemoine at jrc.ec.europa.eu
To: qgis-user at lists.osgeo.org
Date: Fri, 7 Mar 2014 07:51:33 +0100
Subject: [Qgis-user] PostGIS raster access in QGIS using DBManager (or
wktraster)
Dear QGIS users,
[This was posted on QGIS developer as well, but maybe I should seek the
solution here]
I am using QGIS 2.2 .0 (Valmiera) and trying to load a raster query result
via DBManager, using the following query:
select 1 as rid, st_union(st_band(rast, '4,3,2') ) as rast
from o_8_lc81970232013202lgn00_all_rds_sub, municipalities
where municipalities.wkb_geometry && rast
and munname = 'Veendam'
(in short: Band 4,3,2 of a raster2pgsql-loaded Landsat-8 image (overview 8
version) for a "municipality" polygon (administrative commune boundary).
Execute (F5) correctly returns a single row (and I can save the union result
with ST_AsTIFF() to file in a script)
When I try to "Load as a new layer" to visualise the result in QGIS, I get
the following error message:
Erroneous query: SELECT DISTINCT upper(geometrytype("rast")),st_srid("rast")
FROM (select 1 as rid, st_union(st_band(rast, '4,3,2') ) as rast
from o_8_lc81970232013202lgn00_all_rds_sub, gemeentegebieden
where gemeentegebieden.wkb_geometry && rast
and gemnaam = 'Veendam'
) AS "subQuery_0" returned 7 [ERROR: function geometrytype(raster) does not
exist
LINE 1: SELECT DISTINCT upper(geometrytype("rast")),st_srid("rast") ...
^
HINT: No function matches the given name and argument types. You might need
to add explicit type casts.
]
Apparently, my query get "wrapped" in the SELECT DISTINCT outer query above
(which obviously does not work).
Is this a known issue, and, if so, can it be modified, for instance by
providing explicitly geometrytype and srid (and if so, how?).
I also checked out the wktraster plugin, but that does not work for 2.2. Is
an upgrade expected soon [or should I try writing it myself].
Thanks for all the wonderful stuff,
Guido Lemoine
_______________________________________________ Qgis-user mailing list
Qgis-user at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140307/a72b9c47/attachment.html>
More information about the Qgis-user
mailing list