Address abbreviation

[Warning] Warning

(fr) Cette page n’est plus maintenue depuis la version 2022 de Geoconcept Web. Pour accéder à la documentation à jour de ce web service, veuillez suivre ce lien.

Basic principles

The query takes as input an address (broken down into an address line, post code, town) and the size of the required standardised abreviation (32 or 38).

The service returns as output an abbreviation of the address line part following the rules expressed in the corresponding AFNOR standards (32 character standard and 38 character standard).

Concerning the restitution function of the 38-character address line, only the AFNOR NF Z10-011 standard dating from January 2013 (in 38 characters) will be applicable.

Concerning the restitution function of the 32-character address line;

  • In the first place the AFNOR NF Z10-011 standard from January 2013 (in 38 characters) will be aplicable:

    • with regard to the rules for reduction, but up to the target of 32 characters,
    • with regard to the abbreviation of words, including those that have not been defined in Appendix B of the standard NF Z10-011 dating from August 1989 (in 32 characters).
  • The state of play currently is that, following the application of AFNOR standard NF Z10-011 in January 2013, the NF Z10-011 standard dating from August 1989 (in 32 characters) will be applicable in relation to abbreviations of words, but only if the maximum length requested is 32 and if the resulting length remains higher than 32 characters. In this case, it will be limited to application of abbreviations from Appendix B of the NF Z10-011 standard dating from August 1989 (in 32 characters) for which the AFNOR standard NF Z10-011 of January 2013 in its various appendices does not suggest any abbreviation.

This serfvice interrogates files of abbreviations, copying the appendices of the AFNOR standards cited.

Availability

This web service is available at all times with Geoconcept Web.

V1

Parameters / properties

Input

parameter description optional default

maxLength

maxLength defines, in the form of an integer, the reference size to attain for the abbreviation of the address line. Values accepted are exclusivement 32 or 38.

yes

38

addressLine

The address line receiving, EITHER the street in the form number, repetition index, type of street and street name, OR the place name (in France this is the LIEU-DIT). The accuracy of the address abbreviation as output from the WS can only be ensured on condition that an address line parameter resulting from a validated address using an Address repository is supplied.

no

city

Town corresponding to the address line entered. No treatment will be applied to this parameter.

yes

postCode

Post code corresponding to the address line supplied. No treatment will be applied to this parameter.

yes

Output

parameter type min/max description

id

long

1/1

Automated increment of the response identifier.

status

string

0/1

Indicates the success or failure of the abbreviation process «OK» or «ERROR».

statusDetails

string

0/1

Empty, in the case of a succesful abbreviation process. With the corresponding error message, in the event of failure,
"Invalid maxLength parameter. It needs to be either 32 or 38".
"The address contraction can’t reach the expected maxLength".
"The supplied addressline was above 100 characters".

maxLength

int

1/1

Takes the value supplied in input «32» or «38».

address

array (normalizedAddress)

0/1

Standardised address.

normedAddressLineLength

int

1/1

Length of the address line obtained, following the operations of abbreviation applied by the service.

Standardised address (normalizedAddress)

parameter type min/max description

normedAddressLine

string

0/1

Final result of the contraction of the address line applied by the service.

city

string

0/1

Returns the town supplied as input, without modification, (otherwise empty).

postCode

string

0/1

Returns the post code supplied as input, without modification, (otherwise empty).

SOAP

WSDL

http://<server>/<webapp>/api/ws/addressNormalizerService?wsdl

Query

The example query takes into account the following address line: ``123 Bis, Boulevard du MARÉCHAL Jean de-Lattre-de-Tassigny Inférieur".

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://geoconcept.com/gc/schemas">
  <soapenv:Header/>
  <soapenv:Body>
     <sch:normalize>
        <maxLength>38</maxLength>
        <addressLine>123 Bis, Boulevard du MARÉCHAL Jean de-Lattre-de-Tassigny Inférieur</addressLine>
        <!--Optional:-->
        <city></city>
        <!--Optional:-->
        <postCode></postCode>
     </sch:normalize>
  </soapenv:Body>
</soapenv:Envelope>

Response

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
     <ns2:normalizeResponse xmlns:ns2="http://geoconcept.com/gc/schemas">
        <NormalizerResponse>
           <id>2</id>
           <status>OK</status>
           <statusDetails/>
           <maxLength>38</maxLength>
           <address>
              <normedAddressLine>123 B BD MAL J LATTRE TASSIGNY INF</normedAddressLine>
              <city/>
              <postCode/>
           </address>
           <normedAddressLineLength>34</normedAddressLineLength>
        </NormalizerResponse>
     </ns2:normalizeResponse>
  </soap:Body>
</soap:Envelope>
REST

Query

The example query takes into account the following address line: ``123 Bis, Boulevard du MARÉCHAL Jean de-Lattre-de-Tassigny Inférieur".

JSON query 

http://<server>/<webapp>/api/lbs/normalizer.json?addressLine=123%20Bis,%20Boulevard%20du%20MAR%C3%89CHAL%20Jean%20de-Lattre-de-Tassigny%20Inf%C3%A9rieur

