Click or drag to resize

StreetDataToGeocodeResult Method

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Returns the raw address used for a geocoding operation as a GeocodeResult.

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public IGeocodeResult ToGeocodeResult()

Return Value

Type: IGeocodeResult
An IGeocodeResult containing the raw and structured address values.
Remarks
The structured address data is stored in FoundAddress.
Examples
C#
// Create a drill down geocoder to search for a location in the USA
DrillDownGeoCoder ddgc = new DrillDownGeoCoder(Country.USA);
// Search for a region named 'Aliso Viejo'
RegionSearchResult region_search = ddgc.GetRegions(2, "Aliso Viejo");
// Create a Region object using the region search result
RegionData region = region_search.Results[0];
// Perform a street search for 'Enterprise' within the found region
StreetSearchResult street_search_result = region.GetStreets("Enterprise");
// Convert the first street search result (Enterprise, Aliso Viejo, USA) to an igeocoderesult object
IGeocodeResult myResults = street_search_result.Results[0].ToGeocodeResult();
// Check that the geocoded result object isn't empty...
if (myResults != null) {
    Console.WriteLine("Street found is '{0}' in county '{1}'.", 
        myResults.FoundAddress.StreetNames[0], 
        myResults.FoundAddress.County);
        // Prints out >> Street found is 'Enterprise' in county 'Orange'.
} else {
    Console.WriteLine("No results found!");
}
See Also