Is there a way to get the extent (bbox) of a vector layer in QGIS?

I see that I can update the extent, but I am looking for the actually coordinates of the extent.


The layer extents are available in the Layer Properties | Metadata section.

enter image description here


To get a bounding box in QGIS as a new vector layer:
Menu -> Vector -> Research Tools -> Polygon from layer extent enter image description here

  • I don't really want to create a new file. I am only interested in the four coordinates. – ustroetz Feb 3 '14 at 17:08
  • You could just use extract the nodes of the newly created polgygon and use the Export/Add geometry columns tool to get the corner coordinates. Put everything into a Processing model and it runs in no time...? – Curlew Feb 3 '14 at 17:15
  • Note: This works for raster layers too – prusswan Jun 25 '19 at 6:34

PostGIS has the ST_extent function which generates boundingbox for you. So my approach would be to export the layer to a database. if you want id,name, geom, boundingbox just do

select id,name,geom,ST_extent(geom) from your_table group by id

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.