Locators in a geodatabase stored in DB2
Locators in a geodatabase stored in DB2
|
Release 9.3 |
|
Note:This topic was updated for 9.3.1.
Locators are datasets that contain a snapshot of the reference data you would use for geocoding. It contains information on how an address is standardized, the searching methods used for address matches, and the type of information that is returned when there is a match. For more information on how locators are created and used, see the topics in the "Building an address locator" book in this help system. You can begin with Defining the address locator components.
Locators in ArcCatalog
When you connect to your geodatabase in ArcCatalog, if you have created an address locator in your geodatabase, it would appear in the Catalog tree as shown below:
Locators in a DB2 DBMS
When a new locator is created, a corresponding locator dataset table is created in the geodatabase. The locator dataset table contains a snapshot of the locator’s reference data, which includes all the attribute and shape information needed for geocoding, stored in a format optimized for quick information search and retrieval.
After a new locator is created, it does not use the original reference data; it refers to the locator dataset table.
Locator dataset table names are the same as locator names but suffixed with _lox. If the locator name contains spaces, the spaces will be replaced with an underscore in the locator dataset table name.
The locator dataset table is used as a way to persist a collection of binary data blocks (similar to files) in a database.
NOTE: You should not modify the contents of the locator dataset table.
<locator_name>_loxWhen you create a locator, ArcSDE reads geocoding specific attributes from the reference feature classes, organizes the data in an efficient proprietary binary structure, and stores a snapshot of the reference data in the locator dataset table. Thus, after the locator is created, it does not use the original reference data but only refers to the locator dataset table. As specified by the EmbedGeocodingRules locator property, the locator may also store a copy of its geocoding rule files in its geocoding index table.
The locator dataset table is used as a way to persist a collection of binary data blocks (similar to files) in a database. You should not modify the contents of the locator dataset table.
Field name |
Field type |
Description |
FILEID |
INTEGER |
ID of the internal geocoding index data block |
SEGID |
INTEGER |
ID of a subsection (segment) of the internal geocoding index data block |
DATA |
BLOB |
Binary data of the subsection (segment) of the internal geocoding index data block |
The following link will open a diagram showing the tables in the DBMS involved in a locator. In this example, the CITY_STREETS_LOX table is the locator dataset for the StreetRanges locator. The dashed lines indicate implicit relationships between tables.
DB2 locator diagram
- Business table
STREETS is the name of the business table of the feature class on which the locator is based. The business table is only used when the locator is created or rebuilt. While searching for addresses, the locator uses only data from the locator dataset table. If you make changes to the business table and want these changes to be reflected by the locator, you must rebuild the locator by using either ArcCatalog or the sdelocator command with the refresh operation. Please refer to the sdelocator command in the Administration Command Reference included with your ArcSDE installation.
- Locators table
When you add a locator to an ArcSDE database, ArcSDE adds a row to the Locators table. Each row in the Locators table defines a locator or locator style.
To manage the set of locators and locator styles stored in this table, please refer to the sdelocator command in the Administration Command Reference included with your ArcSDE installation.
- Metadata table
When you add a locator to an ArcSDE database, ArcSDE adds a row to the Metadata table for each property of the locator. Each row in the Metadata table defines a single property for a locator. The object_name column is a foreign key to the name column in the Locators table that ArcSDE uses to associate a locator with its properties.
- GCDRULES table
The GCDRULES table stores the geocoding rules that are used by address locators to match addresses. Each record in the GCDRULES table corresponds to a geocoding rule file. For descriptions of each of the geocoding rule files and their contents, see the Geocoding Rule Base Developer Guide, which is installed with ArcGIS Desktop and can be downloaded from the ESRI support site.
Altering the rule base is the most advanced style of geocoding modification and is most often done when you are trying to geocode international addresses. In order to alter the geocoding rules, export the rule using the sdegcdrules command.
sdegcdrules –o export –f <rule_file> [–N] [–d <directory_name>] [–i <service>] [–s <server_name>]
[–D <database>] [–u <DB_User_name>] [–p <DB_User_password>] [–q]
Make a backup copy of the exported rule file in case you need to revert to the old rules. Next, open the exported rule in a standard text editor, alter the rule, save your changes, then import the rule back to the GCDRULES table using the sdegcdrules command.
sdegcdrules –o import –f <rule_file> [–N] [–i <service>]
[–s <server_name>] [–D <database>] [–p <DBA_password>] [–q]
For a complete explanation of how to use the sdegcdrules command, please consult the Administration Command Reference included with your ArcSDE installation.
Another example of the tables that make up a locator can be viewed when you click the following link.
Example locator diagram
In this example, a geodatabase contains a STREET feature class that represents street centerlines for a particular geographic area such as a city. In addition to the geometry for the street centerlines, the STREET feature class contains attributes for the address ranges that can be found along the street and the components of the street name. The table schema required to store a locator to allow address geocoding on this feature class is shown below.
Locators in an XML document
At present, locators are not supported in XML documents. Therefore, if you have locators in your geodatabase, export your geodatabase to an XML workspace document, then import the XML workspace document to another database; you will have to re-create the locators.