LINE VECTORIZATION WITH ARC SCAN, FURTHER LINE EDITION

advertisement
LINE VECTORIZATION WITH ARC SCAN, FURTHER LINE EDITION, POLYGON
LAYER CREATION, AND ATTRIBUTION WITH CUSTOM TOOL.
Lab number…
The purpose of this class is to convert the information from a raster map into vector format: this
process is called “vectorization”. Many useful spatial information was collected before the “GIS era,
and we are still in the process of converting printed information into digital information that can be
incorporated into a GIS and be used for analysis.
In the example, we will “extract” the lines that form polygons of a USGS Surficial Geologic map.
Elevation contours, roads, any other line defining polygons can be extracted in the same way. The
process is faster and more automatic than “digitizing” by hand, but there are still some interactive
parts in which the user must “massage” or “improve” the quality of the lines to assure a correct
vectorization.
Let’s start the exercise. Open Arc Map and navigate to the class folder. Open the project
“Arcscan.mxd”. In the data frame, you can see a tiff image of the geologic map whose polygons we
will extract into a vector layer.
For the purpose of the lab, we will just focus on a small part of the map. The image on the left shows
the area of the map we will vectorice. The map in this format cannot be vectorized by Arc GIS, we
need to prepare the data into an image processing program like photoshop. The task in photoshop is
simple, select the black pixels inside the lines, extend the selection to all the image, and copy the
lines into a new empty layer. In this empty layer, other parts of the image that were black, like
letters, roads, etc, will also be present, but we can delete that non desired information until we get a
black-white raster with the lines of interest (bitmap image). That’s the other raster below, called
“lines”.
We also need an empty vector layer that will be the destination of the vectorized lines: It is already
in your project: the line feature class called “lines”. We created it in Arc Catalog: create a “new
geodatabase”, create “New feature class”. NOTE: The spatial reference, projection… of the feature
class will be the same as the map. We need to be careful to define the extent of the layer at least as
big as the extent of the raster we want to vectorize.
See the line feature class in the table of contents:
Now, go to “Tools”-“Extensions” and check “Arc Scan”. Then, go to “View”-“Toolbars”-“Arc
Scan”. You get this tool bar:
Click in “Raster Clean up”-“Raster painting toolbar”:
You will also need the “Editor” toolbar: Go to “view”-“toolbars”-“editor”. In the tool bat, click in
“Editor”-“start editing”.
Notice that the “target” in the iditor toolbar is the feature class “lines”. Notice that the target “raster”
in the arc scan toolbar is “Lines_bw”. If you had other layers in the table of contents, it would be a
good idea to check that both target layers are the correct ones.
NOW WE ARE FINALLY READY TO GO!!!!
In the Arc Scan toolbar, go to “Vectorization”-“Show Preview”. A “preview” line appears over the
lines in the black and white raster. Zoom in and pan to see what has happened. In “vectorization”“options” you can change the thickness and color of the preview line.
In order to assess if the “Preview” line is doing a good job representing the lines that we want to
extract (from the original map in the background), it will be great to see through the raster: in the
TOC, right click in the raster “lines_bw”. Go to properties, “display” and change the “transparent”
field to 50%. It also helps to change the color of the line in the raster layer: still in “properties”, go to
“symbology” and change the color of the line to pink, green, or other distinctive color.
Now, it is time to do some “raster clean up”. You need to assess the accuracy of the “preview” line,
and make sure that it is always inside the original line. Experiment with the buttons of the “raster
painting” toolbar.
The “blue” areas show the presence of artificial polygons created usually in the confluence of lines,
due to some empty pixel. You can solve that problem either filling in the empty pixel of deleting
some of the surrounding ones. The preview line gets automatically updated, so you’ll see the effect
of any editing of the raster as you go!. Get the eraser and delete any extra lines that you don’t want,
delete areas where the line in the raster is very thick or add paint in the areas where you intend to
“move” the preview line in some direction. Experiment!
Now, get the “line” button and draw a horizontal line in the lower side of the area we are vectorizing
to close the polygons. We will create the right line later using a different method, so you learn more
ways to do this.
It is a very good habit to save your edits as you go, in “raster clean up”-“save” and in “editor”-“save
edits”.
Think for a minute that the ultimate goal in this case is to convert this lines into a polygon layer.
Make sure that all the lines connect and intersect with other lines, that is, that ALL the polygons
close.
Go ahead and click in “vectorizations”-“generate features”.
You will get a message: “creating vectors”, and the actual lines will be “pasted” into the feature class
“lines”. Go to properties and change into a distinctive color.
In this stage, you can still perform some edits, and check for consistency and accuracy. But now, you
will be operating only with the “editor” toolbar. Create the line on the right side: just grab the pencil
of the “editor” toolbar, and draw a vertical line.
Zoom in and look for potential errors, areas where the line does not represent the real line:
The quick way to edit these problems is to select the line of interest, using:
, cutting the parts
that are not accurate using the button:
in the “edito” toolbar, and deleting the undesired
segments. Then, grab the pencil and draw by hand to complete the line. Make sure all the lines
actually connect, zooming in will help you to achieve this task.
Look for areas where the lines don’t connect with other lines to form polygons. Extend them as
needed.
Look for areas where the line does not honor the line of interest, and select, cut, delete and redraw as
needed.
AGAIN!!! It is a very good habit to save your edits as you go, “editor”-“save edits”. DO IT!. Stop
editing.
POLYGON LAYER CREATION AND ATTRIBUTION
Bring in “Arc Toolbox”:
, click “data management tools”-“features”-“feature to polygon”. Follow
the instructions of the pop up window.
You got a polygon layer!. Open attribute table. See what you got.
We will use a custom tool to attribute the polygons in a fast way. But before, we need to get the
attribute table ready with some new fields that will contain the information.
To add new fields to the attribute table, we need to make sure the editor is not “open”: go to “stop
editing”, In the attribute table, click options, “add field”. Type “UNITABBR”, select “text”, give it
“8” as length (that’s how many characters we want the field to hold).
Alternatively, we can do this in Arc Catalog. Let’s do it: Right click in the layer, go to properties,
click the tab “fields” and type a new field “UNITTR”. Make it be a “long integer”. To do this from
Arc Catalog, you need to leave “Arc Map”. But always save the project before you do that!!!
Now, go back to Arc Map, and open the attribute table of the polygon layer. We want all the values
of the field “unittr” to be equal to 100, so that the custom tool can operate properly.
Make sure you are in editing mode. Right click in the colum “UNITTR” and click in “calculate
values”
In the pop up window, just write “=100”. DONE!.
We are about to use the custom tool, but first we need to set up the transparency of the polygon layer
to depend on the field “UNITTR”. Go to the properties of the layer, “symbology” tab. Click in
“advanced”, click in “transparency”, and select the field “UNITTR”.
Now the polygon layer seems to have disappeared, and it is because the values of the field
“UNITTR” are all 100! (= 100% transparency). As we attribute the polygons, the custom tool will
change those values and will make polygons that are already attributed visible: a good trick so you
know which ones still need to be attributed.
Start editing “polygons”, select a polygon or several polygons of the same kind
, and click the
custom tool for attributing:
. In the pop up window, you can write the name of the polygon:
Qt for example, or click in one of the already created buttons. If you pan in your map or move
around a little, you will see that the attributed polygons suddenly appear in color, so you see what
you have done already.
Download