GeocodeAddressCAN - Spectrum_OnDemand - main

Spectrum OnDemand Web Services (SOAP)

Product type
Software
Portfolio
Verify
Product family
Product
Spectrum OnDemand
Version
main
Language
English
Product name
Spectrum OnDemand
Title
Spectrum OnDemand Web Services (SOAP)
First publish date
2006

GeocodeAddressCAN takes an address and returns correct postal information. During address validation and correction, address lines are extracted from the input record, separated into components (parsed), and compared to the contents of the Canadian Postal Database. If a match is found, the input address is corrected according to the contents of the database. If no database match is determined, GeocodeAddressCAN provides the option to normalize input addresses. The normalization process attempts to format the address lines according to conventions outlined in the Canada Post publication, Delivery Needs Accuracy: Canadian Addressing Standards. When the normalization option is invoked and no database match is found for a particular address, GeocodeAddressCAN attempts to recognize the individual elements and formats them according to Canada Post conventions.

Resource URL

https://OnDemandServer/soap/GeocodeAddressCAN

For a list of Spectrum OnDemand servers, see Connecting to Spectrum OnDemand Servers.

Example

This shows a SOAP request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:geoc="http://www.pb.com/spectrum/services/GeocodeAddressCAN">
   <soapenv:Header/>
   <soapenv:Body>
      <geoc:GeocodeAddressCANRequest>
         <!--Optional:-->
         <geoc:options>
            <!--Optional:-->
            <geoc:MustMatchStateProvince>N</geoc:MustMatchStateProvince>
            <!--Optional:-->
            <geoc:Interpolation>N</geoc:Interpolation>
            <!--Optional:-->
            <geoc:MustMatchLocality>N</geoc:MustMatchLocality>
            <!--Optional:-->
            <geoc:MustMatchHouseNumber>Y</geoc:MustMatchHouseNumber>
            <!--Optional:-->
            <geoc:FallbackToPostal>N</geoc:FallbackToPostal>
            <!--Optional:-->
            <geoc:OffsetFromStreet>7</geoc:OffsetFromStreet>
            <!--Optional:-->
            <geoc:KeepMultimatch>N</geoc:KeepMultimatch>
            <!--Optional:-->
            <geoc:GeocodeLevel>Street Address</geoc:GeocodeLevel>
            <!--Optional:-->
            <geoc:MaxCandidates>N</geoc:MaxCandidates>
            <!--Optional:-->
            <geoc:FallbackToGeographic>N</geoc:FallbackToGeographic>
            <!--Optional:-->
            <geoc:MustMatchPostalCode>Y</geoc:MustMatchPostalCode>
            <!--Optional:-->
            <geoc:OffsetUnits>M</geoc:OffsetUnits>
            <!--Optional:-->
            <geoc:OffsetFromCorner>7</geoc:OffsetFromCorner>
            <!--Optional:-->
            <geoc:DatabaseSearchOrder></geoc:DatabaseSearchOrder>
            <!--Optional:-->
            <geoc:MatchMode></geoc:MatchMode>
            <!--Optional:-->
            <geoc:MustMatchStreet></geoc:MustMatchStreet>
            <!--Optional:-->
            <geoc:CoordinateSystem></geoc:CoordinateSystem>
            <!--Optional:-->
            <geoc:CloseMatchesOnly></geoc:CloseMatchesOnly>
            <!--Optional:-->
            <geoc:MustMatchInput></geoc:MustMatchInput>
            <!--Optional:-->
            <geoc:MustMatchCity></geoc:MustMatchCity>
            <!--Optional:-->
            <geoc:MustHaveFullPostalCode></geoc:MustHaveFullPostalCode>
            <!--Optional:-->
            <geoc:Dataset>CAN-MLD</geoc:Dataset>
            <!--Optional:-->
            <geoc:DatabasePreference></geoc:DatabasePreference>
         </geoc:options>
         <!--Optional:-->
         <geoc:Input>
            <!--Zero or more repetitions:-->
            <geoc:Row>
               <!--You may enter the following 10 items in any order-->
               <!--Optional:-->
               <geoc:AddressLine1>10-103 1/2 Main st nw</geoc:AddressLine1>
               <!--Optional:-->
               <geoc:AddressLine2></geoc:AddressLine2>
               <!--Optional:-->
               <geoc:FirmName></geoc:FirmName>
               <!--Optional:-->
               <geoc:Locality></geoc:Locality>
               <!--Optional:-->
               <geoc:County></geoc:County>
               <!--Optional:-->
               <geoc:City>Montreal</geoc:City>
               <!--Optional:-->
               <geoc:StateProvince>QC</geoc:StateProvince>
               <!--Optional:-->
               <geoc:PostalCode>H32 2YZ</geoc:PostalCode>
               <!--Optional:-->
               <geoc:LastLine></geoc:LastLine>
               <!--Optional:-->
               <geoc:user_fields>
                  <!--Zero or more repetitions:-->
                  <geoc:user_field>
                     <geoc:name></geoc:name>
                     <geoc:value></geoc:value>
                  </geoc:user_field>
               </geoc:user_fields>
            </geoc:Row>
         </geoc:Input>
      </geoc:GeocodeAddressCANRequest>
   </soapenv:Body>
