Data Input
The Geofield and Location modules store spatial information in different ways, so the data must be input in different ways. The tutorials in this section show how to work with Drupal and these modules to collect and store spatial data.
Geofield Module
As explained in Geofield, the Geofield module has many different ways to collect spatial data. This tutorial will explain the simplest configuration, and will provide the basis for exploring more advanced techniques.
Basic configuration of Geofield
Setting up the Geofield module includes a few extra steps not normally followed when setting up a Drupal module. Geofield requires that you add the geoPHP library. GeoPHP is an open source PHP library for doing spatial operations, such as converting geographic data from JSON to WKT or calculating the area of a polygon.
Download the latest stable release of the Geofield module to your site’s modules directory.
Download the latest stable release of the Libraries module to your site’s modules directory. The Libraries module is used by Drupal modules like Geofield that require a third-party library or plug-in.
If it is not already there, create a libraries directory inside your Drupal installation’s sites/all directory.
Download the geoPHP library (alternatively, the git repository can be cloned, or it can be downloaded as a zip file from the project’s github page).
Note
The geoPHP library, an open source library for doing geospatial operations, also aims to provide a transparent layer on top ...
Get Mapping with Drupal now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.