Geocode service GetIntersectionCandidateFields method

Fields contained in a list of candidates returned from geocoding an intersection with the FindAddressCandidates() method.

GetIntersectionCandidateFields(PropertySet PropMods)

Parameter

Description

PropMods

Modifications to the geocode service (locator) properties. Use GetLocatorProperties() to return default locator properties.

Return Value

A Fields object containing one of more Field objects, each representing information about a match candidate.

Remarks

The common fields returned from the GetCandidateFields() method will also be returned by this method - this includes Shape, Status, and Score.

The address style specific match fields will differ. If geocoding a street address, the input address will include a house number. As a result, a match candidate for the address will return the house number in a candidate field for the match (match fields returned from GetCandidateFields()). When an intersection address is geocoded, a house number is not included. Instead, two streets are specified. As a result, the match fields for both streets are included are included in the recordset of match candidates. The match field names for the first street are appended with a "1", for example "StreetName1". The match field names for the second street are appended with a "2", for example "StreetName2".

Examples

C#

GeocodeService_GeocodeServer geocodeservice = new GeocodeService_GeocodeServer();

geocodeservice.Url = "http://localhost:6080/arcgis/services/GeocodeService/GeocodeServer";

 

PropertySet propertymods = geocodeservice.GetLocatorProperties();

 

Fields candidatefields = geocodeservice.GetIntersectionCandidateFields(propertymods);

 

foreach (Field candidatefield in candidatefields.FieldArray)

{

      // Descriptive name

      System.Diagnostics.Debug.WriteLine("Alias Name: " + candidatefield.AliasName);

      // Input field name

      System.Diagnostics.Debug.WriteLine("Name: " + candidatefield.Name);

      // Is required?

      System.Diagnostics.Debug.WriteLine("Required: " + candidatefield.Required.ToString());

      // Data type

      System.Diagnostics.Debug.WriteLine("Type: " + candidatefield.Type.ToString());

}

VB.NET

Dim geocodeservice As GeocodeService_GeocodeServer = New GeocodeService_GeocodeServer()

geocodeservice.Url = "http://localhost:6080/arcgis/services/GeocodeService/GeocodeServer"

 

Dim propertymods As PropertySet = geocodeservice.GetLocatorProperties()

Dim candidatefields As Fields = geocodeservice.GetIntersectionCandidateFields(propertymods)

Dim candidatefield As Field

 

For Each candidatefield In candidatefields.FieldArray

      ' Descriptive name

      System.Diagnostics.Debug.WriteLine("Alias Name: " + candidatefield.AliasName)

      ' Input field name

      System.Diagnostics.Debug.WriteLine("Name: " + candidatefield.Name)

      ' Is required?

      System.Diagnostics.Debug.WriteLine("Required: " + candidatefield.Required.ToString())

      ' Data type

      System.Diagnostics.Debug.WriteLine("Type: " + candidatefield.Type.ToString())

Next

Java

String serviceURL = "http://localhost:6080/arcgis/services/GeocodeService/GeocodeServer";

GeocodeServerBindingStub geocodeService = new GeocodeServerBindingStub(serviceURL);

 

//Test GetIntersectionCandidateFields

PropertySet propertyMods2 = geocodeService.getLocatorProperties();

Fields candidateFields2 = geocodeService.getIntersectionCandidateFields(propertyMods2);

Set<String> setOfInterCandiFields = new HashSet<String>();

 

System.out.println("Intersection Candidate Fields...");

 

for (Field candidateField : candidateFields2.getFieldArray()) {

      System.out.println(candidateField.getName());

      setOfInterCandiFields.add(candidateField.getName());

}

10/23/2013