Child pages
  • Geocoder
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Description

This algorithm provides a general behavior that shared by all geocoder algorithm. It offers a standard GUI interface, input and output data handling, and error handling mechanism. Support four types of geocoding: address, country, U.S. states and U.S. ZIP codes.

Pros & Cons
  1. Increase of code re-used with abstract classes that defines the common behaviors such as GUI layout, data handling, etc
  2. Saved up development time on new geocoder plugin since 90% of the front end codes are exist.
  3. Standard GUI layout given a professional look of the application. Once user learn to used one geocoder, it will be same for using other geocoder plugin
  4. It might caused problem if the inherited behaviors were not well defined. Since a single change on the abstract class will cause change on all sub-class
Applications

The plugins that used this interface provide very useful geographical coordinate information for geomap application. Scientists can visualize the data and analyzing their research from geographical expect.

Implementation Details

This algorithm provide a common front-end behaviors algorithm to favor multiple geocoders plugin. It uses MVC (Model-View-Controller) idea to facilitated the in-dependency and code reused implementation.

  1. View
    - AbstractGeocoderFactory defined GUI layout, data validation and geocoder type selection. It contains a FamilyOfGeocoder member that refer to the related geocoder family (Generic, Yahoo, etc)
  2. Controller
    - GeocoderAlgorithm processes the geolocation look up using the given Geocoder. The first look up is through invoking geocodingFullForm. If the look up failed, the second look up will be performed through invoking geocodingAbbreviation. It also provide error handling which analyzes the look up failures and provides appropriate warning message to user. In success, it generates a CSV output file with two additional columns that hold latitude and longitude values.
    - FamilyOfGeocoder contains four type of geocoders from the smae family. There are address, country, U.S. states and U.S. ZIP codes.
  3. Model
    - It uses the common geocoder model that defined in edu.iu.scipolicy.model.geocode. It uses Geolocation that represents geographical coordinate and USZipCode that contains uzip (the first 5 digit ZIP code) and postbox number (the last 4 digits number in 9-digits ZIP code).
    - Each geocoder might holds its own model if needed
Usage Hints

The usage is provided on each geocoder wiki page. For example, Yahoo! Geocoder.

Acknowledgments

The geocoding algorithm was authored, modified, integrated and documented by Chin Hua Kong. Many thanks to Chintan Tank first Generic Geocoder implementation that provide a based code to start from.

  • No labels