Re: [Qgis-user] DB Manager in QGIS 2.8

2015-03-19 Thread David Fawcett
Alexandre, Thank you very much. Of course, it was operator error! I was writing a quick query for a demo and not to solve a real problem, so I hadn't really thought through the issue with unique results. Adding DISTINCT made it work as expected. A great enhancement to DB Manager would be some

Re: [Qgis-user] DB Manager in QGIS 2.8

2015-03-19 Thread Alexandre Neto
Hello David, Can I assume that you use fires.id as unique integer value column in DBManager to load the layer? Because with your query you will likely get repeated values for fires.id. That is, each fires feature will appear as many times as lakes within 1000 meters. If that's what you want, you

Re: [Qgis-user] DB Manager in QGIS 2.8

2015-03-18 Thread David Fawcett
Thanks for the response Alexandre. Here is the query: SELECT fires.id, fires.inci_no, fires.descript, fires.geom FROM lab.mpls_fires_2014 fires INNER JOIN lab.mpls_lakes lakes ON ST_DWITHIN(fires.geom, lakes.geom, 1000) When I add ST_GEOMETRYTYPE(fires.geom) to the query, the value is St_M

Re: [Qgis-user] DB Manager in QGIS 2.8

2015-03-18 Thread Alexandre Neto
Can you please show your sql query? Notice that if your query result in different geometries, qgis won't be able to choose a geometry type for the layer. I advice you to Check your results with St_GeometryType(). Best regards, Alexandre Neto Em 18/03/2015 18:52, "David Fawcett" escreveu: > I a

[Qgis-user] DB Manager in QGIS 2.8

2015-03-18 Thread David Fawcett
I am running QGIS 2.8.1 on OSX 10.9.5 using William's binaries. The DB Manager plugin is at 0.1.20. I can load layers into PostGIS using the DB Manager plugin, and I can use the SQL window to execute a spatial query intersecting two tables. But, when I check the box to load the query result as a