working with CHGIS data in ARCGIS
How to open GIS files
How to search GIS files
How to export attributes to tables
How to join tables to existing GIS layers
How to create thematic maps based on attributes
How to georegister historical maps in GIS
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:
- 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.
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.
|How to Create Thematic Maps Base on Attributes
in the PROPERTIES dialog box, click on the SYMBOLOGY tab, then on QUANTITIES.