README.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. __ _ _ _
  2. / _(_) | | | |
  3. __ _ ___ ___ | |_ _ ___| | __| |
  4. / _` |/ _ \/ _ \| _| |/ _ \ |/ _` |
  5. | (_| | __/ (_) | | | | __/ | (_| |
  6. \__, |\___|\___/|_| |_|\___|_|\__,_|
  7. __/ |
  8. |___/
  9. Geofield is a module for storing geographic data in Drupal 7.
  10. It supports all geo-types (points, lines, polygons, multitypes etc.)
  11. http://drupal.org/project/geofield
  12. ---
  13. INSTALLATION
  14. Following are instructions for manual installation of Geofield and its
  15. required pieces. Want to do it the easy way? Install drush
  16. (http://drupal.org/project/drush) and drush-make
  17. (http://drupal.org/project/drush_make), then issue the command:
  18. drush make geofield.make
  19. Otherwise:
  20. 1. Install the Libraries module (http://drupal.org/project/libraries)
  21. 2. If it's not already there, create the directory /sites/all/libraries
  22. (or /sites/SITENAME/libraries for a multisite installation)
  23. 3. Download the geoPHP library from
  24. https://github.com/downloads/phayes/geoPHP/geoPHP.tar.gz
  25. (For more information, see the full project page at
  26. https://github.com/phayes/geoPHP)
  27. 4. Unarchive the library files and place in the "libraries" directory
  28. mentioned in Step 2
  29. Your directory structure should now look something like:
  30. /sites/all/libraries/geoPHP/geoPHP.inc
  31. ---
  32. CONFIGURATION
  33. To be written. Maybe by you?
  34. ---
  35. DEPENDENCIES
  36. libraries
  37. provides API for handling libraries
  38. http://drupal.org/project/libraries
  39. geoPHP
  40. provides geometry transformations
  41. https://github.com/phayes/geoPHP
  42. ---
  43. RELATED MODULES
  44. openlayers
  45. provides mapping for geofield
  46. http://drupal.org/project/openlayers
  47. geocoder
  48. provides geocoding widget for geofield
  49. https://drupal.org/project/geocoder
  50. ---
  51. CREDITS
  52. Original author: Tristan O'Neil
  53. Contributors: Alex Barth, Jeff Miccolis, Young Hahn, Tom MacWright,
  54. Patrick Hayes, Dave Tarc, Nikhil Trivedi, Marek Sotak,
  55. Khalid Jebbari, Brandon Morrison, David Peterson
  56. ---
  57. API NOTES
  58. Geofield fields contain nine columns of information about the geographic data
  59. that is stores. At its heart is the 'wkt' column where it stores the full
  60. geometry in the 'Well Known Text' (WKT) format. All other columns are metadata
  61. derived from the WKT column. Columns are as follows:
  62. 'wkt' WKT
  63. 'geo_type' Type of geometry (point, linestring, polygon etc.)
  64. 'lat' Centroid (Latitude or Y)
  65. 'lon' Centroid (Longitude or X)
  66. 'top' Bounding Box Top (Latitude or Max Y)
  67. 'bottom' Bounding Box Bottom (Latitude or Min Y)
  68. 'left' Bounding Box Left (Longitude or Min X)
  69. 'right' Bounding Box Right (Longitude or Max X)
  70. When a geofield is saved using the provided widgets, these values are passed
  71. through the geofield_compute_values function in order to compute dependent
  72. values. By default dependent values are computed based on WKT, but this may be
  73. overriden to compute values based on other columns. For example,
  74. geofield_compute_values may be called like so:
  75. geofield_compute_values($values, 'latlon');
  76. This will compute the wkt field (and all other fields) based on the lat/lon
  77. columns, resulting in a point. As a developer this is important to remember if
  78. you modify geofield information using node_load and node_save. Make sure to
  79. run any modified geofield instances through geofield_compute_values in order
  80. to make all columns consistent.