5.2. Lesson: 피처의 위상
위상은 벡터 데이터 레이어의 유용한 성질입니다. 겹침이나 틈과 같은 오류를 최소화해주기 때문입니다.
예를 들면, 피처 두 개가 경계선을 공유하는데 위상을 이용해서 경계선을 편집하는 경우, 먼저 첫 번째 피처를 편집한 다음 두 번째 피처를 편집하고 경계선을 정교하게 맞출 필요가 없습니다. 공유하는 경계선을 편집해서 두 피처를 동시에 변경할 수 있습니다.
이 강의의 목표: 예제를 통해 위상을 이해하기.
5.2.1. Follow Along: 맞추기
Snapping makes topological editing easier. This will allow your mouse cursor to snap to other objects while you digitize. To set snapping options:
Navigate to the menu entry
.Set up your Snapping options dialog to activate the
landuse
layer with Type vertex and tolerance12
pixels:Make sure that the box in the Avoid overlap column is checked.
Leave the dialog.
Check (under Advanced Digitizing toolbar is enabled.
) that the다음 지역으로 줌인/줌아웃합니다. (필요한 경우 레이어와 라벨을 활성화하십시오.)
Digitize this new (fictional) area:
When prompted, give it an OGC_FID of 999, but feel free to leave the other values unchanged.
If you are careful while digitizing, and allow the cursor to snap to the vertices of adjoining areas, you’ll notice that there won’t be any gaps between your new area and the existing adjacent areas.
Note the undo and redo tools in the Advanced Digitizing toolbar.
5.2.2. Follow Along: 올바른 위상적 피처
Topology features can sometimes need to be updated.
In our study area, an area has been turned into forest, so the
landuse
layer need an update.
We will therefore expand and join some forest features in this
area:
Instead of creating new polygons to join the forest areas, we are going to use the Vertex Tool to edit and join existing polygons.
Enter edit mode (if it is not active already)
Choose an area of forest, select a vertex, and move it to an adjoining vertex so that the two forest features meet:
Click on the other vertices and snap them into place.
위상적으로 올바른 경계선은 다음과 같이 보입니다.
Go ahead and join a few more areas using the Vertex Tool.
You can also use the Add Polygon Feature tool to fill the gap between the two forest polygons. If you have enabled Avoid overlap, you don’t have to add every single vertex - they will be added automatically if your new polygon overlaps the existing ones.
If you are using our example data, you should have a forest area looking something like this:
산림 구역을 그림보다 더, 혹은 적게, 아니면 다른 구역들을 합쳤다고 해도 괜찮습니다.
5.2.3. Follow Along: Tool: 피처 단순화
Continuing on the same layer, we will test the Simplify Feature tool:
클릭해서 실행하십시오.
Click on one of the areas which you joined using either the Vertex Tool or Add Feature tool. You will see this dialog:
Modify the Tolerance and watch what happens:
This allows you to reduce the number of vertices.
OK 를 클릭합니다.
The advantage of this tool is that it provides you with a simple and intuitive interface for generalization. But notice that the tool ruins topology. The simplified polygon no longer shares boundaries with its adjacent polygons, as it should. So this tool is better suited for stand-alone features.
다음 단계를 시작하기 전에 마지막 변경 사항을 되돌려 원래 폴리곤 상태로 설정하십시오.
5.2.4. Try Yourself 고리 추가 도구
The Add Ring tool allows you to add an interior ring to a polygon feature (cut a hole in the polygon), as long as the hole is completely contained within the polygon (touching the boundary is OK). For example, if you have digitized the outer boundaries of South Africa and you need to add a hole for Lesotho, you would use this tool.
If you experiment with the tool, you may notice that the snapping options can prevent you from creating a ring inside a polygon. So you are advised to turn off snapping before cutting a hole.
Disable snapping for the
landuse
layer using the Enable Snapping button (or use the shortcut s).Use the Add Ring tool to create a hole in the middle of a polygon geometry.
Draw a polygon over the target feature, as if you were using the Add polygon tool.
When you right-click, the hole will be visible.
Remove the hole you just created using the Delete Ring tool. Click inside the hole to delete it.
Answer
The exact shape doesn’t matter, but you should be getting a hole in the middle of your feature, like this one:
Undo your edit before continuing with the exercise for the next tool.
5.2.5. Try Yourself 부분 추가 도구
The Add Part tool allows you to add a new part to a feature, that is not directly connected to the main feature. For example, if you have digitized the boundaries of mainland South Africa, but you haven’t yet added the Prince Edward Islands, you would use this tool to create them.
Select the polygon to which you wish to add the part by using the Select Features by area or single click tool.
Use the Add Part tool to add an outlying area.
Delete the part you just created using the Delete Part tool.
참고
Click inside the part to delete it.
Answer
First select the Bontebok National Park:
Now add your new part:
Undo your edit before continuing with the exercise for the next tool.
5.2.6. Follow Along: Tool: 피처 형태 수정
The Reshape Features tool is used to extend a polygon feature or cut away a part of it (along the boundary).
Extending:
Select the polygon using the Select Features by area or single click tool.
Left-click inside the polygon to start drawing.
Draw a shape outside the polygon. The last vertex should be back inside the polygon.
Right-click to finish the shape:
다음과 비슷한 결과를 보게 될 것입니다.
Cut away a part:
5.2.7. Try Yourself 피처 쪼개기 도구
The Split Features tool is similar to the Reshape Features tool, except that it does not delete either of the two parts. Instead, it keeps them both.
We will use the tool to split a corner from a polygon.
First, select the
landuse
layer and re-enable snapping for it.Select the Split Features tool and click on a vertex to begin drawing a line.
Draw the bounding line.
Click a vertex on the “opposite” side of the polygon you wish to split and right-click to complete the line:
At this point, it may seem as if nothing has happened. But remember that the
landuse
layer is rendered without border lines, so the new division line will not be shown.Use the Select Features by area or single click tool to select the part you just split out; the new feature will now be highlighted:
5.2.8. Try Yourself 피처 합치기 도구
Now we will re-join the feature you just split out to the remaining part of the polygon:
Experiment with the Merge Selected Features and Merge Attributes of Selected Features tools.
달라진 점을 확인해보십시오.
Answer
Use the Merge Selected Features tool, making sure to first select both of the polygons you wish to merge.
Use the feature with the OGC_FID of
1
as the source of your attributes (click on its entry in the dialog, then click the Take attributes from selected feature button):
If you’re using a different dataset, it is highly likely that your original
polygon’s OGC_FID will not be 1
. Just choose the feature
which has an OGC_FID.
Using the Merge Attributes of Selected Features tool will keep the geometries distinct, but give them the same attributes.
5.2.9. In Conclusion
위상 편집은 오브젝트를 빠르고 쉽게 생성하고 변경하면서도 위상적으로 올바르게 유지할 수 있는 강력한 도구입니다.
5.2.10. What’s Next?
Now you know how to digitize the shape of the objects easily, but adding attributes is still a bit of a headache! Next we will show you how to use forms, making attribute editing simpler and more effective.