User Tools

Site Tools


api:dk11:java:tatukgis.jdk.tgis_addressmatching.match_string_tgis_objectlist

Table of Contents



TGIS_AddressMatching.Match method

DK for Java | tatukgis.jdk.TGIS_AddressMatching.Match | Constructors | Methods | Properties

Matches the given address string against loaded address formulas.

Available also on: Delphi | .NET | ActiveX | Python.

Syntax

// Java
public int Match(
  java.lang.String _str,
  /* ref */ @ValueTypeParameter VarParameter<TObjectList<TObject>> _results
);
// Oxygene
public
  function Match(
    _str : String;
    var _results : TGIS_ObjectList
  ) : Integer;

Parameters

Name Type Description
_str java.lang.String
String
address string to match
_results TObjectList<TObject>
TGIS_ObjectList
list containing all found matches; each item stores one match as multiline field=value text; if the reference equals nil, the object is created

Result

Type Description
int
Integer
Number of found matches, or 0 if no match is found.

Remarks

USAGE: Load formulas via FormulasString, then call Match to extract structured address components.

matcher.FormulasString = formulaIniText
count = matcher.Match(rawAddress, results)
for i = 0 to count - 1 do
  fields = results[i]  # multiline field=value pairs

Standardizes the input string:

  • removes leading and trailing spaces,
  • replaces single white characters by space characters,
  • replaces a group of white characters by one space character.

It uses regular expression engine for matching.

Does case-insensitive pattern matching.

If the formula is a good match, sets values for formula fields retrieving them from subexpressions.

If the retrieved value is a synonym or has synonyms, it is returned as an alternative of possible values: val1|val2|..|valN.

See the class definition to obtain information how the address formulas are built.

Found matches are returned as a list of TStrings-objects containing matches for an address formula. This is an example of returned match:

DIRPREFIX=N
STREETNAME=Adams
STREETTYPE=Ave

Example

This is a simple example how to use the address matching class.

2026/10/31 23:09

Page Tools