User Tools

Site Tools


map_suite_geocoder_performance_guide

This is an old revision of the document!


Map Suite Geocoder Performance Guide

Welcome to Map Suite Geocoder performance test and promotion guide, we strongly recommend you read the presentation of Map Suite Geocoder to know what is it and how is it work before reading this guide. If you have already understood Map Suite Geocoder, let's go on with this guide.

The purpose of this guide is to help you to know following things:

  • A simple introduction for inner structure and workflow of Map Suite Geocoder.
  • What is the bottleneck of Map Suite Geocoder performance.
  • How to improve the performance of batch query.

Structure and Workflow

This section will introduce the structure and workflow of Map Suite Geocoder roughly.

Data Source

The Geocoder uses a native data source with an optimized set of United States street based on the TIGER® data from the U.S. Census Bureau. Below Figure 1 shows a partial source data files.


Figure 1. Data source files.

The latest data from 2018 is available with purchase, you can refer our Blog to know the detail.

Open and Close Geocoder

After instantiating a UsaGeocoder in your code, you have to call Open function before doing any match queries, and it's recommended to call Close function after finishing your query. The code looks like:

UsaGeocoder usaGeocoder = new UsaGeocoder(sourceDataPath, MatchMode.Default, StreetNumberMatchingMode.Default);
usaGeocoder.Open();
// custom code for match queries
usaGeocoder.Close();

When opening a Geocoder, some source data you specified would be preprocessed and loaded into memory, most of them are index data that would be read frequently in match query. These data would be released from memory after close Geocoder.

You may see the MatchMode and StreetNumberMatchingMode when initializing the UsaGeocoder, they can be used to specify different match policies. It's important that the more strict policy the less match query time and vice versa. All code snippets in this guide use Default MatchMode with ExactMatch and Default StreetNumberMatchingMode with ExactMatch.

Match Query

The Geocoder supports three overloaded Match functions to do the match query, see below code snippet:

usaGeocoder.Match(sourceText: "12448 Angelo Dr. Frisco TX 75035-6470");
usaGeocoder.Match(streetAddress: "12448 Angelo Dr. Frisco TX", zip: "75035-6470");
usaGeocoder.Match(streetAddress: "12448 Angelo Dr.", city: "Frisco", state: "TX");
  • The 1st call with only one sourceText parameter would spend relative most time, because Geocoder would consider both geocoding and reverse geocoding when parsing the sourceText, it's not recommended to use this call when you only want to do geocoding.
  • The 2nd call with streetAddress and zip parameters is relative fastest, only geocoding would be considered and the match results would be returned directly.
  • The 3rd call with streetAddress, city and state parameters is slower than 2nd call, the different is that the results would be handled to filter city and state before returning.

To test the ultimate performance of Geocoder, we use the 2nd call in this guide.

map_suite_geocoder_performance_guide.1553064219.txt.gz · Last modified: 2019/03/20 06:43 by tgwikiupdate