JSON-P query 

http://<server>/<webapp>/api/lbs/normalizer.json?addressLine=123%20Bis,%20Boulevard%20du%20MAR%C3%89CHAL%20Jean%20de-Lattre-de-Tassigny%20Inf%C3%A9rieur&callback=myCallback

XML query 

http://<server>/<webapp>/api/lbs/normalizer.xml?addressLine=123%20Bis,%20Boulevard%20du%20MAR%C3%89CHAL%20Jean%20de-Lattre-de-Tassigny%20Inf%C3%A9rieur

Response

The response is always in UTF-8 format.

JSON format 

{
   "id": 3,
   "status": "OK",
   "statusDetails": "",
   "maxLength": 38,
   "address":    {
      "normedAddressLine": "123 B BD MAL J LATTRE TASSIGNY INF",
      "city": "",
      "postCode": ""
   },
   "normedAddressLineLength": 34
}

JSON-P format 

myCallback({
           "id": 3,
           "status": "OK",
           "statusDetails": "",
           "maxLength": 38,
           "address":    {
                  "normedAddressLine": "123 B BD MAL J LATTRE TASSIGNY INF",
                  "city": "",
                  "postCode": ""
           },
           "normedAddressLineLength": 34
});

XML format 

<normalizerResponse>
   <id>4</id>
   <status>OK</status>
   <statusDetails/>
   <maxLength>38</maxLength>
   <address>
      <normedAddressLine>123 B BD MAL J LATTRE TASSIGNY INF</normedAddressLine>
      <city/>
      <postCode/>
   </address>
   <normedAddressLineLength>34</normedAddressLineLength>
</normalizerResponse>

Possible responses

case of a standardised address (NormalizerResponse/NormalizerResponse/status is OK) 

<ns2:normalizeResponse xmlns:ns2="http://geoconcept.com/gc/schemas">
 <NormalizerResponse>
        <id>2</id>
        <status>OK</status>
        <statusDetails/>
        <maxLength>38</maxLength>
        <address>
           <normedAddressLine>123 B BD MAL J LATTRE TASSIGNY INF</normedAddressLine>
           <city>Paris</city>
           <postCode/>
        </address>
        <normedAddressLineLength>34</normedAddressLineLength>
 </NormalizerResponse>
</ns2:normalizeResponse>

Case of setting the reduction size to a value other than «32» or «38» (NormalizerResponse/NormalizerResponse/status is ERROR) 

<ns2:normalizeResponse xmlns:ns2="http://geoconcept.com/gc/schemas">
 <NormalizerResponse>
        <id>5</id>
        <status>ERROR</status>
        <statusDetails>Invalid maxLength parameter. It needs to be either 32 or 38</statusDetails>
        <maxLength>0</maxLength>
        <address>
           <normedAddressLine/>
           <city/>
           <postCode/>
        </address>
        <normedAddressLineLength>0</normedAddressLineLength>
 </NormalizerResponse>
</ns2:normalizeResponse>

Case of an address of more than 100 characters (NormalizerResponse/NormalizerResponse/status is ERROR) 

<ns2:normalizeResponse xmlns:ns2="http://geoconcept.com/gc/schemas">
 <NormalizerResponse>
        <id>6</id>
        <status>ERROR</status>
        <statusDetails>The supplied addressline was above 100 characters</statusDetails>
        <maxLength>0</maxLength>
        <address>
           <normedAddressLine/>
           <city/>
           <postCode/>
        </address>
        <normedAddressLineLength>0</normedAddressLineLength>
 </NormalizerResponse>
</ns2:normalizeResponse>

Case of failure in contraction of the address line in terms of the expected size (NormalizerResponse/NormalizerResponse/status is ERROR) 

<ns2:normalizeResponse xmlns:ns2="http://geoconcept.com/gc/schemas">
 <NormalizerResponse>
        <id>7</id>
        <status>ERROR</status>
        <statusDetails>The address contraction can't reach the expected maxLength</statusDetails>
        <maxLength>0</maxLength>
        <address>
           <normedAddressLine>123 B BD A F ZQ S E MAL J L TASSIGNY INF</normedAddressLine>
           <city>Paris</city>
           <postCode/>
        </address>
        <normedAddressLineLength>40</normedAddressLineLength>
 </NormalizerResponse>
</ns2:normalizeResponse>

FAQ

1. Is it possible to modify, add or delete the strings used for abbreviations?

1.

Is it possible to modify, add or delete the strings used for abbreviations?

Yes, these information items can be edited. In the “<TOMCAT_HOME>”\webapps\geoconcept-web\WEB-INF\lib\ folder, open the geoweb-ws-(version).jar file, follow the com\geoconcept\lbs\webservices filepath, and inside you will find the Substitutions.xml file. This file contains the vocabulary used for standardisation (primary way types, secondary way types, way type extensions, articles, repetitions indicator, first names and other abbreviations. Also, at the end you will find a list defining those words used only for the AFNOR 32-character standard.