</soapenv:Envelope>

This would be the response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns3:GeocodeAddressCANResponse xmlns:ns2="http://spectrum.pb.com/" xmlns:ns3="http://www.pb.com/spectrum/services/GeocodeAddressCAN">
         <ns3:Output>
            <ns3:Row>
               <ns3:AddressLine1>10-103 1/2 RUE MEANEY</ns3:AddressLine1>
               <ns3:City>KIRKLAND</ns3:City>
               <ns3:LocationPrecision>1</ns3:LocationPrecision>
               <ns3:Country>CAN</ns3:Country>
               <ns3:HouseNumber>103 1/2</ns3:HouseNumber>
               <ns3:HouseNumberHigh>104</ns3:HouseNumberHigh>
               <ns3:HouseNumberLow>100</ns3:HouseNumberLow>
               <ns3:HouseNumberParity>E</ns3:HouseNumberParity>
               <ns3:LastLine>KIRKLAND QC H9J 3B9</ns3:LastLine>
               <ns3:Latitude>45.43976519667856</ns3:Latitude>
               <ns3:Longitude>-73.89583737159852</ns3:Longitude>
               <ns3:Geocoder.MatchCode>S5HP-T---A</ns3:Geocoder.MatchCode>
               <ns3:PostalCode>H9J</ns3:PostalCode>
               <ns3:PostalCode.AddOn>3B9</ns3:PostalCode.AddOn>
               <ns3:SegmentParity>L</ns3:SegmentParity>
               <ns3:StateProvince>QC</ns3:StateProvince>
               <ns3:StreetDataType>1</ns3:StreetDataType>
               <ns3:StreetName>MEANEY</ns3:StreetName>
               <ns3:StreetPrefix>RUE</ns3:StreetPrefix>
               <ns3:NumberOfCandidateRanges>3</ns3:NumberOfCandidateRanges>
               <ns3:NumberOfRangeUnits>0</ns3:NumberOfRangeUnits>
               <ns3:CoordinateSystem>epsg:4326</ns3:CoordinateSystem>
               <ns3:IsCloseMatch>N</ns3:IsCloseMatch>
               <ns3:SegmentCode>2017426</ns3:SegmentCode>
               <ns3:CAN.CENSUS_CD>2466</ns3:CAN.CENSUS_CD>
               <ns3:CAN.CENSUS_CSD>102</ns3:CAN.CENSUS_CSD>
               <ns3:CAN.CENSUS_CMA>462</ns3:CAN.CENSUS_CMA>
               <ns3:CAN.CENSUS_DA>3429</ns3:CAN.CENSUS_DA>
               <ns3:CAN.CENSUS_CT>047003</ns3:CAN.CENSUS_CT>
               <ns3:user_fields>
                  <ns3:user_field>
                     <ns3:name/>
                     <ns3:value/>
                  </ns3:user_field>
               </ns3:user_fields>
            </ns3:Row>
         </ns3:Output>
      </ns3:GeocodeAddressCANResponse>
   </soap:Body>
</soap:Envelope>