I'm new to QGIS and am struggling a bit, I'm using the 2.18 version on a Mac OSX Yosemite. I'm trying to add a ring to create a geological map, I was successful for most of the map, but suddenly it does not allow me to do it any more. Both add ring and fill ring tools give me the same error

could not add ring since the inserted Ring is not contained in a feature

The ring I want to create does not intersect with any other feature... Any ideas on what this could be about and on how to solve the problem?enter image description here

  • Which tool did you use?
    – Erik
    Jul 6, 2018 at 15:14
  • I tryed both with Add ring and with Fill ring, both had the same result, several times. Jul 6, 2018 at 15:34

2 Answers 2


In QGIS, ring means an interior ring, IE a hole in an existing polygon. Fundamental to the concept of a ring is that it falls entirely within an existing polygon. This means that:

  • The Add Ring tool cuts a hole in an existing polygon. Like using a cookie cutter to cut out and remove a piece of a cookie.
  • The Fill Ring tool cuts a hole in an existing polygon, and creates a new polygon from the interior of the cut. Like using a cookie cutter to cut a hole in a cookie, but not removing the cut piece.
  • The Delete Ring tool removes an existing ring and fills in the hole. Like smooshing a new piece of cookie dough into a hole cut out of a cookie.

enter image description here

Since the polygon you're trying to create is not within an existing polygon, you must use a different tool. Depending on what you're trying to achieve, you may want to either:

  • use the Add new feature tool to create a new feature, or
  • use the Split tool (Advanced Digitizing toolbar) on the underlying polygons. This will create multiple pieces, which you'll need to select (Select features tool, Attributes toolbar) and merge (Merge Selected Features tool, Advanced Digitizing toolbar).

If you are indeed using the Ring tools correctly and still getting the error could not add ring since the inserted Ring is not contained in a feature the issue may be invalid geometry. When a polygon has invalid geometry, QGIS doesn't know where the inside of the polygon is. Since a ring must be placed inside a polygon, attempting to place a ring inside an invalid geometry will give this error.

Common geometry errors include:

  • Duplicate vertices: one vertex directly on top of another.
    • This is often caused by double-clicking when creating a polygon (very common in QGIS with people who also use ArcMap because in Arc you double-click to finish creating a feature).
    • Can also be caused by having snapping on when creating a polygon or editing vertices.
  • Self-intersection: the sides of the polygon cross. Sometimes creates an hourglass shape.
    • Can also be caused by polygonizing a raster. Two diagonally adjacent raster cells will be polygonized with their corners at the same location.

enter image description here

To find and fix invalid geometry, use the Check Validity or Fix Geometry tools. See Fixing geometry validity errors in QGIS for more info.

  • Thank you for your answer,I had understood that much. I want to cut the cookie and live the cookie inside.Maybe its not clear from the picture, but the poligon at the center i am trying to cut (the one without the vertex markers),of which i made a snapshot just before i right clicked,its entirely within a much larger polygon, whose boundries can be seen at the edges of the snapshot. Even if i am in edit mode,it tells me that there is an error.. Jul 7, 2018 at 13:41
  • I was doing exactly the same thing up to now and I had no problem,but now it does not allow me to continue. I tried uninstalling and reinstalling but it makes no difference Jul 7, 2018 at 13:41
  • Okay, given the new information you provided, I would guess that there is a geometry error in the polygon.
    – csk
    Jul 8, 2018 at 18:54
  • By the way, I apologize for assuming you didn't know how to use the Ring tools. It's often difficult to know how knowledgeable the person asking the question is.
    – csk
    Jul 8, 2018 at 19:08
  • Do not apolagize! you ar right I'm not very knowledgable! What does it mean exactly that there is a geometry error? Thank you very much! Jul 9, 2018 at 14:43

This may sound strange, but the polygon you have been trying to add a new ring is not on the layer you are currently editing.

Notice the polygons located at around northeastern and southwestern corners show red "x"s? They are called Vertex markers which show up when you are in editing mode. Only the one big polygon at the center does not have "x" marks. It means the polygon is not being digitized or editable.

  • Good point, but the poligon at the center its just the ring i was trying to make before i right click to finish the process and than it disappears. I have only one poligon layer in my workspace at the moment.. Sorry if i explained my self unclearly and thans for the answer Jul 7, 2018 at 13:32
  • @FIAMMABORGNI I see. Thanks for the clarification.
    – Kazuhito
    Jul 7, 2018 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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