Substituting Values When Converting Shapefiles to Quick Shape FilesOften shapefiles will have associated fields with values that would be easier to interpret if replaced with longer textual values. For example, the Alaska DNR shapefile "AKStatus.SHP" with attributes for land ownership has a field "LSOWN" which might be one of many values between 1000 and 5100. When we run SHP2QSF, we can place a simple text file "AKStatus.SUB" in the same path as the shapefile (SHP), index file (SHX) and database file (DBF). For each field that we want to replace we can define a replacement section that looks like this:
Occurrences of "1130" in the LSOWN field will be automatically replaced with "Chugach National Forest". Any occurence of "41" followed by any two characters will be replaced with "State and Native Owned". You may add additional sections, beginning with [...], within the substitute file.
|