Chapter 3.1 - Geocode Address

The GeocodeAddress method accepts an address input and returns the single best match that is above the minimum score (MinimumScore) requested.

GeocodeAddress Example 1 - City, State, Zip separated

This request contains the following:

  • City (City), state (state), and Zip code (Zip) in separate fields
  • CASS validation is on (CassCertify set to true)
  • MinimumScore is 0.7 - requesting an address with a score of 0.7 or greater
  • Offset (Offset) set to 3, meaning that we are requesting that the input location is 3 meters from the side of the link
  • Options (Options) bitwise value set to 312, being comprised of:
    • Return Zip+4: 8
    • Return Special Tax Jurisdictions: 16
    • Return Census IDs: 32
    • Return Building Zip Code: 256
  • Address second line (SecondaryUnit) is included, but not used in the final geocoding process
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<o:UsernameToken>
<o:Username>USERNAME</o:Username>
<o:Password>PASSWORD</o:Password>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body>
<GeocodeAddress xmlns="http://tempuri.org/">
<inputAddress xmlns:a="http://schemas.datacontract.org/2004/07/EZGeoSaaS" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:CassCertify>true</a:CassCertify>
<a:City>Seattle</a:City>
<a:CityStateZip/>
<a:MinimumScore>0.7</a:MinimumScore>
<a:Offset>3</a:Offset>
<a:Options>312</a:Options>
<a:SecondaryUnit>Suite 1200</a:SecondaryUnit>
<a:Source/>
<a:State>WA</a:State>
<a:StreetAddress>255 South King St</a:StreetAddress>
<a:Zip>98104</a:Zip>
</inputAddress>
</GeocodeAddress>
</s:Body>
</s:Envelope>

Response

The GeocodeAddressResponse contains detailed address information for a single matching address. The record returned contains detailed information including:

  • CassAddress: CASS information including Carrier Route, USPS Barcode, and standardized address
  • Census block and tract information
  • PCode, FeatureID, and FipsCode
  • Results are from NavTeq (NetworkID is nt)
  • AFC Geo SaaS Pro Soap is 100% confident in this result (Score is 1)
View the Response XML
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2019-02-06T20:37:17.463Z</u:Created>
<u:Expires>2019-02-06T20:42:17.463Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body>
<GeocodeAddressResponse xmlns="http://tempuri.org/">
<GeocodeAddressResult xmlns:a="http://schemas.datacontract.org/2004/07/EZGeoSaaS" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Alternate>0</a:Alternate>
<a:CassAddress>
<a:Address xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<b:string>255 S KING ST STE 1200 Suite 1200</b:string>
<b:string>SEATTLE, WA 98104-2832</b:string>
</a:Address>
<a:AddressLine>255 S KING ST STE 1200 Suite 1200</a:AddressLine>
<a:AddressQualityFlags>S3J</a:AddressQualityFlags>
<a:CarrierRoute>C001</a:CarrierRoute>
<a:City>SEATTLE</a:City>
<a:CityStateZip>SEATTLE, WA 98104-2832</a:CityStateZip>
<a:CountyCode>33</a:CountyCode>
<a:DeliveryPointValidation>2</a:DeliveryPointValidation>
<a:EnhancedLineOfTravel>0</a:EnhancedLineOfTravel>
<a:Reliability>94</a:Reliability>
<a:State>WA</a:State>
<a:USPSBarCode>/981042832553/</a:USPSBarCode>
<a:Zip>98104</a:Zip>
<a:Zip4>2832</a:Zip4>
</a:CassAddress>
<a:CensusBlockGroup>2016</a:CensusBlockGroup>
<a:CensusTract>9300</a:CensusTract>
<a:CityName>SEATTLE</a:CityName>
<a:Country>USA</a:Country>
<a:County>KING</a:County>
<a:ErrorMessage/>
<a:FeatureID>2411856</a:FeatureID>
<a:FipsCode>5303363000</a:FipsCode>
<a:FipsPlaceName>SEATTLE</a:FipsPlaceName>
<a:Incorporated>true</a:Incorporated>
<a:InputAddress xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<b:string>255 SOUTH KING ST SUITE 1200</b:string>
<b:string>Seattle,WA 98104</b:string>
</a:InputAddress>
<a:Latitude>47.598268931440387</a:Latitude>
<a:Longitude>-122.33089769285252</a:Longitude>
<a:NetworkID>nt</a:NetworkID>
<a:PCode>4133800</a:PCode>
<a:PostalCode>98104</a:PostalCode>
<a:PostalCodeExtension>2832</a:PostalCodeExtension>
<a:PrimaryJurisdictionName>SEATTLE</a:PrimaryJurisdictionName>
<a:PrimaryJurisdictionPCode>4133800</a:PrimaryJurisdictionPCode>
<a:Score>1</a:Score>
<a:SecondaryUnit>STE 1200</a:SecondaryUnit>
<a:SpecialTaxDistrictName i:nil="true"/>
<a:SpecialTaxDistrictPCode>-1</a:SpecialTaxDistrictPCode>
<a:StandardizedAddress xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<b:string>255 S KING ST STE 1200</b:string>
<b:string>SEATTLE,WA 98104-2832</b:string>
</a:StandardizedAddress>
<a:StateName>WA</a:StateName>
<a:StreetName>S KING ST</a:StreetName>
<a:StreetNumber>255</a:StreetNumber>
<a:TaxJurisdictionName>SEATTLE</a:TaxJurisdictionName>
<a:TimeZone/>
<a:UnderlyingFipsCode>5303363000</a:UnderlyingFipsCode>
</GeocodeAddressResult>
</GeocodeAddressResponse>
</s:Body>
</s:Envelope>

