| 4 | | A geocoder for Plone locations based on geopy. A geocoder converts text |
|---|
| 5 | | locations such as "Fort Collins, Colorado" to spatial coordinates. Other |
|---|
| 6 | | geocoding backends could be supported in the future. |
|---|
| | 4 | Provides basic geospatial capabilities for Plone, specifically: |
|---|
| | 5 | |
|---|
| | 6 | * Geospatial annotation of content based on emerging standards. Point, line, |
|---|
| | 7 | and polygon annotations are possible. |
|---|
| | 8 | |
|---|
| | 9 | * Serialization of annotated content to Atom (+GeoRSS_) or KML, which enables |
|---|
| | 10 | content to be marshaled into Google Earth, GMaps, or OpenLayers maps. |
|---|
| | 11 | |
|---|
| | 12 | * A geocoding tool based on geopy. |
|---|
| 47 | | The immediate use of the portal_geocoder is to geocode site user *location* |
|---|
| 48 | | strings, which users can set through their preferences form, and set spatial |
|---|
| 49 | | coordinates for users. Geocoded users can then be mapped using the |
|---|
| 50 | | complementary PleiadesOpenLayers product: |
|---|
| | 53 | Content objects that provide |
|---|
| | 54 | Products.PleiadesGeocoder.interfaces.IGeoreferenceable and have registered |
|---|
| | 55 | adapters to Products.PleiadesGeocoder.interfaces.IGeoItemSimple can be |
|---|
| | 56 | annotated via the edit_geo_form. See for example: |
|---|
| 52 | | http://icon.stoa.org/trac/pleiades/wiki/PleiadesOpenLayers |
|---|
| | 58 | http://pleiades.stoa.org/batlas/65/edit_geo_form |
|---|
| | 59 | |
|---|
| | 60 | PleiadesGeocoder marks all AT content types as providers of IGeoreferenceable |
|---|
| | 61 | and IGeoItemSimple. In Python, content objects can be geo-annotated like so: |
|---|
| | 62 | |
|---|
| | 63 | .. code-block:: python |
|---|
| | 64 | |
|---|
| | 65 | >>> ob = app['plone']['batlas']['65'] |
|---|
| | 66 | >>> coordinates = (((28.54268, 38.08102, 0.0), ...)) |
|---|
| | 67 | >>> geoitem.setGeoInterface('Polygon', coordinates) |
|---|
| | 68 | >>> geoitem.geom_type |
|---|
| | 69 | 'Polygon' |
|---|
| | 70 | >>> geoitem.coords |
|---|
| | 71 | (((28.54268, 38.08102, 0.0), ...)) |
|---|
| | 72 | |
|---|
| | 73 | |
|---|
| | 74 | KML and GeoRSS views |
|---|
| | 75 | -------------------- |
|---|
| | 76 | |
|---|
| | 77 | Annotated objects that provide |
|---|
| | 78 | Products.PleiadesGeocoder.interfaces.IGeoserializable have GeoRSS and KML |
|---|
| | 79 | representations via georss and kml views. See for example: |
|---|
| | 80 | |
|---|
| | 81 | http://pleiades.stoa.org/batlas/65/georss |
|---|
| | 82 | http://pleiades.stoa.org/batlas/65/kml |
|---|
| | 83 | |
|---|
| | 84 | Furthermore, folderish objects containing geo-annotated content that provide |
|---|
| | 85 | that same interface have similiar views. See |
|---|
| | 86 | |
|---|
| | 87 | http://pleiades.stoa.org/batlas/georss |
|---|
| | 88 | http://pleiades.stoa.org/batlas/kml |
|---|
| | 89 | |
|---|
| | 90 | PleiadesGeocoder marks all AT folders and topics as providers of |
|---|
| | 91 | IGeoserializable. |
|---|
| | 92 | |
|---|
| | 93 | |
|---|
| | 94 | Geocoding Tool |
|---|
| | 95 | -------------- |
|---|
| | 96 | |
|---|
| | 97 | Currently, geocoding aims at one of Plone's standard metadata fields: location. |
|---|
| | 98 | This field is for strings like:: |
|---|
| | 99 | |
|---|
| | 100 | "Chapel Hill, NC" |
|---|
| | 101 | "London, England" |
|---|
| | 102 | |
|---|
| | 103 | Our current functionality focuses on site members. PleiadesGeocoder adds a new |
|---|
| | 104 | string property named 'spatialCoordinates' to your memberdata property sheet, |
|---|
| | 105 | and overrides the default personalize.py script. On any update of member |
|---|
| | 106 | location, the portal_geocoder tool will attempt to find the proper coordinates |
|---|
| | 107 | by using the Google geocoding service. The coordinates are then stored in the |
|---|
| | 108 | member's 'spatialCoordinates' property. |
|---|
| | 109 | |
|---|
| | 110 | Views of a site's geocoded members can be had at the URLs: |
|---|
| | 111 | |
|---|
| | 112 | ${portal_url}/Members/georss |
|---|
| | 113 | ${portal_url}/Members/kml |
|---|
| | 114 | |
|---|
| | 115 | |
|---|
| | 116 | Support |
|---|
| | 117 | ------- |
|---|
| | 118 | |
|---|
| | 119 | Please subscribe to the pleiades-software_ email list. The archives may be |
|---|
| | 120 | viewed online without subscription. |
|---|