Focus on Geodatabases in ArcGIS Pro. David W. Allen

Чтение книги онлайн.

Читать онлайн книгу Focus on Geodatabases in ArcGIS Pro - David W. Allen страница 5

Focus on Geodatabases in ArcGIS Pro - David W. Allen Focus On

Скачать книгу

to put address labels on the map.

      The last bit of data that the city planner mentioned was the land-use code. The land-use code is split into two sets of codes. The primary land-use code is one of seven main codes, and each primary code has many secondary codes that are more descriptive of the land use. The use of two codes helps in making both a generalized land-use map and a detailed land-use map.

      11.On the Tables worksheet, add the field Primary_Use, with the field type Text and the alias Primary Land Use Code, and the field Secondary_Code, with the field type Text and the alias Secondary Land Use Code.

      The data entered so far has involved information that the city planner wanted. One more piece of data is necessary for you to maintain a connection to certain third-party data that is important to the project. The identity of the property owner is not stored in the parcel’s attribute table but is stored in an external table. You will need to add a field to your data structure that will allow you to set up a relationship between the field and the external table. The procedure is discussed later in the tutorial, but for now, you will need to add a field to accommodate the relationship.

      12.On the Tables worksheet, add the field Georeference, with the field type Text and the alias Georeference Index.

      Design for data integrity

      The design looks good so far, but imagine what will happen when people start putting data in the table. If they left the Sub_Name field blank, there would be no way to identify the legal record of a piece of property. What about address number or the land-use code? These fields shouldn’t be left blank, or there could be gaps in the data. On the other hand, not every street will have a value for prefix type, so there will be instances when a field value can be left blank and still be correct. You can set up parameters in the geodatabase to control these data integrity rules.

      One way to build data integrity rules into your table is to set the flag for allowing null values, or no value, for a field. If nulls are not allowed, a validation check of the data will produce an error for any records entered without all the necessary values being provided. Perhaps, as an example, the person entering the data accidentally skipped the field during data entry or tried to enter data before all the information was known. Either way, it could cause problems with your data if nulls are not allowed.

      The solution is to mark in the design table which fields are allowed to have nulls and which must have a value entered.

      1.On the Tables worksheet, mark the following fields to allow null values by placing a Y in the Nulls column:

      •Pre_Type

      •Pre_Dir

      •Suffix_Dir

      2.Mark the remaining fields as not allowing null values by placing an N in the Nulls column:

      •Sub_Name

      •Blk

      •Lot_No

      •House_Num

      •Street_Name

      •Street_Type

      •ZIP_Code

      •Primary_Use

      •Secondary_Code

      •Georeference

      Another data integrity component is the domain. A domain allows you to define a list of values for any text field or a range of values for a numeric field. When data is entered, it is matched against the domain to see if it is a valid value. This designation helps eliminate typos or inventive abbreviations. Imagine 10 data entry clerks all coming up with unique abbreviations for the land-use code Vacant. It might be entered as VAC, V, Vcnt, or any number of misspellings. A query to find all vacant property would be difficult. If a domain is applied to the field Primary_Use that contains only the seven correct category abbreviations, it would be impossible for anyone to enter a value that wasn’t in the domain.

      In addition to the defined primary-use codes, there are secondary-use codes associated with each primary-use code. For instance, the primary code Commercial has a set of secondary codes named Light Commercial, Special District, Church, and School. Using a contingent value domain, you can restrict the field selections for a second field on the basis of the first field’s value. The Secondary Land Use Code field will get a domain with all the available land-use descriptions in it, but later you will build a matrix that will pair the Primary Land Use Code with only those values in the domain that are relevant to the selected code. This pairing will prevent the user from selecting a secondary-use code that does not match the category of the primary-use code.

      The domain values will be entered on the Domains worksheet, and you will note in the worksheet that it is a domain to avoid confusion with subtype fields that may be entered later.

      3.On the Tables worksheet, add an entry on the line for Primary_Use with the name of a domain that will contain the acceptable values for this field. Call it Prim_Use_Codes, and place a (D1) in front of it for “domain number 1.”

      4.On the line for Secondary_Code, add the notation (D2) and the name Sec_Use_Code.

      5.Now turn to the Domains worksheet (page 3), and write the domain name Prim_Use_Codes, with a description of Primary Use Codes for Parcels, a field type of Text, and the type of domain as Coded Values.

      6.In the Code column, write VAC, with a description in the Value column of Vacant Property. Under that, write RES, with a description of Residential Property. Continue down the form, entering the rest of the Prim_Use_Codes values from the accompanying list. Print more worksheets if necessary.

      COM Commercial Property

      IND Industrial Property

      GOV Government Property

      PRK Park Land

      OTHER Other Uses

      Adding this domain will build a validation check for data integrity. You can rest assured that the primary-use code abbreviation entered for any piece of property will fit your normal list. But one concern might be that someone could set the primary-use code to Commercial, and then set the secondary-use code to 35th3. These values don’t match, so a domain for the secondary codes should be designed to include all the detailed codes. In the form, a note can be added to show which primary land-use code each value will pair with, and later you will see how these codes are paired to further constrain the values entered.

      7.On the Domains worksheet, add a new domain name (D2) of Sec_Use_Code. Give it a description of Secondary Land Use Codes, with a field type of Text and a domain type of Coded Values. The codes that will go in this domain are as shown in the figure. Print more copies of the worksheet as needed.

      Perhaps there are other fields in the table that would benefit from the application of a domain. Most of them, however, such as

Скачать книгу