Locators in a geodatabase stored in PostgreSQL
Locators in a geodatabase stored in PostgreSQL
|
Release 9.3 |
![E-mail This Topic](../ahcommon/email_text.gif) ![Printable Version](../ahcommon/printable.gif) ![Give Us feedback](../ahcommon/feedback_text.gif) |
Locators are datasets that contain a snapshot of the reference data used for geocoding. Locators contain 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 "Building an address locator" in this help system. You can begin with the 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 appears in the Catalog tree as shown below:
Locators in a PostgreSQL DBMS
When a 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 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 are suffixed with _lox. If the locator name contains spaces, the spaces are 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 |
Identifier of the internal geocoding index data block |
segid |
integer |
Identifier of a subsection (segment) of the internal geocoding index data block |
data |
bytea |
Binary data of the subsection (segment) of the internal geocoding index data block |
The following link opens a diagram showing the tables in the database management system (DBMS) involved in a locator. In this example, the street_ranges_lox table is the locator dataset for the streetranges locator. The dashed lines indicate implicit relationships between tables.
PostgreSQL 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 component installation.
- sde_locators table
When you add a locator to an ArcSDE database, ArcSDE adds a row to the sde_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 component installation.
- sde_metadata table
When you add a locator to an ArcSDE database, ArcSDE adds a row to the sde_metadata table for each property of the locator. Each row in the sde_metadata table defines a single property for a locator. The value in the object_name column corresponds to the value in the name column in the sde_locators table. ArcSDE uses this 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 component 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 workspace 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.