Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
25 views15 pages

File Geodatabase

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 15

FILE GEODATABASES

ArcGIS can directly use or import most GIS file formats in common use for
geoprocessing and display. The recommended file format for use in ArcGIS is the file
geodatabase that stores map layers, data tables, and other GIS file types in a system folder
that has suffix extension .gdb in its name. In this chapter you will learn about working
with file geodatabases.

Main learning objectives are following :


 Build a file geodatabase  Join tables
 Use ArcCatalog Utilities  Create centroid coordinates in a table
 Modify an attribute table  Aggregate data

TUTORIAL 4.1

BUILD A FILE GEODATABASE

4.1.1 Open ArcCatalog


4.1.2 Create an empty file geodatabase
4.1.3 Import shapefiles
4.1.4 Import a data table
A file geodatabase is quite simple and flexible, being merely a collection of file s in a
file folder. Nevertheless, you need a special utility program to build and maintain a file
geodatabase. That program is ArcCatalog which you will use next. Some of the
functionality of ArcCatalog window allows you to do some utility work while in ArcMap
in its catalog window. The catalog window allows you to do some utility work while in
ArcMap without opening the separate application program ArcCatalog.

4.1.1 Open ArcCatalog

1. On the Windows taskbar, click Start,All Programs,ArcGIS,ArcCatalog 10.2.2


2. Click the Connect to Folder button , expand the folder and file tree for
D:\CE210\Tutorial 4, to select it, and click OK.

4.1.2 Create an empty file geodatabase

1. In the Catalog Tree panel, expand D:\CE210\Tutorial 4, create a new file named New File
Geodatabse in the right panel of the window.
2. Right-Click on D:\CE210\Tutorial 4 in the left panel then New and then New File
Geodatabse. Click New File Geodatabase. It will create a new geodatabase file having
extension .gbd.
3. Change the name from New File Geodatabase.gdb to Bangladesh District.gdb.

4.1.3 Import shapefiles

1. In the Catalog’s right panel, right-click the Bangladesh District.gdb, click Import, Feature
Class (multiple).
2. In the Feature Class to Geodatabase (multiple) dialog box, click the browse button to the
right of the Input Feature Fields, browse to D:\CE210\Tutorial 4 click to open that folder,
hold the shift-key down, and select both district.shp and major river.shp. Click add and click
OK.
4.1.4 Import a data table

1. Right-click the Bangladesh District.gdb, click Import, Table (single).


2. In the Table to Table dialog box in the same manner add dist-bd.dbf. Location is
D:\CE210\ Tutorial 4
3. Type Districtdat in the Output Table Field.
4. Click Ok.
TUTORIAL 4.2

USE ARCCATALOG UTILITIES

4.2.1 Preview layers


4.2.2 Rename feature layers
4.2.3 Copy and delete feature layers
4.2.4 Compress a file geodatabase
Now you’ve created a file geodatabase you can start using ArcCatalog’s utilities. First
are the preview utilities, which give you a good overview of a feature layer or table.
4.2.1 Preview layers

1. Click Bangladesh District.gdb to expose its contents in the right panel.


2. In the right panel, click district and click Preview tab.

3. At the bottom of the Preview tab, select Table as Preview.


4. Click Description tab.
5. Click the Content tab.

4.2.2 Rename feature layers

1. In the left panel under Bangladesh District.gdb, right click on District and Rename
Districts_BD.
2. Repeat Step 1 and Rename major river as Major_River_BD.
4.2.3 Copy and delete feature layers

1. In the left panel under Bangldesh District.gdb, right-click District_BD and click Copy. Right
click Bangldesh District.gdb and click Paste and OK.
2. Right-click District_BD_1 and click Delete and OK.

4.2.4 Compress a file geodatabase

1. In the left panel right-click on the Bangldesh District.gdb click on Administration and then
Compress File Geodatase and click OK.
2. In the My Computer window check the size of the Bangldesh District.gdb folder.
3. In the left panel right click on the Bangldesh District.gdb and click on the Uncompress File
Geodatase and click OK.
4. Close ArcCatalog.
TUTORIAL 4.3

MODIFY AN ATTRIBUTE TABLE

4.3.1 Delete unneeded columns


4.3.2 Calculate a new column
4.3.3 Modify a primary key
Most of gets processed or displayed in a GIS depends on attribute table values. There are
many tasks therefore, that you need to know how to perform on these tables, including
modifying columns and values.

4.3.1 Delete unneeded columns

1. Open ArcMap.
2. Add District_BD.shp from the location D:\CE210\Tutorial 4\Bangladesh District.gdb.
3. In the TOC, right-click on the District_BD shape file and click on the Attribute table.
4. In the table, right-click the column heading Total_POP column, click Delete Field and click
Yes.
5. Close District_BD attribute Table.
4.3.2 Calculate a new column

1. In the District_BD Data table, click drop-down arrow of the Table Option button
and click Add Field.
2. In the Add Field window, type Total_POP in the Name field, change the Type to Long
Integer and click OK.
3. Right-click on the Total_POP column heading and click Field Calculator.
4. In the Field Calculator window, double-click on the POP81 in the Fields panel, click the +
button, double click on the POP91 in the Fields panel, then click OK.

5. In the same manner calculate Population density (per sqkm area) of 1981. [Note: choose
‘double’ as the field type.]
4.3.3 Modify a primary key
It is often necessary to join two tables to make a single table. For tables to join, they must
share unique identifiers or keys.
For example, there are administrative records available for Gazipur and Narsingdi
district in the gazi-narsingdi shape file. But you need to make a shape file basing on
arsenic concentration of these district. The GEOCODE for arsenic data table and the
GEOID column of the gazi-narsingdi are the corresponding unique identifiers for these
tables. These attributes would match, except that GEOID has the extra characters “12”
at the beginning of each value. Next, you will use a string function, Mid( [GEOID],3,5),
that extracts a 5-character string from GEOID starting from position 3 and creates a new
column in Attributes of gazi-narsingdi data table to match GEOCODE of Attributes
of arsenic table.

