So i need to set a 30 meter Buffer around a road in a Layer and visualize it in QGIS. The road is split in 8 segments( don´t think it makes a difference).

Tried this code:

select a.ref, a.geom, st_buffer(a.geom, 30)
from au.roads a
where a.ref='A306'

When i load it in QGIS it doesn´t show a Buffer around that road. What am i doing wrong?

  • 1
    Your query is returning two geometries ... that must must distract QGIS i suppose ... try to only keep your buffer's geometry ... – snaileater Aug 13 at 17:23
  • Where did u try 'this code' ? – snaileater Aug 15 at 8:22

Your query create two geometries, so you need to tell Qgis what is your geometry column when you load your table (or either don't select a.geom)

when you load a table with two geometry column in postgreSQL loader it give you this (exemple from one of my project) :

enter image description here

here, you can either load the table with geom as the geometry column or border as the geom column.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.