Posts Tagged ‘snapping’

Creating a doughnut polygon

Problem: You need to cut a hole out of a polygon

This comes up a lot. Perhaps you’re digitizing a lake, and it has an island in the middle of it. Or there’s an area of lawn surrounding a building. If you’re starting from scratch, I recommend drawing lines and converting them to polygons. Similarly, if you need to make a lot of holes, I recommend converting your polygons into lines, editing the lines, then converting back to polygons. That method is simpler for large scale changes.

But sometimes you just need a quick hole or two right now. For instance, you might be working in the Planning Office for the city of Lansing, Michigan. You might be in charge of maintaining their Existing Land Use Map, shown below.

In the southwest quadrant of the map, there is one region of Institutional land that has a Single Residence in the middle. Let’s pretend that house was just built, and you’ve been asked to update the map.

Here’s how you could do it:

1. Make your Land Use polygon layer partially transparent so you can see what you’re doing underneath.

Howto: Right click on the layer in the Table of Contents to bring up Layer Properties. On the Display tab, enter a number greater than 0 and less than 100 in the Transparent % box. 50% is good.

2. Enable editing and double click on the Institutional polygon to show the sketch vertices. Note: Double clicking brings you into Modify Feature mode, allowing you to move vertices in the existing polygon. A single click is Create Feature mode, which draws a new polygon.

3. Right click on the edge of the sketch, near where you want to create the hole, to Insert Vertex. Then create two more vertices next to it.

4. Pull the center vertex in towards one of the outer corners of your hole.

5. Create as many new vertices as needed to drag out to all of the other corners.

6. Prepare to close the empty space and the filled in space by placing two vertices at each location close to another. You’ll end up with a narrow rectangle connecting the edge of the filled space with the edge of the empty space.

7. The idea is to turn this rectangle into a line by merging the vertices at the top and bottom. To do this, turn on snapping to sketch vertices.

Howto: Select snapping from the Editor drop down menu and check the Edit sketch vertices box.

8. Pull the vertices together.

When you click away, that connecting line will disappear, giving you the two distinct areas you want. Now, it’s a simple matter to draw a new polygon for the Residential area within that hole. Just snap to its four corners.

Make sure that snapping to the editable layer, and not just the sketch, is turned on for this.

Note: If you are just creating a visual map, you can draw the smaller polygon on top of the larger, and then set Symbol Levels to ensure they display correctly. (Symbol levels are available from the Advanced drop down in the Symbology tab of the Layer Properties dialog). This is a quick fix if you’re on a tight deadline. It is not recommend if you’re going to be doing analysis on the layer or distributing it to others.

Another Note: There are other ways to do this, such as using the Cut Polygon Features task (for a hole), or the Clip task (for a polygon inside a polygon). ArcMap’s Help describes both of these methods. I like following the steps I have outlined because I can accomplish everything by clicking and dragging without switching between editing tasks. Within GIS, there are many ways to do most things, and you will develop your own style.

Tags: ,

Creating a continuous surface of polygons

The problem: You need to digitize adjacent polygons

This isn’t as straightforward as it initially appears. If you need to digitize some points of interest, you create an empty point layer and start clicking away. If you need to digitize some river or road lines, you create an empty line layer and start tracing. But if you follow the same logic to create polygons, unless those polygons don’t touch, you’re going to run into trouble.

Polygons that are separate from one another, such as building footprints or lakes, no problem. But polygons that form a continuous surface, such as landcover, administrative areas (e.g. counties, zip codes), soil types, or flood plains, big problem.

Why? Well, let’s take the example of a soil map. I downloaded this one from the Antrim County Community Center. It’s a 1928 Soil Survey of Antrim County, Michigan.

I zoomed in on an area of Antrim gravelly sandy loam, and drew my first polygon. Then I created a second polygon for the Lupton muck next to it.

Looks fine, except when we zoom in. The polygons don’t line up. Those empty spaces in between are called slivers. They are to be avoided at all costs. They will mess up feature counts and calculations of areas. They don’t represent the real world, and they look bad. However, they are virtually impossible to avoid if you are digitizing in this manner. You can try to by zooming really far in while you are drawing, and being really careful, but what a headache! Fortunately, the cost is not that high.

One way to avoid slivers is by the use of snapping. The snapping toolbar is available from the Editor dropdown menu in ArcMap. Here, I have turned on snapping to vertices in both the existing polygons and the new one I’m drawing (the sketch). Now, when I hover close to a vertex, the mouse will jump right on top of it. Snapping makes it impossible for you to create a vertex in your new polygon that is close to a vertex in any nearby polygon. It forces all vertices to be in the exact same place, or far away.

Note: This will make creating very tiny polygons difficult. If you run into trouble with this you will need to change your snapping tolerance by selecting Options in the Editor dropdown.

Snapping is enough to fix the problem if you have just a few polygons or a lot of straight lines (like rectangular buildings). But in the case of this curvy soil map, you’re still going to have to zoom in and be careful to “hit” every vertex. It only offers a small help.

A much better way: Don’t digitize the polygons. Digitize the lines between the polygons.

Create an empty line file, and don’t worry about attributes yet. Zoom in to the scale you plan to digitize at, and don’t deviate from that zoom. Turn snapping on so that intersections meet. Then, just pan around and draw.

Now

  1. Create an empty polygon layer and add it to your map
  2. Start editing and make the polygon layer your target
  3. Select all the features in the line layer
  4. Turn on the Topology menu, and use the Construct Features tool. This will create a polygon from every distinct closed area.

Note: Snapping is important for the tool to recognize these areas as closed. If your result has holes, it is because you missed a spot.

Congratulations! You have just about halved the number of vertices you had to draw, and created truly contiguous polygons. Now, add your attribute fields. It’s a good idea to save the line file in case you need to go back and make changes later.

Tags: , ,

Bad Behavior has blocked 83 access attempts in the last 7 days.