Using Custom Address Styles |
# GeoCodeStyles.properties # entries must have the form # N: Property name, Property label, PropertyResourcePathname # where "N" must be an integer, and must be unique across entries, but can be in any order. # "Property name" is a simple name that must not contain blanks or "," # "Property label" is a user interface label # "PropertyResourcePathname" is a fully-qualified resource name that must not contain a "," 1: USAddressZ, US Streets with Zone, /com/esri/aims/resources/sdk/propsUSAddressZ.properties 2: USAddress, US Streets, /com/esri/aims/resources/sdk/propsUSAddress.properties 9: Zip5, ZIP 5-Digit, /com/esri/aims/resources/sdk/propsZip5.properties 10: SingleField, Single Field, /com/esri/aims/resources/sdk/propsSingleField.properties 6: USSingleHouse, US Single House, /com/esri/aims/resources/sdk/propsUSSingleHouse.properties 5: USSingleHouseZ, US Single House with Zone, /com/esri/aims/resources/sdk/propsUSSingleHouseZ.properties 4: USSingleRange, US Single Range, /com/esri/aims/resources/sdk/propsUSSingleRange.properties 3: USSingleRangeZ, US Single Range with Zone, /com/esri/aims/resources/sdk/propsUSSingleRangeZ.properties 7: Zip4, ZIP+4, /com/esri/aims/resources/sdk/propsZip4.properties 8: Zip4Range, ZIP+4 Range, /com/esri/aims/resources/sdk/propsZip4Range.properties 11: GermanAddress, German Addresses, /com/esri/aims/resources/sdk/propsGermanAddress.properties 12: GermanAddressZ, German Addresses with Zone, /com/esri/aims/resources/sdk/propsGermanAddressZ.properties |
GEOSTYLE |
<GEOSTYLE name="USAddressZ" description="US addresses with zone information" >...</GEOSTYLE> |
STNCOMMAND |
<STNCOMMAND file="us_addr.stn" /> |
MATCHKEY |
<MATCHKEY file="us_addr.dct" /> |
MATCHRULES, MATCH |
MATCHRULES |
MATCH |
<MATCHRULES file="us_addr1.mat" > <MATCH mprob="0.9" uprob="0.01" /> <MATCH mprob="0.9" uprob="0.01" /> <MATCH mprob="0.8" uprob="0.1" /> <MATCH mprob="0.7" uprob="0.1" /> <MATCH mprob="0.85" uprob="0.1" /> <MATCH mprob="0.85" uprob="0.1" /> <MATCH mprob="0.999" uprob="0.05" /> </MATCHRULES> |
QUERY |
<QUERY stn="SN" zone="ZN" /> |
INPUT, TAG, FORMAT, STNSTRING, ADDTAG, MATCHKEYFIELD |
INPUT |
<INPUT> <TAG id="STREET" label="Street" width="10" type="text" description="street number, street name and type" /> <TAG id="zone" label="zone" width="5" type="text" description="zne information (5 digits)" /> <FORMAT> <STNSTRING> <ADDTAG>STREET</ADDTAG> </STNSTRING> <MATCHKEYFIELD zn="zone" /> </FORMAT> </INPUT> |
TAG |
FORMAT |
STNSTRING |
ADDTAG |
MATCHKEYFIELD |
<INPUT> <TAG id="HOUSENUMBER" ... /> <TAG id="STREETNAME" ... /> <TAG id="STREETTYPE" ... /> <TAG id="zone" ... /> <FORMAT> <STNSTRING> <ADDTAG>HOUSENUMBER</ADDTAG> <ADDTAG>STREETNAME</ADDTAG> <ADDTAG>STREETTYPE</ADDTAG> </STNSTRING> <MATCHKEYFIELD zn="zone" /> </FORMAT> </INPUT> |
<MATCHKEYFIELD zn="zone" /> |
<MATCHKEYFIELD zn="zone" ct="city" st="state" /> |
<?xml version="1.0" encoding="UTF-8"?> <ARCXML version="1.1"> <REQUEST> <GET_GEOCODE maxcandidates="25" minscore="60"> <LAYER id="streets" /> <ADDRESS> <GCTAG id="STREET" value="380 New York St" /> <GCTAG id="Zone" value="92373" /> <GCTAG id="CrossStreet" value="" /> </ADDRESS> </GET_GEOCODE> </REQUEST> </ARCXML> |
STREET1, STREET2 |
STREET1 |
STREET2 |
<INPUT> <STREET1 id="STREET" /> <STREET2 id="CROSSSTREET" label="Cross street" width="10" type="text" description="cross street name and type" /> </INPUT> |
OUTPUT, PRINTMATCHKEY, PRINTFIELD, SEPARATOR |
OUTPUT |
<OUTPUT> <PRINTMATCHKEY>HN</PRINTMATCHKEY> <PRINTFIELD>PreDir</PRINTFIELD> <PRINTFIELD>PreType</PRINTFIELD> <PRINTFIELD>StreetName</PRINTFIELD> <PRINTFIELD>StreetType</PRINTFIELD> <PRINTFIELD>SufDir</PRINTFIELD> <PRINTMATCHKEY>ZN</PRINTMATCHKEY> </OUTPUT> |
PRINTMATCHKEY |
PRINTFIELD |
SEPARATOR |
<OUTPUT> <PRINTMATCHKEY>ZP</PRINTMATCHKEY> <SEPARATOR>-</SEPARATOR> <PRINTMATCHKEY>Z4</PRINTMATCHKEY> </OUTPUT> |
<OUTPUT separator="+" position="42" /> |
VAR PreDir1 | 1 | 2 | X ; Prefix direction 1 |
VAR PreType1 | 3 | 4 | X ; Prefix street type 1 |
VAR StreetName1 | 7 | 28 | S ; Street name 1 |
VAR Type1 | 35 | 6 | X ; Suffix street type 1 |
VAR PreDir2 | 43 | 2 | X ; Prefix direction 1 |
VAR SufDir1 | 41 | 2 | X ; Suffix direction 1 |
VAR PreDir1 | 1 | 2 | X ; Prefix direction 2 |
VAR PreType2 | 45 | 4 | X ; Prefix street type 1 |
VAR PreDir1 | 1 | 2 | X ; Prefix street type 2 |
VAR StreetName2 | 49 | 28 | S ; Street name 2 |
VAR Type2 | 77 | 6 | X ; Suffix street type 2 |
VAR SufDir2 | 83 | 2 | X ; Suffix direction 2 |
FIELDS, FIELD, POSITION, PREFERREDNAMES, NAME |
FIELDS |
<FIELDS> lt;FIELD id="FromLeft" required="true" description="Left from house number"> <POSITION start="1" width="10" /> <PREFERREDNAMES> <NAME>L-F-ADD</NAME> <NAME>L_F_ADD</NAME> . . . . . . <NAME>LEFTADD1</NAME> </PREFERREDNAMES> </FIELD> . . . . . . . </FIELDS> |
FIELD |
POSITION |
PREFERREDNAMES |
NAME |
<FIELDS> lt;FIELD id="PreDir1" required="false" datafieldid="PreDir" belongsto="street1"> <POSITION start="1" width="2" /> </FIELD> . . . . . . . <FIELD id="PreDir2" required="false" datafieldid="PreDir" belongsto="street2"> <POSITION start="43" width="2" /> </FIELD> . . . . . . . </FIELDS> |
INDEXES, INDEX |
INDEXES |
<INDEXES> <INDEX name="STN" seqnumber="1" hash="soundex" duplicate="true"> <FIELD id="StreetName" /> </INDEX> <INDEX name="zone" seqnumber="2" hash="random" duplicate="true"> <FIELD id="LeftZone" /> <FIELD id="RightZone" /> </INDEX> </INDEXES> |
INDEX |
INTERSECTION |
<INTERSECTION style="USStreetInts.st_" /> |
INTERSECTIONSTYLE |
<INTERSECTIONSTYLE>...</INTERSECTIONSTYLE> |
INTERSECTIONQUERY |
<INTERSECTIONQUERY indexname="stn" mkfield1="S1" mkfield2="S2" indexname="zone" mkefieldzone="ZN" /> |
First index expression: | stn="New York"? & zn="92373" | |
Second index expression: | stn="State"? & zn="92373" |
Sample Style File for German Address Matching |
<GEOSTYLE name=“GermanAddress” description=“German addresses without zone information” > <STNCOMMAND file=“ger_add.stn” /> <MATCHKEY file=“ger_add.dct” /> <MATCHRULES file=“ger_add2.mat” > <MATCH mprob=“0.9" uprob=”0.01" /> <MATCH mprob=“0.7" uprob=”0.1" /> <MATCH mprob=“0.999" uprob=”0.05" /> </MATCHRULES> <QUERY stn=“SN” /> <INPUT> <TAG id=“STREET” label=“Street” width=“10" type=“text” description=”street name, street suffix and street number” /> <FORMAT> <STNSTRING> <ADDTAG>STREET</ADDTAG> </STNSTRING> </FORMAT> </INPUT> <OUTPUT> <PRINTFIELD>StreetName</PRINTFIELD> <PRINTFIELD>StreetSuffix</PRINTFIELD> <PRINTMATCHKEY>HN</PRINTMATCHKEY> </OUTPUT> <FIELDS> <FIELD id=“StreetName” required=“true” description=“Street name”> <POSITION start=“1" width=“32" /> <PREFERREDNAMES> <NAME>STRAßEN.NAME</NAME> <NAME>STRAßEN_NAM</NAME> <NAME>STRAßEN-NAM</NAME> <NAME>STR.NAME</NAME> <NAME>STR_NAME</NAME> <NAME>STR-NAME</NAME> <NAME>STR.NAM</NAME> <NAME>STR_NAM</NAME> <NAME>STR-NAM</NAME> <NAME>ST.NAME</NAME> <NAME>ST_NAME</NAME> <NAME>ST-NAME</NAME> <NAME>NAME</NAME> <NAME>FNAME_BASE</NAME> </PREFERREDNAMES> </FIELD> <FIELD id=“StreetSuffix” required=“false” description=“Suffix street type”> <POSITION start=“33" width=“16" /> <PREFERREDNAMES> <NAME>STRAßEN.EXT</NAME> <NAME>STRAßEN_EXT</NAME> <NAME>STRAßEN-EXT</NAME> <NAME>STR.EXT</NAME> <NAME>STR_EXT</NAME> <NAME>STR-EXT</NAME> <NAME>ST.EXT</NAME> <NAME>ST_EXT</NAME> <NAME>ST-EXT</NAME> </PREFERREDNAMES> </FIELD> <FIELD id=“FromLeft” required=“true” description=“Left from house number”> <POSITION start=“49" width=“8" /> <PREFERREDNAMES> <NAME>L-ADR.VON</NAME> <NAME>L-ADR_VON</NAME> <NAME>L-ADR-VON</NAME> <NAME>L_ADR.VON</NAME> <NAME>L_ADR_VON</NAME> <NAME>L_ADR-VON</NAME> <NAME>LADR.VON</NAME> <NAME>LADR_VON</NAME> <NAME>LADR-VON</NAME> <NAME>L-V.ADR</NAME> <NAME>L-V_ADR</NAME> <NAME>L-V-ADR</NAME> <NAME>L_V.ADR</NAME> <NAME>L_V_ADR</NAME> <NAME>L_V-ADR</NAME> <NAME>LINKEADR1</NAME> <NAME>LREF_ADDRE</NAME> </PREFERREDNAMES> </FIELD> <FIELD id=“FromRight” required=“true” description=“Right from house number”> <POSITION start=“57" width=“8" /> <PREFERREDNAMES> <NAME>R-ADR.VON</NAME> <NAME>R-ADR_VON</NAME> <NAME>R-ADR-VON</NAME> <NAME>R_ADR.VON</NAME> <NAME>R_ADR_VON</NAME> <NAME>R_ADR-VON</NAME> <NAME>RADR.VON</NAME> <NAME>RADR_VON</NAME> <NAME>RADR-VON</NAME> <NAME>R-V.ADR</NAME> <NAME>R-V_ADR</NAME> <NAME>R-V-ADR</NAME> <NAME>R_V.ADR</NAME> <NAME>R_V_ADR</NAME> <NAME>R_V-ADR</NAME> <NAME>READR1</NAME> <NAME>RREF_ADDRE</NAME> </PREFERREDNAMES> </FIELD> <FIELD id=“ToLeft” required=“true” description=“Left to house number”> <POSITION start=“65" width=“8" /> <PREFERREDNAMES> <NAME>L-ADR.NACH</NAME> <NAME>L-ADR_NACH</NAME> <NAME>L-ADR-NACH</NAME> <NAME>L_ADR.NACH</NAME> <NAME>L_ADR_NACH</NAME> <NAME>L_ADR-NACH</NAME> <NAME>LADR.NACH</NAME> <NAME>LADR_NACH</NAME> <NAME>LADR-NACH</NAME> <NAME>L-N.ADR</NAME> <NAME>L-N_ADR</NAME> <NAME>L-N-ADR</NAME> <NAME>L_N.ADR</NAME> <NAME>L_N_ADR</NAME> <NAME>L_N-ADR</NAME> <NAME>LINKEADR2</NAME> <NAME>LNREF_ADDRE</NAME> </PREFERREDNAMES> </FIELD> <FIELD id=“ToRight” required=“true” description=“Right to house number”> <POSITION start=“73" width=“8" /> <PREFERREDNAMES> <NAME>R-ADR.NACH</NAME> <NAME>R-ADR_NACH</NAME> <NAME>R-ADR-NACH</NAME> <NAME>R_ADR.NACH</NAME> <NAME>R_ADR_NACH</NAME> <NAME>R_ADR-NACH</NAME> <NAME>RADR.NACH</NAME> <NAME>RADR_NACH</NAME> <NAME>RADR-NACH</NAME> <NAME>R-N.ADR</NAME> <NAME>R-N_ADR</NAME> <NAME>R-N-ADR</NAME> <NAME>R_N.ADR</NAME> <NAME>R_N_ADR</NAME> <NAME>R_N-ADR</NAME> <NAME>READR2</NAME> <NAME>RNREF_ADDRE</NAME> </PREFERREDNAMES> </FIELD> </FIELDS> <INDEXES> <INDEX name=“STN” seqnumber=“1" hash=“soundex” duplicate=“true”> <FIELD id=“StreetName” /> </INDEX> </INDEXES> <INTERSECTION style=“GermanStreetInts.st_” /> </GEOSTYLE> |