GeocodeAddress Example 2 - City, State, Zip combined

This request contains the following:

  • City, state, and Zip code combined in CityStateZip
  • CASS validation is on (CassCertify set to true)
  • MinimumScore is 0.7 - requesting an address with a score of 0.7 or greater
  • Offset (Offset) set to 3, meaning that we are requesting that the input location is 3 meters from the side of the link
  • Options (Options) bitwise value set to 312, being comprised of:
    • Return Zip+4: 8
    • Return Special Tax Jurisdictions: 16
    • Return Census IDs: 32
    • Return Building Zip Code: 256
  • Address second line (SecondaryUnit) is included, but not used in the final geocoding process
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<o:UsernameToken>
<o:Username>USERNAME</o:Username>
<o:Password>PASSWORD</o:Password>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body>
<GeocodeAddress xmlns="http://tempuri.org/">
<inputAddress xmlns:a="http://schemas.datacontract.org/2004/07/EZGeoSaaS" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:CassCertify>true</a:CassCertify>
<a:City/>
<a:CityStateZip>Seattle,WA 98104</a:CityStateZip>
<a:MinimumScore>0.7</a:MinimumScore>
<a:Offset>3</a:Offset>
<a:Options>312</a:Options>
<a:SecondaryUnit>Suite 1200</a:SecondaryUnit>
<a:Source/>
<a:State/>
<a:StreetAddress>255 South King St</a:StreetAddress>
<a:Zip/>
</inputAddress>
</GeocodeAddress>
</s:Body>
</s:Envelope>

Response

The GeocodeAddressResponse contains the same results as Example 1, even though the input address is formatting slightly differently.

View the Response XML
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2019-02-06T21:52:58.515Z</u:Created>
<u:Expires>2019-02-06T21:57:58.515Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body>
<GeocodeAddressResponse xmlns="http://tempuri.org/">
<GeocodeAddressResult xmlns:a="http://schemas.datacontract.org/2004/07/EZGeoSaaS" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Alternate>0</a:Alternate>
<a:CassAddress>
<a:Address xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<b:string>255 S KING ST STE 1200 Suite 1200</b:string>
<b:string>SEATTLE, WA 98104-2832</b:string>
</a:Address>
<a:AddressLine>255 S KING ST STE 1200 Suite 1200</a:AddressLine>
<a:AddressQualityFlags>S3J</a:AddressQualityFlags>
<a:CarrierRoute>C001</a:CarrierRoute>
<a:City>SEATTLE</a:City>
<a:CityStateZip>SEATTLE, WA 98104-2832</a:CityStateZip>
<a:CountyCode>33</a:CountyCode>
<a:DeliveryPointValidation>2</a:DeliveryPointValidation>
<a:EnhancedLineOfTravel>0</a:EnhancedLineOfTravel>
<a:Reliability>94</a:Reliability>
<a:State>WA</a:State>
<a:USPSBarCode>/981042832553/</a:USPSBarCode>
<a:Zip>98104</a:Zip>
<a:Zip4>2832</a:Zip4>
</a:CassAddress>
<a:CensusBlockGroup>2016</a:CensusBlockGroup>
<a:CensusTract>9300</a:CensusTract>
<a:CityName>SEATTLE</a:CityName>
<a:Country>USA</a:Country>
<a:County>KING</a:County>
<a:ErrorMessage/>
<a:FeatureID>2411856</a:FeatureID>
<a:FipsCode>5303363000</a:FipsCode>
<a:FipsPlaceName>SEATTLE</a:FipsPlaceName>
<a:Incorporated>true</a:Incorporated>
<a:InputAddress xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<b:string>255 SOUTH KING ST SUITE 1200</b:string>
<b:string>Seattle,WA 98104</b:string>
</a:InputAddress>
<a:Latitude>47.598268931440387</a:Latitude>
<a:Longitude>-122.33089769285252</a:Longitude>
<a:NetworkID>nt</a:NetworkID>
<a:PCode>4133800</a:PCode>
<a:PostalCode>98104</a:PostalCode>
<a:PostalCodeExtension>2832</a:PostalCodeExtension>
<a:PrimaryJurisdictionName>SEATTLE</a:PrimaryJurisdictionName>
<a:PrimaryJurisdictionPCode>4133800</a:PrimaryJurisdictionPCode>
<a:Score>1</a:Score>
<a:SecondaryUnit>STE 1200</a:SecondaryUnit>
<a:SpecialTaxDistrictName i:nil="true"/>
<a:SpecialTaxDistrictPCode>-1</a:SpecialTaxDistrictPCode>
<a:StandardizedAddress xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<b:string>255 S KING ST STE 1200</b:string>
<b:string>SEATTLE,WA 98104-2832</b:string>
</a:StandardizedAddress>
<a:StateName>WA</a:StateName>
<a:StreetName>S KING ST</a:StreetName>
<a:StreetNumber>255</a:StreetNumber>
<a:TaxJurisdictionName>SEATTLE</a:TaxJurisdictionName>
<a:TimeZone/>
<a:UnderlyingFipsCode>5303363000</a:UnderlyingFipsCode>
</GeocodeAddressResult>
</GeocodeAddressResponse>
</s:Body>
</s:Envelope>