1. Right click arsenic in the TOC and click Open. (Note that GEOCODE in the table has values
such as 33386)
2. Close the arsenic table, right-click on the gazi-narsingdi in TOC, and click Open Attribute
Table.
3. In the gazi-narsingdi table, click drop-down arrow of the Table Option button and
click Add Field.
4. In the Add Field dialog box, type GEOCODE in the Name field, change the type to Text and
Length to 5 and click OK.
5. Scroll to the right to the gazi-narsingdi table right click the GEOCODE column heading, and
click Field Calculator.
6. In the Field Calculator dialog box, change the Type from Number to String; double-click
the mid() function; and in the GEOCODE=box, edit the mid() function to the Mid(
[GEOID],3,5) and click OK.
TUTORIAL 4.4

JOIN TABLES

Often you will need to display data on your map that is not directly stored with a map
layer. For example, you might obtain data from other departments in your organization,
purchase commercially available data, or download data from the Internet. If this data is
stored in a table such as an Excel or comma-separated-value table and has geocode
matching your gazi-narsingdi layer, you can import it into a file geodatabase and join it
to your geographic features for display on your map. Next, you will join the arsenic table
to the polygon gazi-narsingdi feature class. The same steps work if your map layer is a
shapefile or map layer in another format supported by ArcMap.

1. In the ArcMap TOC, right-click the gazi-narsingdi layer, click Joins and Relates, then click
Join.

2. Make the selections shown in the figure.


3. Click Ok, Yes
4. Right click the gazi-narsingdi layer in the TOC, click Open, Attribute Table, scroll to the
right in the table, and verify the ArcMap join the arsenic table to the Attributes of the gazi-
narsingdi table.
5. Leave the gazi-narsingdi table open.
TUTORIAL 4.5

CREATE CENTROID COORDINATES IN A TABLE

4.5.1 Add X,Y coordinates to a polygon attribute table


4.5.2 Export a table
4.5.3 Create feature class from an XY table
4.5.4 Symbolize a choloropleth and centroid map
Together, polygon and their centroids give you the ability to display two attributes of the same
map layer, one as a choropleth map and other as a size-graduated point marker map. ArcMap
has an algorithm that calculates and adds centroid coordinates to your attribute table, thereby
allowing you to create a new point layer.

4.5.1 Add X,Y coordinates to a polygon attribute table

1. In the gazi-narsingdi table, click the drop-down arrow of the Table Option button and click
Add Field.
2. Type X as the Name, type Double as the Type, and click OK.
3. Repeat step 3 and 4 except the new field Y.

4. Scroll to the right in the attribute table; right click the X column heading; click Calculate
Geometry, Click Yes.
5. Select “X Coordinate of centroid” from the property dialogue box. Click OK twice.
6. Repeat step 4 except select “Y Coordinate of Centroid” from the property dialogue box.
4.5.2 Export a table
When you export joined table as a table, you get all the attributes of the joined tables
stored as one table permanently. Then there are several possible uses for the resultant
table, one of which is to use it to make a new point layer based on the centroid
coordinates.

1. In the Attribute table, click the drop-down arrow of the Table Option button and click
Export.
2. In the Output table field of the Export Data window, click browse button; browse to D:\CE-
210\Tutorial 4; rename the file Export_Output change the name into gazi-
narsingdi_Centroid, change the save as type as “dBASE Table”and click Save, Ok and yes.
3. Close the attribute table.

4.5.3 Create feature class from an XY table

1. In Catalog Window expand D:\CE-210\Tutorial 4.


2. Right-click gazi-narsingdi_Centroid, click Create Feature Class, and click from XY table.

3. In the Create Feature Class from XY Table window, click the Coordinate System of Input
Coordinates button, click Import, click gazi-narsingdi in Tutorial 4 folder and click ok.
4. Click the Browse button for Output, change the Save As type to shape file , browse to
D:\CE-210\Tutorial 4 change the name to XYgazi-narsingdi_Centroids, click Save, and
click OK.

5. Click the Add Data button browse to D:\CE-210\ Tutorial 4, and click XYgazi-
narsingdi_Centroids.
6. Zoom anywhere in the map. Now you can get a better look at the centroids point layer you
just created.
4.5.4 Symbolize a choropleth and centroid map
Here you will symbolize a map using both gazi-narsingdi polygon and Centroids. Let’s
see how depth of the water level compares with the percentage of Arsenic concentration
per sqkm area.

1. Right-click the gazi-narsingdi layer in the TOC and Properties, and click the Symbology tab.
2. In the Show panel, click Quantities and Graduated Colors, under Fields, select AS_PPM for
the Value field, change the Normalization to AREA_SQKM, click Classify, change Method
to Quantites, and click OK.
3. In the Symbology tab, click the Label column heading to the right of the Symbol and Range
Headings, click Format Labels, You can change the format of labelling from here.

4. Right-Click XYgazi-narsingdi_Centroids in the TOC, click Properties, and click the


Symbology tab.
5. In the Show panel, click Quantities and Graduated Symbols. Under Fields, change Value to
DEPTH_M.
6. Change and Symbolize Size range to 12 to 20.
7. Click the Template button, choose Circle 2, and click Ok.
8. In the Classification panel, change the number of classes to 4, click Classify, change Method
to Quantile, and click Ok twice.
Now you can compare the arsenic concentration with water depth of the corresponding area.

You might also like