<div dir="ltr">Ah, this makes perfect sense - I figured that I needed to define the geometry type, just wasn't quite figuring out how. Nice and simple solution!<div>Thanks so much,</div><div>Mike</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 28, 2017 at 1:40 AM, Bernhard Ströbl <span dir="ltr"><<a href="mailto:bernhard.stroebl@jena.de" target="_blank">bernhard.stroebl@jena.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
you need to explicitly state the geometry type and SRS in you view definition like this:<span class=""><br>
CREATE OR REPLACE VIEW test.testbuff as<br>
SELECT gid, area_id,<br></span>
st_buffer(testshape.geom, 100)::geometry(Polygon,your_sr<wbr>s_code)<span class=""><br>
as geom2 FROM test.testshape where testshape.area_id=100;<br>
<br></span>
could be Polygon or Multipolygon depending on the input, your_srs_code should be the same as testshape's<br>
<br>
QGIS can analyze geometry columns and detect the type (and probably SRS), however only relations with geometry fields defined in this way are listed in geometry_columns.<br>
<br>
Bernhard<div><div class="h5"><br>
<br>
Am 27.03.2017 um 23:42 schrieb Michael Treglia:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi All,<br>
<br>
I'm running a PostGIS query to create a view, buffering a polygon -<br>
viewing the result in DB Manager, the associated icon, rather than being<br>
polygons, is a question mark, and in the info tab for the layer, I see<br>
the warning ' There is no entry in geometry_columns!'<br>
<br>
That said, the layer actually displays fine in QGIS, and in the list of<br>
fields, the appropriate column is labeled as Type 'geometry'.<br>
<br>
Thus, is this really a problem? And if so, any easy fixes? A sample<br>
query is below:<br>
<br>
CREATE OR REPLACE VIEW test.testbuff as<br>
SELECT gid, area_id, st_buffer(testshape.geom, 100)<br>
as geom2 FROM test.testshape where testshape.area_id=100;<br>
<br>
<br>
Thanks for any suggestions!<br>
Mike<br>
<br>
<br></div></div>
______________________________<wbr>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/qgis-user</a><br>
<br>
</blockquote>
<br>
<br>
<br>
__________ Information from ESET Mail Security, version of virus signature database 15160 (20170328) __________<br>
<br>
The message was checked by ESET Mail Security.<br>
<a href="http://www.eset.com" rel="noreferrer" target="_blank">http://www.eset.com</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/qgis-user</a></blockquote></div><br></div>