{ "info": { "author": "Giorgio Borelli", "author_email": "giorgio@giorgioborelli.it", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Programming Language :: Python", "Topic :: Internet", "Topic :: Scientific/Engineering :: GIS" ], "description": "Introduction\n============\n\n.. role:: class(raw)\n :format: html\n.. role:: meth(raw)\n :format: html\n.. role:: mod(raw)\n :format: html\n\n\n:mod:`collective.geo.geographer` provides geo-annotation for `Plone`_.\n\nThis package is based on Sean Gillies's idea (`zgeo.geographer`_) and integrates\nits functionalities in collective.geo project.\n\n.. image:: https://secure.travis-ci.org/collective/collective.geo.geographer.png\n :target: http://travis-ci.org/collective/collective.geo.geographer\n\nFound a bug? Please, use the `issue tracker`_.\n\n.. contents:: Table of contents\n\n\nRequirements\n============\n\n* `Plone`_ >= 4\n\nInstallation\n============\n\nThis addon can be installed like any other addon, please follow the official\ndocumentation_.\n\n\nHow it works\n============\n\nAny object that implements\n:class:`IAttributeAnnotatable `\nand\n:class:`IGeoreferenceable `\ncan be adapted and geo-referenced.\n\nAll Zope content objects provide the former,\nand the latter can be easily configured via ZCML.\n\nLet's test with an example placemark, which provides both of the marker\ninterfaces mentioned above::\n\n >>> from zope.interface import implements\n >>> from zope.annotation.interfaces import IAttributeAnnotatable\n >>> from collective.geo.geographer.interfaces import IGeoreferenceable\n\n >>> class Placemark(object):\n ... implements(IGeoreferenceable, IAttributeAnnotatable)\n\n >>> placemark = Placemark()\n\nAdapt it to \n:class:`IGeoreferenced `::\n\n >>> from collective.geo.geographer.interfaces import IGeoreferenced\n >>> geo = IGeoreferenced(placemark)\n\nIts properties should all be ``None``::\n\n >>> geo.type is None\n True\n >>> geo.coordinates is None\n True\n >>> geo.crs is None\n True\n\nCheck whether the geo-referenceable object has coordinates or not::\n\n >>> geo.hasCoordinates()\n False\n\nNow set the location geometry to type *Point* and coordinates \n*105.08 degrees West, 40.59 degrees North* using\n:meth:`setGeoInterface `::\n\n >>> geo.setGeoInterface('Point', (-105.08, 40.59))\n\nA georeferenced object has ``type`` and ``coordinates`` attributes which should\ngive us back what we put in::\n\n >>> geo.type\n 'Point'\n >>> tuple(['%.2f' % x for x in geo.coordinates])\n ('-105.08', '40.59')\n >>> geo.crs is None\n True\n\nNow the :meth:`hasCoordinates `\nmethod returns True::\n\n >>> geo.hasCoordinates()\n True\n\nAn event should have been sent::\n\n >>> from zope.component.eventtesting import getEvents\n >>> from collective.geo.geographer.event import IObjectGeoreferencedEvent\n >>> events = getEvents(IObjectGeoreferencedEvent)\n >>> events[-1].object is placemark\n True\n\nTo remove the coordinate from a georeferenced object, we can\nuse the :meth:`removeGeoInterface `\nmethod::\n\n >>> geo.removeGeoInterface()\n >>> geo.type is None\n True\n >>> geo.coordinates is None\n True\n >>> geo.crs is None\n True\n\n\nPlone integration\n-----------------\n\nAdd geo-referenced content::\n\n >>> from plone.app.testing import setRoles\n >>> from plone.app.testing import TEST_USER_ID\n >>> portal = layer['portal']\n >>> setRoles(portal, TEST_USER_ID, ['Manager'])\n\n >>> oid = portal.invokeFactory('Document', 'doc')\n >>> doc = portal[oid]\n\nIf the content type doesn't implement\n:class:`IGeoreferenceable `\ninterfaces, we need to provide it::\n\n >>> from zope.interface import alsoProvides\n >>> alsoProvides(doc, IGeoreferenceable)\n\nNow we can set the coordinates::\n\n >>> from collective.geo.geographer.interfaces import IWriteGeoreferenced\n >>> geo = IWriteGeoreferenced(doc)\n >>> geo.setGeoInterface('Point', (-100, 40))\n\nand reindex the document::\n\n >>> doc.reindexObject(idxs=['zgeo_geometry'])\n\nWe can create a subscriber for\n:class:`IObjectGeoreferencedEvent `\nto do that automatically.\n\nCheck the catalog results::\n\n >>> from Products.CMFCore.utils import getToolByName\n >>> catalog = getToolByName(portal, 'portal_catalog')\n >>> brain = [b for b in catalog({'getId': 'doc'})][0]\n >>> brain.zgeo_geometry['type']\n 'Point'\n >>> brain.zgeo_geometry['coordinates']\n (-100, 40)\n\nA simple view (:class:`geoview `)\nnotifies us if a context is geo-referenceable::\n\n >>> view = doc.restrictedTraverse('@@geoview')\n >>> view.isGeoreferenceable()\n True\n\nand allows us to find its coordinates::\n\n >>> view.getCoordinates()\n ('Point', (-100, 40))\n\nWhen we remove the coordinates, the corresponding index will return ``None``::\n\n >>> geo.removeGeoInterface()\n >>> doc.reindexObject(idxs=['zgeo_geometry'])\n >>> brain = [b for b in catalog({'getId': 'doc'})][0]\n >>> brain.zgeo_geometry\n Missing.Value\n\n\n.. _zgeo.geographer: http://pypi.python.org/pypi/zgeo.geographer\n.. _Plone: http://plone.org\n.. _issue tracker: https://github.com/collective/collective.geo.bundle/issues\n.. _documentation: http://plone.org/documentation/kb/installing-add-ons-quick-how-to\n\nContributors\n============\n\n* Sean Gillies\n* Giorgio Borelli\n* Christian Ledermann\n* Mirco Angelini\n\nChangelog\n=========\n\n\n2.1 (2016-10-26)\n----------------\n\n- Removed unittest2 using unittest instead.\n [giorgio]\n- using PLONE_APP_CONTENTTYPES_FIXTURE to make tests plone5 compatible\n [pbauer]\n- ``IObjectGeoreferencedEvent`` doesn't acquire from ``IObjectModifiedEvent``\n anymore. See `issue 5 on collective.geo.geographer`_.\n [keul]\n\n2.0 (2013-10-29)\n----------------\n\n- Changed package layout\n [gborelli]\n\n- remove style key from zgeo_geometry metadata\n [gborelli]\n\n- move IGeoCoder utility to c.geo.mapwidget\n [gborelli]\n\n- remove IGeoCoder adapter\n [gborelli]\n\n\n1.7 (2013-04-11)\n----------------\n\n- Fixed permission on GeoreferencingAnnotator. See #3 [gborelli]\n- Moved showCoordinatesTab to c.geo.contentlocations [gborelli]\n- Added hasCoordinates method to GeoreferencingAnnotator to check\n whether an object has been georeferenced or not [gborelli]\n- Added a method in order to hidden Coordinates tab for dexterity\n content types [valentinaB]\n- Changed Version of Geopy (moved from 0.94.2 to 0.95) to support\n Google api v3 in geocoder [cippino]\n\n\n1.6 (2013-01-28)\n----------------\n\n- Fixed MANIFEST.in [gborelli]\n\n\n1.5 (2013-01-28)\n----------------\n\n- Added Sphinx documentation [gborelli]\n- Added travis-ci configurations [gborelli]\n- Moved reindexDocSubscriber to collective.geo.contentlocations [gborelli]\n- Refactored test and removed dependency from old Topic content type [gborelli]\n\n\n1.4 (2012-02-11)\n----------------\n* changed tests using plone.app.testing [gborelli]\n* Added IGeoCoder utility [gborelli]\n* Marked as deprecated IGeoCoder adapter [gborelli]\n* Added removeGeoInterface to remove coordinates from an object [mircoangelini]\n\n\n0.1.3 (2011-09-05)\n------------------\n* plone 4.1 fixes [gborelli]\n* include Products.CMFCore to make plone 4.1 happy [nan010]\n* changed Browser import from Testing.testbrowser [gborelli]\n* added z3c.autoinclude entry point [gborelli]\n\n\n0.1.2 (2010-12-28)\n------------------\n\n* Moved IGeoView from c.geo.contentlocations\n\n\n0.1.1 (2010-11-13)\n------------------\n\n* moved geocoderview to portal root\n\n\n0.1 (2010-10-31)\n----------------\n\n* removed zgeo.geographer dependency\n* zgeo.plone.geographer code refactoring\n* moved from zgeo.plone.geographer\n\n.. _`issue 5 on collective.geo.geographer`: https://github.com/collective/collective.geo.geographer/issues/5", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://plone.org/products/collective.geo", "keywords": "Zope Plone GIS KML Google Maps Bing OpenLayers", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "collective.geo.geographer", "package_url": "https://pypi.org/project/collective.geo.geographer/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.geo.geographer/", "project_urls": { "Homepage": "http://plone.org/products/collective.geo" }, "release_url": "https://pypi.org/project/collective.geo.geographer/2.1/", "requires_dist": null, "requires_python": "", "summary": "Geographic annotation for Plone", "version": "2.1" }, "last_serial": 2423484, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "e98e44b3e3d2268764c1464fe49ded49", "sha256": "0f8def2c38dbd297c29bcbd9fd75c283effedda932d19904013c7bf12df67aed" }, "downloads": -1, "filename": "collective.geo.geographer-0.1.tar.gz", "has_sig": false, "md5_digest": "e98e44b3e3d2268764c1464fe49ded49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13299, "upload_time": "2010-10-31T00:59:11", "url": "https://files.pythonhosted.org/packages/78/e5/9f8e98d52eed71466da73dbe9d2506262be42f23fcd01e22027a7f410101/collective.geo.geographer-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "1693c6fa7c25fb04d7072cd58697a5a9", "sha256": "6b5cb777b10c3faaaf58b985f412c32c083a3436c6948f64ef60375fb46a56a7" }, "downloads": -1, "filename": "collective.geo.geographer-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1693c6fa7c25fb04d7072cd58697a5a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13346, "upload_time": "2010-11-13T12:10:32", "url": "https://files.pythonhosted.org/packages/ef/4c/8fafae29538db799c020d95ce4916f42f11b8ddc4540a5523d546ed91727/collective.geo.geographer-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "0422127fa388f328681b467386f8943b", "sha256": "5b91c9d563a045a3c932e89390429e25a497bf9f73116d8765f1c8c3e4f8947b" }, "downloads": -1, "filename": "collective.geo.geographer-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0422127fa388f328681b467386f8943b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13465, "upload_time": "2010-12-28T12:13:42", "url": "https://files.pythonhosted.org/packages/f4/12/38fa4f1a251df5272125ce3dac6cc4a8497a9dfe19ac0b781ea827e81799/collective.geo.geographer-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "bf02ec320cee2599fe32ee9c9d55bb30", "sha256": "8ff293a7fab15d71e9cac6a9fb1466df65e185527883f76a77d2db0141f0672a" }, "downloads": -1, "filename": "collective.geo.geographer-0.1.3.tar.gz", "has_sig": false, "md5_digest": "bf02ec320cee2599fe32ee9c9d55bb30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13649, "upload_time": "2011-09-05T09:03:52", "url": "https://files.pythonhosted.org/packages/be/a2/1b8acd6afbe3789cf065e4c7ef5c9d4cbce6bfa20242af72b050e548d573/collective.geo.geographer-0.1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "dd094bada4015cc623973ded6e7166d5", "sha256": "d148dc899530f47f6ce92bb601590c8cc417532f41d641fe86608a38c26ad5f8" }, "downloads": -1, "filename": "collective.geo.geographer-1.4.tar.gz", "has_sig": false, "md5_digest": "dd094bada4015cc623973ded6e7166d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15390, "upload_time": "2012-02-11T14:58:58", "url": "https://files.pythonhosted.org/packages/de/a4/ab27942d52df80d725dd031b161c48d4de0c100196273777fe615ea8c9f5/collective.geo.geographer-1.4.tar.gz" } ], "1.5": [ { "comment_text": "", "digests": { "md5": "14f817272892927a1e2672d7c18e02b6", "sha256": "028d5b508689e08d02f24c54b45d921cfd890e4d1e689276cdf0e3d717736cbf" }, "downloads": -1, "filename": "collective.geo.geographer-1.5.zip", "has_sig": false, "md5_digest": "14f817272892927a1e2672d7c18e02b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36042, "upload_time": "2013-01-28T22:05:21", "url": "https://files.pythonhosted.org/packages/2e/09/fe28dc640a4f0fa0ae528d068391987f54fecf72df52153e98d35a5e26be/collective.geo.geographer-1.5.zip" } ], "1.6": [ { "comment_text": "", "digests": { "md5": "b8fdda07bce36382823d738100c49883", "sha256": "69ab14a2788805290b30a84f728e95bd008c05fd5a1e574f8ba47274f324b9db" }, "downloads": -1, "filename": "collective.geo.geographer-1.6.zip", "has_sig": false, "md5_digest": "b8fdda07bce36382823d738100c49883", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40324, "upload_time": "2013-01-28T22:19:16", "url": "https://files.pythonhosted.org/packages/c8/10/2c6f8b90b65b9864d4368207ff196b6f76abf805de4598af1798b6a66f66/collective.geo.geographer-1.6.zip" } ], "1.7": [ { "comment_text": "", "digests": { "md5": "0ea56da10503a4ca6f50a9eea9eb2072", "sha256": "b1d52e306ef523ad14e1213bf4ee8ffe64978be61eaab878b43c6245802c301a" }, "downloads": -1, "filename": "collective.geo.geographer-1.7.zip", "has_sig": false, "md5_digest": "0ea56da10503a4ca6f50a9eea9eb2072", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41908, "upload_time": "2013-04-11T06:57:48", "url": "https://files.pythonhosted.org/packages/3f/f9/a5aed1c058020c83c4e8b18877881f1c1892514ffb5d95fc44d9573de7e2/collective.geo.geographer-1.7.zip" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "afb00f5413edcd740f0ff0721140534e", "sha256": "132a6bc78395f417e730408dfc170d0d56040a06f6d5e8d822225a9c802b977a" }, "downloads": -1, "filename": "collective.geo.geographer-2.0.zip", "has_sig": false, "md5_digest": "afb00f5413edcd740f0ff0721140534e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39204, "upload_time": "2013-10-29T22:36:14", "url": "https://files.pythonhosted.org/packages/00/60/2f7e3a6456d4b90999e668c562013c9a4c6ddb1ef62f3009ba7d1e6eaf18/collective.geo.geographer-2.0.zip" } ], "2.0b1": [ { "comment_text": "", "digests": { "md5": "924893b4ab052408155a239622dc3011", "sha256": "9935edef4b051a588884b7d7eac44197ffd013f240964753f13232e1238b7437" }, "downloads": -1, "filename": "collective.geo.geographer-2.0b1.zip", "has_sig": false, "md5_digest": "924893b4ab052408155a239622dc3011", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38998, "upload_time": "2013-06-02T16:59:57", "url": "https://files.pythonhosted.org/packages/d5/a7/4af53f3b6fbfcd07a5464491aa9462857769a1e88ca0fd99a69cfb25accf/collective.geo.geographer-2.0b1.zip" } ], "2.1": [ { "comment_text": "", "digests": { "md5": "70b4547abd954efd6cfa22694b8180c8", "sha256": "3895df92447e18e4b73c9848654f5b62cd0cc9eaab1a0efffa812fc682322700" }, "downloads": -1, "filename": "collective.geo.geographer-2.1.tar.gz", "has_sig": false, "md5_digest": "70b4547abd954efd6cfa22694b8180c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24797, "upload_time": "2016-10-26T06:16:54", "url": "https://files.pythonhosted.org/packages/d2/bb/ab1a1eb35bdc44ae3438cf26c90d3cab066448e984f550f794660b2e76ae/collective.geo.geographer-2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "70b4547abd954efd6cfa22694b8180c8", "sha256": "3895df92447e18e4b73c9848654f5b62cd0cc9eaab1a0efffa812fc682322700" }, "downloads": -1, "filename": "collective.geo.geographer-2.1.tar.gz", "has_sig": false, "md5_digest": "70b4547abd954efd6cfa22694b8180c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24797, "upload_time": "2016-10-26T06:16:54", "url": "https://files.pythonhosted.org/packages/d2/bb/ab1a1eb35bdc44ae3438cf26c90d3cab066448e984f550f794660b2e76ae/collective.geo.geographer-2.1.tar.gz" } ] }