How to Open Files
How to Search
To search for a keyword or value in ArcGIS shapefiles first make the layer to be searched active on the layer bar, then make sure that only the layer to be searched is checked in the Selectable Layers list.
- go to SELECTION | SET SELECTABLE LAYERS
- check the box next to the layer to be searched, then CLOSE
- go to SELECTION | SELECT BY ATTRIBUTES
- Choose the field you want to search in by double-clicking on it, in this example: [NAME_PY] )
- you will see the SQL query condition being generated in the text box
- single click on the operater button, such as = and you will see ( [NAME_PY] = )
- double click on the value to be searched from the drop down on the right, such as 'Amugou' and you will see ( [NAME_PY] = 'Amugou' )
- if the value you a searching for does not appear in the drop down list, you can click on COMPLETE LIST, to get all the values. NOTE: if the file contains many (ie thousands) of records, this is NOT recommended, and you should type in the search string yourself as described in the next step.
- or you may type in the searched for value directly, such as 'Mengmao' and you will see ( [NAME_PY] = 'Mengmao' ) in the text box area. NOTE: the text string to be searched should be within SINGLE QUOTES, not double quotes.
- click APPLY to launch the search
- search results are found in two ways. First, on the map view, the items found that match the search criteria will be highlighted in LIGHT BLUE. (NOTE: this means you should NOT use LIGHT BLUE as the color of your features when searching)
- on the map view you can zoom in to the selection by using SELECTION | ZOOM TO SELECTED FEATURES command
- you may also see the selected feature by going to the attribute table. right click on the layer in the layer bar and choose OPEN ATTRIBUTE TABLE
- once you have opened the attribute table, the default view will be to see ALL of the records. To see only the selected records, click on the SELECTED tab button. In the example image, below, the table view contains 8659 records, and indicates that 1 record has been selected as a result of the search.
- when viewing only the selected records in the attribute table, the selected rows will be highlighted in light blue.
If you want to export an entire shapefile to a new layer for editing, including spatial data use DATA | EXPORT from the layer bar. NOTE: if a subset of features have been selected, ONLY the SELECTED FEATURES will be exported to a new layer. Use this method when you want to edit or change the characteristics of a limited subset of the features (such as appearance of spatial objects, or to change the values of their attributes), without affecting the original layer.
- move your mouse over the name of the layer you want to export on the layer bar, right click. A dialog box will open. Move the mouse down the list of options to DATA. A new box will open to the right. Move the mouse over the EXPORT option, then left click.
- in the Export Data dialog box, you have the option of choosing between the original projection of the GIS layer, or the projection of the data frame (ie, the projection of the first layer opened in the ArcGIS session). In this case the data frame option is selected. Then click on the folder icon to browse for the location on your computer where you wish to save the new copy of the layer. When you hit SAVE, the filename "Export_output.shp" will be entered by default. You may delete "Export_output.shp" and type in your own desired filename, as shown in the image below, where the name "NEW_filename.shp" has been added. NOTE: keep the .shp extension. When you are ready click OK to export the layer.
- when the export is finished, you will be prompted to add the new layer to your current session.
If you want to export the attribute table only, WITHOUT the spatial data use OPTIONS | EXPORT from the Attribute Table. NOTE: if a subset of features have been selected, ONLY the SELECTED FEATURES will be exported to a new table.
- first open the attribute table by right clicking on the name of the layer and clicking on OPEN ATTRIBUTE TABLE
- decide whether you want to export the attributes for the entire GIS layer (ALL tab) or the currently selected records only (SELECTION). when the correct table has finished loading, click the OPTIONS button.
- the OPTIONS dialog box will open. move the mouse down to EXPORT and right click.
- the OPTIONS dialog box will open. move the mouse down to EXPORT and right click.
- the EXPORT DATA dialog box will open. the projection options will be grayed out, because ONLY the attributes are being exported to a new table. click on the FOLDER ICON to browse to the location on your computer where you wish to save the new table.
- when the correct path to the selected folder is showing in the Output Table text box, select the desired output format from the SAVE AS TYPE drop down menu. Here we select TEXT FILE. click SAVE.
- the default export filename is "Export_output.dbf" you can delete this name and type in your own filename, in this example we used the name "NEW_table_name" click OK. the attributes in the table will be exported to a new file, and you will be prompted to add the new table to the current data frame session in ArcGIS. Or you can open the file from a spreadsheet application, such as Excel.
How to Join Tables to Existing GIS Layers
If you want to join your own attributes and values to existing GIS layers, you must make sure that the records being joined to the GIS layer contain a unique key field with values that match those in one of the GIS layer fields. We strongly recommend joining on the SYSTEM_ID numbers. We also recommend that users first select the records they are interested in from an existing GIS layer, then EXPORT them in TWO forms--both shapefile and table--as described in the previous section. Using the export table, new fields can be added easily in various spreadsheet or database applications. Once the table has been completed with the new attribute information, follow the steps listed below to join the table back to the exported shapefile GIS layer, using the SYSTEM_ID as the unique key. In this way, the objects in the shapefile will have a one-to-one match with the records in the table, and will not introduce any errors or anomalies into the original GIS layer from which the subset was selected.
- by way of example, let's suppose that the records in the 1911 Prefectures GIS layer, for which "LEV1_PY" = 'Hunan' (Province field contains the string "Hunan') are selected, then exported to a new shapefile, and the attritibutes of the selection are exported to a new TEXT file. First, open the TEXT file in a spreadsheet and add a new column containing the values you want to associate with each record. In the following image we have added population figures. NOTE: all the columns except for SYSTEM_ID and PLACENAMES have been removed, because when we join this table back to the shapefile they would become duplicates. The SYSTEM_ID is necessary to effect the join. when finished editing, SAVE the revised version of the table. (EXTREMELY IMPORTANT: the type of data in the SYS_ID field must match in both tables. The shapefiles SYS_ID are in TEXT (CHARACTER) format. This is because many applications will automatically add commas for figures 1,000 and up, as well as decimal points when they detect numeric values. By maintaining TEXT STRINGS for the SYS-IDs, this error will not occur. Unfortunately, ArcGIS cannot detect the format of a field saved as TXT or CSV. Therefore, for the revised table, you will need to save in a format which preserves the type value as TEXT for the SYS_ID field in order for the join to work. The only format which ArcGIS accepts, in this case, is DBF format. We recommend importing the revised TEXT file into ACCESS, then delaring the data type of the SYS_ID field as TEXT in the Design View, before exporting as DBF IV format.)
- back in ArcGIS, add the exported shapefile AND the revised table (DBF format with SYS_ID set as TEXT data type) by using the ADD DATA icon. NOTE: the different icons and appearance of the polygon shapefile (top) and the data table (bottom) on the layer bar.
- to execute the join, first right click on the target layer (the GIS shapefile), then move the mouse down the options list to JOINS AND RELATES. a new dialog box will open. move the mouse to JOIN and left click. NOTE: be sure to begin with the shapefile layer name on the layer bar, NOT the folder that CONTAINS the shapefile (which only allows the options REMOVE and ADD TABLE).
- in the JOIN DATA dialog box, select "join attributes from a table" in the first drop down menu. Step 1: choose the field in the layer that you want to join on, select SYS_ID. Step 2: choose the table to join to this layer, click on the folder icon to browse to the location of the file table and double click on the filename. Step 3: if the data types of SYS_ID are the same in both the target shapefile and the data table, then SYS_ID should be an available choice in this dialog box. NOTE: if SYS_ID does NOT appear here, then the data type for the table has NOT been set as TEXT, but has been interpreted by ArcGIS as NUMERIC. If this is the case the join will NOT work, and you must follow the steps outlined above, regarding saving as DBF. To finish the join click OK. a proper match on the JOIN DATA dialog is shown in the image below:
- once the join is done, you may check the attributes table to make sure the data from the new table has been joined to the shapefile, but right clicking on the layer filename and left clicking on OPEN ATTRIBUTE TABLE.
How to Create Thematic Maps Base on Attributes
- use the symbology settings to create a thematic map. to do this, right click on the layer filename and move the mouse down to PROPERTIES, then left click.
- in the PROPERTIES dialog box, click on the SYMBOLOGY tab, then on QUANTITIES.
- to draw Quantities using colors to show values, the GRADUATED COLORS setting is appropriate for polygons. (For points try graduated symbols.) From the FIELDS VALUES drop down box, select the values you have joined to the table, in this case POPULATION.
- you may also use the values in another field to NORMALIZE BY, change the color settings in the COLOR RAMP, or change the number of classes and method of classification. when these settings have been made click APPLY then OKAY. The resulting thematic map based on your joined values will be displayed in the map view.
How to Georegister Scanned Historical Maps
If you want to make use of historical maps as separate layers in GIS, you must first scan them and then georegister them, which involves "rubber sheeting" or rectifying the features on the historical map scan to corresponding features in your GIS data. Generally speaking, this process is only useful for maps that were created according to some known cartographic and surveying techniques, and are not just rough representations of a certain area. The process of rubber-sheeting will invariably distort the relative positions of the features on the scanned image to such an extent, that if the original work was not more or less accurate, the georegistered image will end up to be wildly inaccurate. This being said, it is always interesting to see a well surveyed historical map in the context of contemporary GIS data, and to be able to gauge the locations of features shown on the historical maps that might no longer exist.
For this example, we have included on this CD-ROM a complete scanned set of four maps by Joseph Rock, originally published in "The Ancient Na-Khi Kingdom of Southwest China" 2 Volumes (1948). The maps are provided courtesy of Harvard Yenching Institute for use as digital scans, but not for publication or reprint. (See Copyright Restrictions)
- scan the map to be registered (for our sample let's use the middle portion of the Deqen map, which was scanned at 300 dpi resolution). Save as a TIFF, BMP, JPG, or suitable raster format.
- open the layer(s) to be used as the GIS basemaps for registration, let's use Rivers, Populated Places, and Roads
- once the three layers are open zoom into roughly the area occupied by the scanned map (hint: zoom to the extent of the latitude and longitude as shown on the scanned map, or estimated from a map of same area that has lat - long)
|zoomed to same area in GIS:
- add data, and navigate to the folder containing the scanned map image (this example = /datasets/rock/large )
- you will be prompted to build pyramids, hit OK
- you will be warned that one or more layers lack spatial data, hit OK
- select the new scanned image layer by right clicking on it in the layers list
- under the georeferencing menu select fit to display which will load the scanned map behind the other GIS layers
- on the right of the georeferencing menu bar select georegistration tool, a green and red X connected by a line
- once the georegistration tool has been selected, it is expecting two clicks of the mouse. the first click should be when the cursor is placed over a known point on the SCANNED MAP image, the second click should be made when the mouse has been re-positioned over the EXACT corresponding point on the GIS layers. Always look for extremely unambiguous features, such as sudden bends or branchings of rivers, intersections of roads, or exactly corresponding points. Notice the larger curve of the river on the scan (edged with bright purple) that corresponds to the smaller curve in the GIS coverage (also edged in bright purple). Since we are sure that these must be the same river, we choose an unambiguous point, the connection of the tributary to the main river...we click on the map scan (which places a GREEN X on the spot), then we move the mouse to the corresponding place on the GIS layer (see RED X) and click there:
- the scanned map image will automatically be repositioned to line up over the selected point in GIS:
- now zoom in a little and investigate the features on the map and GIS. Look for a second point that is not too close to the first point (or the map will begin to distort around one area). By checking the attributes of the points in GIS, we find "Adunzi" (present-day Deqin). Then we locate the same point on Rock's map and register it:
- by this stage the scanned image map will begin to roughly line up with the GIS layers. carefully add one more point, for the town of "Changputong" at the lower left of the scanned map. the historical map will now be more or less georegistered:
- in order to make the georegistration permanently associated with the scanned image, select rectify from the georeferencing menu. You may enter in a name for the new georeferenced output raster image in the dialog box:
- you can now zoom in and pan around the layers comparing the historical map features to the GIS layers. Although it is tempting to add more points to the georegistration process, you will find that owing to the varying accuracy of historical maps, that addition of the wrong choice for a registration point will cause wild distortions and you will have to start over. Sometimes it is best to get them more or less right, then use visual comparison, rather than georegistration for your research. Note the rich information we can derive from Rock's survey of the area, even though the ground truth was not precise:
- if you make a mistake and want to start over, right-click on the raster image in the layers list then click on REMOVE. go back to Step 4 and begin again