User Tools

Site Tools


api:dk11:activex:tatukgis_xdk11.itgis_addressmatching

ITGIS_AddressMatching interface

DK11 for ActiveX | TatukGIS_XDK11.ITGIS_AddressMatching | Interfaces | Methods | Properties

Class supports address matching according to defined formulas.

Available also on: Delphi | .NET | Java.

Syntax

// C#
public interface ITGIS_AddressMatching: ITBaseObject
{
}
' VisualBasic
Public Interface ITGIS_AddressMatching
  Implements ITBaseObject
End Class
// Oxygene
type
  ITGIS_AddressMatching = public interface( ITBaseObject )
  end;

Implements

Methods

Inherited Overrides Protected
Name Visibility Description
AttachDelphiObj public Only for internal use of TatukGIS.
(Inherited from ITBaseObject)
DelphiObj public Only for internal use of TatukGIS.
(Inherited from ITBaseObject)
Match public Matches given address string and address formulas.

Properties

Inherited Protected
Name Visibility Description
FormulasString public Field for formulas string.

Remarks

Definition of the address formulas has the form of INI file contents. It can be received both from TIniFile- and TMemIniFile object, because it is required to provide the definition as a single string in format analogous to the Text property of TStrings class.

The formulas have to be stored within a section called '[FORMULA]'. Key names for values have no matter.

Address formula is a list of field definitions that can be mixed with additional text (see below for more directions). A field definition takes the form:

<fieldname>      

where the field name is defined in a section called the same name.

A field section contains a key called 'Format' with a regular expression value which defines the field.

There is one important limitation for the format syntax. Subexpressions of regular expressions can not be used, because they are used to retrieve field values.

If the field format is defined as an alternative of values, it is possible to define additional synonyms for values. They are listed in the field section in the form:

<synonym>=<defined_value> 

The synonyms support for example street type fields with lots of abbreviations. Combining an address formula with corresponding field formats and synonyms a format of final address formula is created and it becomes a regular expression for the formula.

Additional text can be mixed with field definitions in an address formula. Leading and trailing white characters are removed from the formula. A group of white characters is converted to one space character. A single white character is converted to a space characters.

Implicitly only characters from the following set can occur in words(\w):

[ 1234567890abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ]

The set can be redefined by using a special section named WORDCHARS in form of:

[WORDCHARS]
Format='string_which_contains_all_excpected_characters'

This is an example INI file with two address formulas.

[STREETTYPE]
Format=St|Ave|Blvd
Street=St
Avenue=Ave
Boulevard=Blvd

[STREETNAME]
Format=\w[\w\. ]+

[DIRECTIONTYPE]
Format=N|S|E|W|NE|NW|SE|SW|EX

[FORMULA]
;Main St
1=\<STREETNAME\> \<STREETTYPE\>
;address='N Adams St.,'
2=address='\<DIRPREFIX\>.? \<STREETNAME\> \<STREETTYPE\>.?,?'

In the example there are two fields in the first address formula: STREETNAME' and 'STREETTYPE'. Both the fields have their sections with a detailed description.

The field 'STREETTYPE' has synonyms defined for each possible value. The final format for the first formula takes the form:

^(\w[\w\. ]+)\s+(St|Ave|Blvd|Street|Avenue|Boulevard)$

and for the second formula:

^address='(N|S|E|W|NE|NW|SE|SW|EX)\s+(\w[\w\. ]+)\s+(St|Ave|Blvd|Street|Avenue|Boulevard).?,?'$

2019/01/25 16:04