GeocodeAddress Example 3 - No Options or CASS Validation

This request contains the following:

  • City, state, and Zip code combined in CityStateZip
  • CASS validation is off (CassCertify set to false)
  • MinimumScore is 0.7 - requesting an address with a score of 0.7 or greater
  • Offset (Offset) set to 3, meaning that we are requesting that the input location is 3 meters from the side of the link
  • Options (Options) bitwise value set to 0 - no additional special handling requested
  • Address second line (SecondaryUnit) is not included
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<o:UsernameToken>
<o:Username>USERNAME</o:Username>
<o:Password>PASSWORD</o:Password>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body>
<GeocodeAddress xmlns="http://tempuri.org/">
<inputAddress xmlns:a="http://schemas.datacontract.org/2004/07/EZGeoSaaS" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:CassCertify>false</a:CassCertify>
<a:City/>
<a:CityStateZip>Seattle,WA 98104</a:CityStateZip>
<a:MinimumScore>0.7</a:MinimumScore>
<a:Offset>3</a:Offset>
<a:Options>0</a:Options>
<a:SecondaryUnit/>
<a:Source/>
<a:State/>
<a:StreetAddress>255 South King St</a:StreetAddress>
<a:Zip/>
</inputAddress>
</GeocodeAddress>
</s:Body>
</s:Envelope>

Response

The GeocodeAddressResponse contains detailed address information for a single matching address. The record returned contains detailed information including:

  • CassAddress is nil since CASS validation is off
  • Census block ID (CensusBlockGroup) and census tract ID (CensusTract) fields are included but set to 0
  • PCode, FeatureID, and FipsCode
  • Results are from NavTeq (NetworkID is nt)
  • AFC Geo SaaS Pro Soap is 100% confident in this result (Score is 1)
  • Zip+4 is still returned even though Options is set to 0 on the input
View the Response XML
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2019-02-06T22:10:50.939Z</u:Created>
<u:Expires>2019-02-06T22:15:50.939Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body>
<GeocodeAddressResponse xmlns="http://tempuri.org/">
<GeocodeAddressResult xmlns:a="http://schemas.datacontract.org/2004/07/EZGeoSaaS" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Alternate>0</a:Alternate>
<a:CassAddress i:nil="true"/>
<a:CensusBlockGroup>0</a:CensusBlockGroup>
<a:CensusTract>0</a:CensusTract>
<a:CityName>SEATTLE</a:CityName>
<a:Country>USA</a:Country>
<a:County>KING</a:County>
<a:ErrorMessage/>
<a:FeatureID>2411856</a:FeatureID>
<a:FipsCode>5303363000</a:FipsCode>
<a:FipsPlaceName>SEATTLE</a:FipsPlaceName>
<a:Incorporated>true</a:Incorporated>
<a:InputAddress xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<b:string>255 S KING ST SUITE 1200</b:string>
<b:string>SEATTLE, WA 98104</b:string>
</a:InputAddress>
<a:Latitude>47.598268931440387</a:Latitude>
<a:Longitude>-122.33089769285252</a:Longitude>
<a:NetworkID>nt</a:NetworkID>
<a:PCode>4133800</a:PCode>
<a:PostalCode>98104</a:PostalCode>
<a:PostalCodeExtension>2832</a:PostalCodeExtension>
<a:PrimaryJurisdictionName>SEATTLE</a:PrimaryJurisdictionName>
<a:PrimaryJurisdictionPCode>4133800</a:PrimaryJurisdictionPCode>
<a:Score>1</a:Score>
<a:SecondaryUnit>Suite 1200</a:SecondaryUnit>
<a:SpecialTaxDistrictName i:nil="true"/>
<a:SpecialTaxDistrictPCode>-1</a:SpecialTaxDistrictPCode>
<a:StandardizedAddress xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<b:string>255 S KING ST Suite 1200</b:string>
<b:string>SEATTLE,WA 98104-2832</b:string>
</a:StandardizedAddress>
<a:StateName>WA</a:StateName>
<a:StreetName>S KING ST</a:StreetName>
<a:StreetNumber>255</a:StreetNumber>
<a:TaxJurisdictionName>SEATTLE</a:TaxJurisdictionName>
<a:TimeZone/>
<a:UnderlyingFipsCode>5303363000</a:UnderlyingFipsCode>
</GeocodeAddressResult>
</GeocodeAddressResponse>
</s:Body>
</s:Envelope>

See Also

Input

Results