| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |                   __ _      _     _                  / _(_)    | |   | | __ _  ___  ___ | |_ _  ___| | __| |/ _` |/ _ \/ _ \|  _| |/ _ \ |/ _` || (_| | __/ (_) | | | |  __/ | (_| |\__, |\___|\___/|_| |_|\___|_|\__,_| __/ |                              |___/                               Geofield is a module for storing geographic data in Drupal 7.It supports all geo-types (points, lines, polygons, multitypes etc.)http://drupal.org/project/geofield---INSTALLATIONFollowing are instructions for manual installation of Geofield and itsrequired pieces. Want to do it the easy way? Install drush(http://drupal.org/project/drush) and drush-make(http://drupal.org/project/drush_make), then issue the command:  drush make geofield.makeOtherwise:1. Install the Libraries module (http://drupal.org/project/libraries)2. If it's not already there, create the directory /sites/all/libraries    (or /sites/SITENAME/libraries for a multisite installation)3. Download the geoPHP library from   https://github.com/downloads/phayes/geoPHP/geoPHP.tar.gz   (For more information, see the full project page at   https://github.com/phayes/geoPHP)4. Unarchive the library files and place in the "libraries" directory   mentioned in Step 2Your directory structure should now look something like:/sites/all/libraries/geoPHP/geoPHP.inc---CONFIGURATIONTo be written. Maybe by you?---DEPENDENCIESlibraries  provides API for handling libraries  http://drupal.org/project/librariesgeoPHP  provides geometry transformations  https://github.com/phayes/geoPHP---RELATED MODULESopenlayers  provides mapping for geofield  http://drupal.org/project/openlayers  geocoder  provides geocoding widget for geofield  https://drupal.org/project/geocoder---CREDITSOriginal author:  Tristan O'NeilContributors:     Alex Barth, Jeff Miccolis, Young Hahn, Tom MacWright,                   Patrick Hayes, Dave Tarc, Nikhil Trivedi, Marek Sotak,                   Khalid Jebbari, Brandon Morrison, David Peterson---API NOTESGeofield fields contain nine columns of information about the geographic datathat is stores. At its heart is the 'wkt' column where it stores the fullgeometry in the 'Well Known Text' (WKT) format. All other columns are metadataderived from the WKT column. Columns are as follows:  'wkt'          WKT  'geo_type'     Type of geometry (point, linestring, polygon etc.)  'lat'          Centroid (Latitude or Y)  'lon'          Centroid (Longitude or X)  'top'          Bounding Box Top (Latitude or Max Y)  'bottom'       Bounding Box Bottom (Latitude or Min Y)  'left'         Bounding Box Left (Longitude or Min X)  'right'        Bounding Box Right (Longitude or Max X)When a geofield is saved using the provided widgets, these values are passedthrough the geofield_compute_values function in order to compute dependentvalues. By default dependent values are computed based on WKT, but this may beoverriden to compute values based on other columns. For example,geofield_compute_values may be called like so:  geofield_compute_values($values, 'latlon');This will compute the wkt field (and all other fields) based on the lat/loncolumns, resulting in a point. As a developer this is important to remember ifyou modify geofield information using node_load and node_save. Make sure torun any modified geofield instances through geofield_compute_values in orderto make all columns consistent.
 |