Geocoder is a sample CASS-certified program that performs batch processing on fixed-length text files; standardizing and geocoding addresses during processing. You can modify geocoder to create your own application. The sample code is located in the samples (UNIX) or Ms_c (Windows) directory.
Using geocoder
Geocoder is located in the platform-specific directory where you installed GeoStan. You need to modify Gcode.fmt to match your file system structure prior to running geocoder. Sample format files and input files are located in the Test_fls directory (Windows) and Common/Test_fls directory (UNIX).
To execute geocoder, type the following at the command line:
geocoder formatFile inputFile outputFile [logFile]
formatFile Contains format initialization data used in processing the input file; similar to a Windows .fmt file. You can specify a dash (-) or stdin in place of the format file. There is no blank line required at the end of the file.
inputFile Path and name of the input addresses to process. The file must be a fixed length ASCII text file. You can specify a dash (-) or stdin in place of the format file.
outputFile Path and name of a new text file to hold the processed records. The output file normally has the same format as the input file, with the possible addition of fields at the end of each record. You can specify a dash (-), stdout, or stderr in place of the format file.
logfile(Optional). Name of the log file where geocoder writes all messages to the specified log file instead of stdout. If specified, this must be the fourth parameter on the command line. geocoder disables the progress messages unless there is an override in the format file. You can specify a dash (-), stdout, or stderr in place of the log file.
The following are optional parameters you can enter at the command line for different processing of your input and output.
/l Limit on the number of input records to process. geocoder exits after reading the specified number of records.
/z Date of the GeoStan data last used to process the file, in the format MMyyyy. Geocoder looks at the last date on which it processed a particular list, and compares each address to a Z4Change file to see if it has changed.
/r <Report File name> To specify a report file name, enter r/ <Report File name>, where the desired file name replaces what is between the <> in the command line. The /r command line option overrides the "reportFile" keyword in the format file.
The following are processing examples.
Scenario |
Command |
---|---|
Z4 Change processing enabled |
geocoder formatFile inputFile outputFile /z mmyyyy |
Z4 change processing and the log file enabled |
geocoder formatFile inputFile outputFile logFile /z mmyyyy |
Input file read from stdin, output file written to stdout, logfile enabled, and Z4 change processing enabled |
geocoder formatFile - - logfile /z 062006 |
Specify a processing limit of 100 records for test purposes |
geocoder formatFile - - /l 100 |
Naming the report file. |
geocoder formatFile - - /r <Report File name> |
Using keywords in the format file
The following sections provide information on using control, input, and output keywords in the format file.
- Keywords are not case sensitive.
- Values are case sensitive on UNIX when specifying a path or filename
- Lines that begin with open brackets ( [ ) or semicolons ( ; ) are comment lines
- The application ignores blank lines.
- Do not put quotation marks around strings.
Control keywords
Control keywords use the syntax: keyword = value. The following table contains the control keywords you can use in the format file.
Keyword |
Description |
---|---|
addressrange |
Permits searching ranges of street addresses. •0 = Disabled (standard default). •1 = Enabled. Note: Invalid for CASS and Exact match modes. |
addrPntInterp |
Enable Address Point Interpolation. •0 = Disabled (standard default). •1 = Enabled. |
alternateLookupPref |
•1 = Prefer street lookup first (custom default). •2 = Prefer firm lookup first. •3 = Street only lookup (standard default). Note: Invalid for CASS match mode. |
alwaysFindCandidates |
•0 – Default. Do not search for more than one candidate. •1 – enables continued search for candidates GS_ALWAYS_FIND_CANDIDATES or see GS_FIND_CENTERLN_PROJ_OF_POINT. |
approxPBKey |
In the event that a matched address does not have an associated PreciselyID unique identifier, approxPreciselyID is used to return the PreciselyID unique identifier of the nearest address with an associated PreciselyID unique identifier. •0 - Default. Disable. •1 - Enable return of the PreciselyID unique identifier of the nearest address with an associated PreciselyID unique identifier. Note: Only supported in forward and reverse
geocoding. For more information, see PreciselyID
Fallback.
|
audit |
•0 – Default. No records copied to an audit file during processing. •1 to 100000 – Writes every nth record to an audit output file indicated by audFile. See Audit Report for more information. Note: This is an
optional keyword that may also require a filename definition as
an additional optional keyword.
|
audFile |
Fully qualified path and filename for audit record redirection, which is required if not set to 0. A keyword is required if set to 1. Note: On z/OS you do not need to
include a filename; code only the letter x.
|
CASSFile |
Fully qualified path and filename for CASS Report. (Required if matchMode is set to 4.) Note: On z/OS you do not need to
include a filename; code only the letter x.
|
CASSTemplateFile |
Fully qualified filename of the CASS 3553 form used to generate the report. Required in CASS mode. Note: On z/OS you
do not need to include a filename; code only the letter
x.
|
centerlineOffset |
Centerline Offset Distance in feet. |
correctLastline |
Corrects the output lastline if the input address does not match. Provides a valid ZIP Code if possible and/or returns a close match to the input city name. •0 = Disabled (default) •1 = Enabled |
DPVdirectory |
Directory containing DPV data. Note: On z/OS you do not need to include a filename; code only the letter x. |
DPVFind |
Enable DPV Find. •0 = Disabled •1 = Enabled (standard default). |
DPVsecurityKey |
DPV security key. |
enableZipPbKeys |
Specifies whether to enable the return of PreciselyIDs for MLD addresses with ZIP centroid locations. •0 = Default. Disabled •1 = Enable return of PreciselyIDs. To enable returning PreciselyIDs for ZIP centroid locations in MLD, the useCentroids control keyword should be the default value of "1 - Use if no address geocode is available." If useCentroids is any other value, an "E" location code is returned and the results data will not include a geocode or PreciselyID. |
enhancedBuildingSearch |
•0 – Default. Disables enhanced building name searches. •1 – Enables enhanced building name searches. Note: Not available with User Dictionaries. Not valid in CASS match mode. |
extendedMatchCode |
Specifies whether to return the Extended Match Code (4th hex digit). •0 = Default. Disabled •1 = Extends match code to indicate house, unit number and unit type matching. |
firstLetterExpanded |
Expands address search abilities to account for a missing or wrong first letter in the street name. •0 = Disabled (standard default). •1 = Enabled. Note: This setting is ignored in Exact match mode. |
inReclen |
Required. Record length of input file. Minimum line length to read if inRecType is 1. |
inRecType |
•0 – Records are not delimited. (Must be 0 on z/OS.) •1 – Default. Records are terminated with cr/lf (DOS/Windows) or lf (UNIX). |
keepMultiMatch |
If the input address multi-matches (GS_ADDRESS_NOT_RESOLVED), return all candidate matches, each on a separate output line. This will increase the output length of the output file. •0 = Disabled (default). •n = Enabled and returns a maximum of n candidates. •resolveMultiMatch and keepMultiMatch are mutually exclusive |
keepNoMatch |
•0 – Do not output records that do not match. •1 – Default. Output all records. |
LACSdirectory |
Fully qualified path for LACSLink data. Note: On z/OS you do not need to include a filename; code only the letter x. |
lacsFind |
Enable LACSLink Find. •0 = Disabled. •1 = Enabled (standard default). |
LACSsecuritykey |
LACSLink security key. |
licensePath |
Required. Path to your GeoStan license file (geostan.lic). |
MailerAddress |
Address of your organization. Required for DPV and LACSLink initialization. |
MailerCity |
City where your organization resides. Required for DPV and LACSLink initialization. |
MailerName |
Name of your organization. Required for DPV and LACSLink initialization. |
MailerState |
2-character state abbreviation where your organization resides. Required for DPV and LACSLink initialization. |
MailerZip |
9-digit ZIP Code where your organization resides. Required for DPV and LACSLink initialization. |
matchMode |
•0 – Exact (GS_MODE_EXACT). •1 – Close (GS_MODE_CLOSE). •2 – Default. Relaxed (GS_MODE_RELAX). •4 – CASS (GS_MODE_CASS). •7 - Custom (GS_MODE_CUSTOM). •8 - Interactive (GS_MODE_INTERACTIVE). Note: Only supported in forward geocoding. This setting is ignored in reverse geocoding. |
mixedCase |
•0 – Default. Return results in upper case. (USPS preferred.) •1 – Return results in mixed case. |
multiLine |
•0 – Default. Address is not multi-line. •1 – Address is multi-line. Set your preferred address line using multiPref. Note: This is an optional keyword that may also require a filename definition as an additional optional keyword |
multiPref |
•0 – Default. If 2-line address, select first line. If multi-line address, select bottom-most line. •1 – If 2-line or multi-line address, prefer P.O. Box. Ignored if processing in CASS mode. •2 – If 2-line or multi-line address, prefer street address. Ignored if processing in CASS mode. |
mustMatchAddrNumber |
Custom matching option to ensure house number is matched exactly. •0 = Disabled. •1 = Enabled (default). Note: Not valid for singleline address matching. |
mustMatchMainAddr |
Custom matching option to ensure street name, predir, postdir, and type match exactly. •0 = Disabled (default). •1 = Enabled. Note: Not valid for singleline address matching. |
mustMatchCity |
Custom matching option to ensure city matches exactly. •0 = Disabled (default). •1 = Enabled. Note: Not valid for singleline address matching. |
mustMatchState |
Custom matching option to ensure state matches exactly. •0 = Disabled (default). •1 = Enabled. Note: Not valid for singleline address matching. |
mustMatchZipCode |
Custom matching option to ensure ZIP Code matches exactly. •0 = Disabled (default). •1 = Enabled. Note: Not valid for singleline address matching. |
nonStand |
Redirects non-standardized records to a non-standard output file, putting only standardized records in the original output files as specified on the command line. May be non-existent, 0 (Off) (default) or 1 (On). Note: See Audit Report for more information. |
nStdFile |
Fully qualified path and filename for non-standardized record output. (Required if nonStand is greater than 0.) Note: On z/OS you do not need to include a filename; code only the letter x. |
offsetDist |
Deprecated. The number of feet GeoStan will squeeze streets when interpolating the geocode for a house number. In addition, the number of feet used to set the geocode off the street. Use squeezeDist and setbackDist keywords instead. |
outRDIRetCode |
USPS Residential Delivery Indicator (requires DPV-confirmed ZIP+4) •Y - Address is a residence •N - Address is a business Blank - Address was not presented to RDI or RDI data not loaded |
outReclen |
Required. Record length of output file. |
outRecType |
•0 – Records are not delimited. (Must be 0 on z/OS) •1 – Default. Records are terminated with cr/lf (DOS/Windows) or lf (UNIX). |
password |
Required. GeoStan password to enable operation. Note: On z/OS you do not need to include a filename; code only the letter x. |
path |
Required. Search path for GeoStan data files; delimited with semicolons. For example c:/;d:/geocode. Note: On z/OS you do not need to include a filename; code only the letter x. |
prefZipOverCity |
Prefer ZIP over city when address is the same. •0 – Disables (default). •1 – Enabled. Note: Ignored for CASS and Interactive match modes. Interactive match mode returns the best address regardless of this setting. |
printCandidates |
Return all candidate matches, each on a separate line. This will increase the length of the output file. •0 – Disables (default). •1 – Enabled and returns a maximum of n candidates Note: printCandidates and keepMultiMatch are mutually exclusive. |
RDIDirectory |
Directory containing Residential Delivery Indicator (RDI) data. |
removeRecordDelimiter |
•0 – Do not remove line feed characters. •1 – If inRecType is 0 (indicating records are not delimited), look for and remove line feed characters anyway |
reportFile |
Fully qualified path and file name for statistics report file. If this keyword is not present, geocoder writes the report file geocoder.rpt to the current working directory. Note: On z/OS you do not need to include a filename; code only the letter x. |
resolveMultiMatch |
If the input address multi-matches (GS_ADDRESS_NOT_RESOLVED), select the first candidate to resolve the match. •0 – Disables (default). •1 – Enabled. Note: resolveMultiMatch and keepMultiMatch are mutually exclusive. |
reverseGeoAddress |
Specifies how addresses and unranged streets are processed with reverse geocoding. •0 – Default. Does not match to an address. •1 – Matches to points and interpolated addresses, but does not match to any unranged segments. •2 – Matches to all types of street segments. |
reverseGeoClosestPt |
In a reverse geocoding operation, specifies whether the match is made to the closest feature or point address. Note: Implementation of this feature requires that at least one points data set and one streets data set are loaded; otherwise, the match will be made to the closest feature. •0 – Default. Matches to the closest feature including street segments and intersections in addition to address points. •1 – Matches to the closest point address within the search radius. |
reverseGeoIntersection |
Specifies how GeoStan handles reverse geocoding intersections close to the input geocode. •0 – Does not return intersections. •1 – Returns intersections. |
searchDist |
Used for reverse geocoding, Predictive Lastline and PreciselyID Fallback. It defines, in feet, the search area. |
setbackDist |
The number of feet GeoStan will set the geocode back off the street segment when interpolating a geocode from a house number on a segment. Incompatible with offsetDist. Sets the value for GS_FIND_STREET_OFFSET. |
showMessages |
•0 – Supresses messages from GsErrorGetEx (default). •1 – Prints messages from GsErrorGetEx. |
showProgress |
Specifies the frequency with which the application writes status messages indicating the number of processed records. •0 – No progress message. •10 – Default. Display messages every 10 records. Note: By default, the program sets this value to 0 if the command line specifies a log file or if the application is running under z/OS. |
stopAt |
The number of sequential records you want processed. stopAt=10000 will end after 10K input records have been processed. |
streetCentroid |
Specifies whether or not to return a street segment geocode as an automatic geocoding fallback. •0 – Default. Street locator disabled. •1 – Return street segment geocode. Note: Invalid for CASS match mode. |
squeezeDist |
The number of feet GeoStan squeezes street segments when interpolating geocodes from house numbers. Reverse Geocoding also uses this same value to reverse interpolate a house number from a geocode along the same segment. Incompatible with offsetDist. Sets the value for GS_FIND_CORNER_OFFSET. |
suiteLinkDirectory |
Directory containing SuiteLink data. |
suitelinkFind |
Enable SuiteLink Find. •0 = Disabled. •1 = Enabled (standard default). |
userDictionaryPref |
Obsolete, warning will be logged. |
uMatchOnly |
•0 – Default. Process all records whether previously matched or not. Used when processing in CASS mode. •1 – Process only records that the application has not previously processed successfully. Pass input directly to output without processing if outLat exists (not blank), outLon exists (not blank), outMatchCode exists (not error and not blank), outLocCode exists (not error and not blank), and matchMode does not equal 4. |
useCentroids |
•0 – Do not assign centroid geocodes. •1 – Default. Use if no address geocode is available. •2 – Use ZIP centroid geocoding only (no address matching). Note: Requires z9dir if a non-0 value. |
usePathOrder |
•0 – Uses the default database search order, determined by the GeoStan database priority ranking. Value 0 is the default and the behavior is therefore backwards compatible with previous versions of geocoder. •1 – Sets the search order according to how the directories in the path keyword are specified. See also GS_FIND_DB_ORDER. |
z4ChangeDate |
Date of the GeoStan data media used to process the address file, in the format mmddyy. For z/OS only. |
z9dir |
Optional. Full name and path of the Z9 file, for example d:/us.z9. See useCentroids above. |
Input and output keywords
All input and output fields have the following syntax:
keyword=start_pos,length
start_pos Offset for the first character of the field. The first position of the specified offset is one.
length Length of the field.
For example, inFirm=10,50 indicates the firm field starts at position 10 and is 50 characters wide.
geocoder does not have field validation. Before running large jobs, Precisely recommends testing the setup file on a small subset of records from the larger file.
If your input file does not contain the fields necessary to store the output data, you can add fields to the output record by specifying a larger outReclen size and adding the necessary output fields to the end of the record structure. For example, if your input record length is 200, you can set the output record length to 240 and have outAddress = 201, 40.
Input fields
The following table contains information on the input fields.
Field |
Description |
---|---|
inAddress |
Address line. When using this field, set multiLine to 0. |
inAddr2 |
Second address line. When using this field, set multiLine to 0. Use multiPref to specify a preference for P.O. Box or street address. Ignore if processing in CASS mode. |
inCity |
City name. |
inFirm |
Firm name. |
inLastline |
Combined city, state, and ZIP Code. |
inLat |
Latitude of the geocode for the desired address. |
inLine1 - inLine6 |
Multiline mode input fields. When using, set multiLine to 1. |
inLon |
Longitude of the geocode for the desired address. |
inPbkey |
12-character alpha-numeric PreciselyID unique identifier used to perform a Reverse PreciselyID Lookup. |
inState |
State name or abbreviation. |
inUrb |
Urbanization name. Only valid for Puerto Rico. |
inZip |
ZIP Code. |
inZip4 |
ZIP + 4. |
Output fields
The following table contains information on the output fields.
Field |
Length (with null terminator) |
Description |
---|---|---|
centerlineBearing |
3 |
Compass direction, in decimal degrees, from the point data match to the centerline match. Measured clockwise from 0 degrees north. |
centerlineDataType |
2 |
Data type used to make the centerline match
|
centerlineDist |
8 |
Distance between the input point and the centerline in feet |
centerlineIsAlias |
3 |
Matched centerline record located via an alias index. |
centerlineLat |
11 |
Latitude in millionths, for a centerline match |
centerlineLon |
11 |
Longitude in millionths, for a centerline match |
centerlineName |
40 |
Primary street name, for a centerline match |
centerlinePostDir |
2 |
Street postfix directional, for a centerline match |
centerlinePreDir |
2 |
Street prefix directional, for a centerline match |
centerlineSegDir |
2 |
|
centerlineSegID |
11 |
Unique segment ID from data vendors, specific to a centerline match |
centerlineType |
4 |
Street type (street suffix), for a centerline match |
outAddress |
60 |
Address line |
outAddressShort |
60 |
Address line less than 30 characters when possible. |
outAddr2 |
60 |
Second address line |
outAddrType |
2 |
Address Type regarding number of units:
Note: This field is only available with the MLD Extended Attributes
Dataset.
|
outAPNID |
51 |
Assessor's Parcel Number (APN) Note: This field is only available with the MLD Extended Attributes
Dataset.
|
outAuxUserData |
301 |
User data from the auxiliary file. Blank if no auxiliary file. |
outBlock |
15 |
15-digit census block ID |
outBlock2010 |
16 |
15-digit 2010 Census Block ID Note: This field is only available with the MLD Extended Attributes
Dataset.
|
outCandidateNum |
2 |
Returns the candidate number when keepMultiMatch or printCandidates is enabled. Value will be blank or 0-n to indicate candidate number in the possible match list. |
outCarrt |
4 |
Carrier route |
outCASSHeader |
2 |
|
outCBSADivName |
127 |
CBSA division name |
outCBSADivNumber |
5 |
CBSA division number |
outCBSAMetroFlag |
1 |
|
outCBSAName |
127 |
CBSA name |
outCBSANumber |
5 |
CBSA number |
outCSAName |
127 |
CSA name |
outCSANumber |
3 |
CSA number |
outChkDigit |
1 |
Check digit |
outCity |
28 |
City name |
outCityName |
28 |
City name for the matched address |
outCityPref |
28 |
Preferred city name for the matched address |
outCityShort |
28 |
Short City Name less than13 characters when possible. |
outCmsaNumber |
4 |
CMSA number |
outCmsaName |
127 |
CMSA name |
outCounty |
5 |
County FIPS code |
outCountyName |
127 |
County name |
outDatatype |
2 |
Data type used to make the match:
|
outDflt |
1 |
Matched to Highrise or Rural Route |
outDPBC |
2 |
Delivery point bar code |
outDPVConfirm |
1 |
DPV confirmation indicator |
outDPVVacant |
2 |
DPV Vacant Indicator. |
outDPVCMRA |
1 |
DPV CMRA indicator |
outDPVFalsePositive |
1 |
DPV false-positive indicator |
outDPVFootnote1 |
2 |
DPV Footnote 1 |
outDPVFootnote2 |
2 |
DPV Footnote 2 |
outDPVFootnote3 |
2 |
DPV Footnote 3 |
outDPVFootnote4 |
2 |
DPV Footnote 4 |
outDPVFootnote5 |
2 |
DPV Footnote 5 |
outDPVFootnote6 |
2 |
DPV Footnote 6 |
outDPVNoStat |
DPV no stat indicator. |
|
outEWS |
1 |
EWS denied match |
outFirm |
40 |
Firm name |
outHiRiseDflt |
1 |
Highrise default flag |
outHouseNumber |
11 |
House number of entered address |
outHouseNumber2 |
11 |
House number of entered address. |
outIncInd |
2 |
Incorporated Place Indicator.
Note: This field is only available with the MLD Extended Attributes
Dataset.
|
outIsAlias |
3 |
Matched record located via an alias index |
outIntersect |
1 |
Intersection flag |
outLastLine |
60 |
Complete last line (city, state, ZIP + 4) |
outLastLineShort |
60 |
Complete Last Line (city, state, ZIP+4) less than 30 characters when possible. |
outLACS |
1 |
LACSLink code |
outLACSRetCode |
2 |
LACSLink return code |
outLACSInd |
1 |
LACSLink indicator |
outLat |
10 |
Latitude in millionths |
outLocCode |
4 |
Location code |
outLon |
11 |
Longitude in millionths |
outLOTCode |
1 |
LOT code |
outLOTNum |
4 |
LOT number |
outLotSize |
11 |
Lot size of the parcel expressed in square feet; 0 if none. Note: This field is only available with the MLD Extended Attributes
Dataset.
|
outLotSizeMeters |
11 |
Lot size of the parcel expressed in square meters; 0 if none. Note: This field is only available with the MLD Extended Attributes
Dataset.
|
outMailStop |
60 |
Mail Stop |
outMatchCode |
4 |
Match code |
outMatchedDb |
5 |
Database matched against. Use in conjunction with GsGetDBMetadata |
outMCDName |
41 |
Minor Civil Division name from the auxiliary file. Blank if no auxiliary file match. |
outMCDNumber |
6 |
Minor Civil Division number from the auxiliary file. Blank if no auxiliary file match. |
outMsaName |
30 |
MSA name |
outMsaNumber |
4 |
MSA number |
outName |
40 |
Primary street name |
outName2 |
40 |
Second street name (cross street) |
outName2Short |
40 |
Intersection Cross Street Short Name . |
outNameShort |
40 |
Street Short Name corr to outAddressShort. |
outNearestDist |
8 |
Distance, in feet, from the input location to the matched street segment, point address, or intersection. |
outNonDeliverable |
2 |
Indicates if the USPS can deliver mail to the output address. Y - the address is not deliverable by the USPS or the address did not match. N - the address is deliverable by the USPS. |
outNumMultiple |
Return value from GsNumMultiple() not GsDataGet() call. |
|
outParCenElevation |
7 |
Elevation, in feet, at the parcel centroid. Note: This field is only available with the MLD Extended Attributes
Dataset.
|
outParCenElevationMeters |
7 |
Elevation, in meters, at the parcel centroid. Note: This field is only available with the MLD Extended Attributes
Dataset.
|
outParentID |
13 |
Precisely ID of the address without units or blank if there are no units Note: This field is only available with the MLD Extended Attributes
Dataset.
|
outPBKey |
13 |
This output field is a unique address identifier returned when an address match is returned from the Master Location Dataset. The leading character is a 'P'. For example: P00001XSF1IF When using approxPBKey, the leading character for this field is an 'X'. For more information, see PreciselyID Fallback Note: This field is only available for the Master Location
Dataset.
|
outPlace |
8 |
TIGER Place code; 0 if none. Note: This field is only available with the MLD Extended Attributes
Dataset.
|
outPMBDesignator |
5 |
Private mail box designator; always "PMB" |
outPMBNumber |
9 |
Private mail box number |
outPercentGeocode |
5 |
Percentage along the street segment to the interpolated match. The range is 0.0 - 100.0. The range is always 0.0 for point data and intersections. |
outPointID |
10 |
Returns the unique point ID of an address |
outPOBoxZone |
2 |
Indicates if the ZIP Code has only PO Box addresses. Those addresses can be either a PO Box or a PO Box street address (PBSA). Y - The ZIP Code has only PO Box addresses. N - The ZIP Code does not have only PO Box addresses. |
outPostDir |
2 |
Street postdirectional |
outPostDir2 |
2 |
Cross street postdirectional |
outPostDir2Short |
2 |
Intersection Cross Street Short Postdirectional. |
outPostDirShort |
2 |
Street Short Post-directional corr to outAddressShort. |
outPreDir |
2 |
Primary street predirectional |
outPreDir2 |
2 |
Secondary street predirectional |
outPreDir2Short |
2 |
Intersection Cross Street Short Predirectional. |
outPreDirShort |
2 |
Street Short Predirectional corr to outAddressShort. |
outPropertyAccountID |
51 |
County property account ID Note: This field is only available with the MLD Extended Attributes
Dataset.
|
outRecordType |
1 |
USPS range record type |
outResBus |
2 |
R – Residential use B – Business use M – Mixed use – residential and business X – Unknown use Note: This
field is only available with the MLD Extended Attributes
Dataset.
|
outResultCode |
11 |
Result code. |
outRRteDflt |
1 |
Rural route default flag |
outSegID |
11 |
Unique segment ID from data vendor |
outSegDirection |
2 |
|
outState |
2 |
2-letter state abbreviation |
outStreetSide |
2 |
Side of the street of the matched address
|
outSuiteLinkRetCode |
3 |
SuiteLink Return Code. |
outTFID |
10 |
TIGER Face Identifier. This field can be used to match to all Census geocodes using external data; 0 if none. Note: This field is only available with the MLD
Extended Attributes Dataset.
|
outTimeGsFind |
10 |
Runtime for GsFind for each address processed by Geocoder. |
outType |
4 |
Street type (also called street suffix) |
outType2 |
4 |
Cross street type (also called street suffix) |
outType2Short |
4 |
Intersection Cross Street Short Type. |
outTypeShort |
4 |
Street Short Type corr to outAddressShort. |
outUACE |
6 |
TIGER Urban Area Identifier. Defines the urban area if any; 0 if none. Note: This field is only available with the MLD
Extended Attributes Dataset.
|
outUACEPop |
11 |
Census population of the urban area; 0 if none. Note: This
field is only available with the MLD Extended Attributes
Dataset.
|
outUnitNumber |
11 |
Unit number |
outUnitNumber2 |
11 |
Second unit number in the address line |
outUnitType |
4 |
Unit type (designator) |
outUnitType2 |
4 |
Second unit type in the address line |
outUrbanICity |
2 |
Urbanicity Indicator. An indicator that defines per the Census the Urbanicity of the Address using TIGER UACE codes for categorization. L – Large Urban Area (50,000 or greater population) S – Small Urban Area (2,500-50,000 population) R – Rural X – Unknown Note: This field is only available with the MLD Extended Attributes
Dataset.
|
outUrbName |
30 |
Urbanization name for Puerto Rico |
outZIP |
5 |
ZIP Code |
outZIPValid |
2 |
Describes if the output ZIP Code is valid. Y:
N: For all other cases |
outZIP4 |
4 |
ZIP + 4 |
outZ4Changed |
2 |
N – ZIP + 4 has not changed Y – ZIP + 4 changed |
outZIP9 |
9 |
9-digit ZIP Code |
outZIP10 |
10 |
9-digit ZIP Code with hyphen |
Configuring Geocoder for reverse geocoding
To configure Geocoder for reverse geocoding, there are a few control and input keywords that are either relevant to or required for reverse geocoding that can be defined in the .fmt file. These keywords are in addition to other required and optional control keywords.
Reverse geocoding control keywords
The following control keywords are relevant to reverse geocoding:
Control Keyword |
Description |
---|---|
reverseGeoAddress |
Specifies how addresses and unranged streets are processed with reverse geocoding. •0 – Default. Does not match to an address. •1 – Matches to points and interpolated addresses, but does not match to any unranged segments (such as highways). •2 – Matches to all types of street segments. |
reverseGeoClosestPt |
In a reverse geocoding operation, specifies whether the match is made to the closest feature or point address. Note: Implementation of this feature requires that at least one points data set and one streets data set are loaded; otherwise, the match will be made to the closest feature. •0 – Default. Matches to the closest feature including street segments and intersections in addition to address points. •1 – Matches to the closest point address within the search radius. |
reverseGeoIntersection |
In a reverse geocoding operation, specifies how GeoStan handles intersections close to the input geocode. •0 – Does not return intersections. •1 – Returns intersections. |
searchDist |
Used for reverse geocoding. Defines, in feet, the search area. |
For more details on keywords, see Control keywords.
Reverse geocoding input fields
The following input fields are required for reverse geocoding:
inLat |
Latitude of the geocode for the desired address. |
inLon |
Longitude of the geocode for the desired address. |
Geocoder returns the same output fields for reverse geocoding as for forward geocoding.
For field definitions, see Input and output keywords.
Status return codes for reverse geocoding
Geocoder returns the same location codes for reverse geocoding as for forward geocoding; however, there are match codes that are specific to reverse geocoding.
For more information, see Status codes.
Generating Report Files
The following sections provide information on generating report files.
Audit Report
If the keyword audit is greater than 0 in the FMT file, geocoder outputs the audit file. For example if audit = 1000, geocoder writes every 1000th record to the audit output file. The file is named using the path and filename initialized with audFile in the format file.
The information shown in both the Input Address and Output Results sections is dependent on the keywords you specified in the FMT file. The match code and location code is included at the end of each audit entry for troubleshooting purposes.
Non-standardized File
If the keyword nonStand is greater than 0 in the format file geocoder generates the non-standardized output file. The file is named using the path and filename initialized as the nStdFile keyword in the format file. geocoder sends all records that receive an Exxx match code to this file instead of to the output file. Initializing the nonStand keyword overrides a keyword keepNoMatch setting of 0 and outputs the non-standardized records to nStdFile.
Statistics Report
geocoder creates a status report file (geocoder.rpt by default) in the current working directory with every pass of the data. The file contains a statistical compilation of the most recent pass of geocoder. Each successive geocoder pass with the same format file overwrites the previous status report file. If you want to maintain historical data, backup this file prior to the next geocoder pass or modify the reportFile keyword in the format file.