Share via


GeocodingLevel Enumeration

GeocodingLevel Enumeration

Indicates the maximum geocoding level in the hierarchical order (from street level matching to country level matching) for the points of interest data uploaded for geocoding on the MapPoint servers.

Public Enum GeocodingLevel Inherits System.Enum

[C#]
public enum GeocodingLevel : System.Enum

Remarks

Name

Description

City

Indicates that the city level geocoding is allowed. If this geocoding level is selected, all ambiguous addresses at street and postal code levels are geocoded against their city names.

CountryRegion

Indicates that the country/region level geocoding is allowed. If this geocoding level is selected, all ambiguous addresses at street, postal code and city levels are geocoded against their country names.

PostalCode

Indicates that the postal code level geocoding is allowed. If this geocoding level is selected, all ambiguous addresses at street level are geocoded against their postal codes.

Street

Indicates that the points of interest data will be geocoded at the street name (and number) level. When an ambiguious address is found with this geocoding level, that record will not be marked as ambiguious and will not be geocoded at other levels such as postal code or city and so on.

Subdivision

Indicates that the subdivision/state level geocoding is allowed. If this geocoding level is selected, all ambiguous addresses at street, postal code and city levels are geocoded against their state/subdivison.

Example

[Visual Basic]

'Create an instance of the customer data service proxy.
Dim custDataService As CustomerDataService = New CustomerDataService
'Assign your credentials.
custDataService.Credentials = _
        New NetworkCredential(myUserName, mySecurePassword, myDomainName)

'Set PreAuthenticate to True
custDataService.PreAuthenticate = True

Try
    'Define an upload specification object
    'and assign all required fields.
    Dim uploadSpec As UploadSpecification = New UploadSpecification
    uploadSpec.DataSourceName = myDataSourceName
    uploadSpec.EntityTypeName = myEntityTypeName
    uploadSpec.Environment = LocationDataEnvironment.Staging
    uploadSpec.MaximumGeocodingLevel = GeocodingLevel.City
    uploadSpec.RejectAmbiguousGeocodes = False
    'Start an upload job and obtain the job ID.
    Dim jobID As String = custDataService.StartUpload(uploadSpec)
Catch e As Exception
    Dim message As String = e.Message
    'Do your exception handling here.
End Try



[C#]

//Create an instance of the customer data service proxy.
   CustomerDataService cds = new CustomerDataService();
   //Assign your credentials.
   cds.Credentials = new System.Net.NetworkCredential(myUserName, 
           mySecurePassword, myDomainName);

   //Set PreAuthenticate to true
   cds.PreAuthenticate = true;

   try
   {
    //Define an upload specification object
    //and assign all required fiecds.
    UploadSpecification uploadspec = new UploadSpecification();
    uploadspec.DataSourceName = myDataSourceName;
    uploadspec.EntityTypeName = myEntityTypeName;
    uploadspec.Environment = LocationDataEnvironment.Staging;
    uploadspec.MaximumGeocodingLevel = GeocodingLevel.City;
    uploadspec.RejectAmbiguousGeocodes = false;
    //Start an upload job and obtain the job ID.
    string jobID = cds.StartUpload(uploadspec);
   }
   catch(Exception ex)
   {
    string message = ex.Message;
    //Do your exception handling here.
   }


See Also

  UploadSpecification Class   |   StartUpload Method