Skip to Main Content
Mapping with Drupal
book

Mapping with Drupal

by Alan Palazzolo, Thomas Turnbull
December 2011
Intermediate to advanced content levelIntermediate to advanced
150 pages
3h 50m
English
O'Reilly Media, Inc.
Content preview from Mapping with Drupal

Geocoding

In Adding geographic data to a node with the Location module we introduced the concept of geocoding. Geocoding is the process of creating spatial data from nonspatial information. Geocoding can be converting an address into latitude and longitude coordinate, or turning the name “Mount Everest” into a polygon. Going in the opposite direction, turning geospatial data into nongeospatial data, such as a coordinate into an address, is called reverse-geocoding.

Note

The process of geocoding, especially address conversion, usually involves a large amount of data and heavy processing power. This means that you are unlikely to create your own geocoding service, and it is why most of these modules integrate with existing services.

Modules

We have already worked through an example where the Location module geocoded the address that you entered for the Drupal company content type. To achieve similar results for the Geofield module, we will use the Geocoder and Addressfield modules. One other module that handles geocoding for Drupal 7 is the Geonames module, which will be briefly discussed.

Geocoder and Addressfield

To integrate with the OpenLayers and Geofield modules, the easiest way to allow users to enter an address and have it automatically geocoded is to install the Addressfield and Geocoder modules. For our example website, we will create a new content type to store Drupal events. The content type will contain the name of the event, a description of the event, a date, an address, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

High Performance Drupal

High Performance Drupal

Jeff Sheltren, Narayan Newton, Nathaniel Catchpole
Using Drupal

Using Drupal

Heather Berry, Angela Byron, James Walker, Jeff Eaton, Nathan Haug, Jeff Robbins

Publisher Resources

ISBN: 9781449311308Errata PageSupplemental Content