DK for Delphi | GisGeocoding.TGIS_Geocoding | Classes | Constructors | Methods | Properties | Events
Class encapsulates Geocoding support.
// Delphi type TGIS_Geocoding = class( TGIS_BaseObjectDisposable ) end;
// C++ Builder class PASCALIMPLEMENTATION TGIS_Geocoding : public TGIS_BaseObjectDisposable { };
Name | Visibility | Description | |
---|---|---|---|
Create(TGIS_LayerVector) | public | Construct instance. | |
Create(TGIS_LayerVector; TGIS_ShapeType) | public | Construct instance. | |
Name | Visibility | Description | |
---|---|---|---|
AddPoint | public | Add a new node connection point to the network | |
Clear | public | Clear any results from geocoding. | |
LoadFormulas(String; String) | public | Sets address formulas definition and other settings used by geocoding and reverse geocoding. | |
LoadFormulas(String; String; String) | public | Sets address formulas definition and other settings used by geocoding and reverse geocoding. | |
Match | public | Parses given address line. | |
Parse(String) | public | Parse an address line. | |
Parse(String; Boolean; Boolean) | public | Parse an address line. | |
ParseEx(String; Boolean; Boolean; Boolean) | public | Parses given address line. | |
ParseEx(TGIS_ObjectList; TGIS_ObjectList; Boolean; Boolean; Boolean) | public | Finds address point(s), or intersection(s) according to given matches. | |
ReverseGeocode(TGIS_Point; Double; TGIS_Shape; String) | public | Returns the closest address to the given point. | |
ReverseGeocode(TGIS_Point; Double; TGIS_Shape; String; String) | public | Returns the closest address to the given point. | |
Name | Visibility | Description | |
---|---|---|---|
CityName | public | Field for the city name. | |
FormulasString | public | String in form of an INI file contents with address formulas definition. | |
HouseNumber | public | Field for the house number | |
LayerGeocoded | public | Layer with geocoded address. | |
LFrom | public | Field name for the starting number on the left side of the street. | |
LTo | public | Field name for the ending number on the left side of the street. | |
Offset | public | Offset describes the size of the space between street and address point. | |
OSMGeocoding | public | If true the local geocoding resource is ignored and the requests are send to the TatukGIS online geocoding service. | |
Point | public | List of address points. | |
Query | public | String with processed query. | |
QueryEx | public | String with process query. | |
ReverseRestrictQuery | public | String with a query defined for reverse geocoding at the address formulas definition. | |
RFrom | public | Field name for the starting number on the right side of the street. | |
RoadName | public | Field for the feature name. | |
RTo | public | Field name for the ending number on the right side of the street. | |
StreetName | public | Field for the street name. | |
Uid | public | List of resolved streets Uids. | |
UidEx | public | List of resolved street Uids. | |
UniqueName | public | Field for a name of a special key indicating a unique street identifier. | |
Name | Visibility | Description | |
---|---|---|---|
AddressEvent | published | Event which will be fired on each found address. | |
Currently arc- and point layers are supported. Any street fragment from intersection to intersection must be a separate shape. There are two ways the class can work:
to build the formulas).
Supports also Reverse Geocoding.
var geoObj : TGIS_Geocoding ; layerSrc : TGIS_LayerVector ; r : Integer ; sname : String; begin // let's get a source layer layerSrc := TGIS_LayerVector(TGIS_LayerSHP(GIS.Items[0])); if not Assigned( layerSrc ) then exit ; // let's create a geocoding object geoObj := TGIS_Geocoding.Create( layerSrc, TGIS_ShapeType.Arc ) ; geoObj.offset := 0.0001 ; geoObj.LoadFormulas( GisSamplesDataDir + 'us_addresses.geo', GisSamplesDataDir + 'tiger_file.geo' ) ; // let's find 'WallStreet' street sname:='WallStreet'; r := geoObj.ParseEx(sname) -1 ; // if not found, maybe let's try to be more specific if r <= 0 then sname := sname + ' ???' ;