I'm working on QGIS 2.2, and I would like to make a vector layer extent bigger (thus the clip option is not suitable) to match exactly my mask layer extent. I would like the new added area to be empty. I can't seem to find a way to edit the extent.

  • (I put here a comment from Chris W) Can you further expand/clarify what you are trying to accomplish by this action? I suspect there may be other implications or considerations. – radouxju Jun 4 '14 at 7:02

The extent of a layer should be the minimum bounding box (mbb) of all features in the layer, and would not extend beyond that. It could also mean the maximum possible extents based on the unit resolution.

What follows is true in ArcGIS, and I do not know if it will operate the same way in QGIS. The extent automatically expands to be the mbb for all features. However it does not automatically shrink if outer features are removed. So you could draw a box the extent of or insert your mask layer and then delete it. Theoretically when cleanup is run on the database or anything is exported the extent will be reset to the mbb. The extent can also be manually typed in, or recalculated and even imported from another feature class through buttons on the Feature Extents tab of the feature class properties through ArcCatalog.

In QGIS, on the General tab of the Layer Properties, there is an Update Extents button, as shown in the screenshot. I am making an assumption that is there for the same reason the recalculate button is in ArcGIS - that extent automatically grows but doesn't shrink. Worth a try anyway.

Layer Properties | General

  • My experience is that wrong layer extent is in my case usually caused by issue with geometry. To check use Vector / Geometry tools / Check geometry validity... – Miro May 11 '17 at 0:31
  • I'm using QGIS 2.18.17 and do not get the "Update extents" button on that screen. – CPBL Aug 2 '18 at 17:53
  • @CPBL This answer was posted prior to that version. I don't know when it changed, but the version I currently have installed (3.2.0) there is no General tab anymore, it's now under the Source tab (entire Coordinate System section is there). If you still don't see it, that may be due to the type of data the layer contains (ie non-shape). – Chris W Aug 21 '18 at 14:33

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.