{ "info": { "author": "Camptocamp", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Pylons", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: User Interfaces", "Topic :: Text Processing :: Markup :: HTML" ], "description": "==============\nGeoFormAlchemy\n==============\n\nGeoFormAlchemy is an extension for `FormAlchemy `_\nthat makes it possible to generate forms for model classes that use the geometry types of\n`GeoAlchemy2 `_.\n\nRequirements\n------------\n\nRequires FormAlchemy and GeoAlchemy2.\n\nInstallation\n------------\n\n**Installing using easy_install**::\n\n $ easy_install geoformalchemy2\n\n**Manual installation for development**:\n\nDownload the source code as `archive `_\nor clone the GIT repository::\n\n git clone http://github.com/camptocamp/GeoFormAlchemy.git GeoFormAlchemy\n\nThen run the setup::\n\n cd GeoFormAlchemy/GeoFormAlchemy\n python setup.py develop\n\nUsage in Pylons applications\n----------------------------\n\nGeoFormAlchemy includes a Paster `Pylons template `_\nthat builds upon `FormAlchemy's administration interface `_\nfor Pylons.\n\nIf you want to use GeoFormAlchemy in your Pylons application, run ``paster create`` with the\nGeoFormAlchemy template::\n\n $ paster create -t geo_fa your_app\n [..]\n Enter admin_controller (Add formalchemy's admin controller) [False]: True\n Enter template_engine (mako/genshi/jinja2/etc: Template language) ['mako']: mako\n Enter sqlalchemy (True/False: Include SQLAlchemy 0.5 configuration) [False]: True\n [..]\n\nThen the GeoFormAlchemy extension has to be activated. Open the file ``your_app/forms/__init__.py`` and\nadd the following lines at the end of the file::\n\n # [..]\n\n from geoformalchemy.base import GeometryFieldRenderer\n from geoalchemy import geometry\n FieldSet.default_renderers[geometry.Geometry] = GeometryFieldRenderer\n\nGeoFormAlchemy is now set up and a map will be displayed in the forms for your geometry fields. Note that\nyou will have to tell FormAlchemy for which model classes it should create forms. To do so import your model\nclasses in the file ``your_app/model/__init__.py``. For more information please refer to the `FormAlchemy documentation\n`_.\n\nConfiguration\n-------------\n\nField modifications\n~~~~~~~~~~~~~~~~~~~~\n\nThe rendering of geometry fields can be customized with additional options. For example the following statement\ncalled on the field ``the_geom`` of the custom ``FieldSet`` changes the background map (inside the file\n``your_app/forms/__init__.py``)::\n\n Place = FieldSet(model.places.Place)\n Place.the_geom.set(options=[\n ('map_srid', 900913),\n ('base_layer', 'new OpenLayers.Layer.OSM(\"OSM\")')\n ])\n\n.. _geoformalchemy-options:\n\n**The following options are available in GeoFormAlchemy:**\n\n``default_lat`` and ``default_lon``\n If the geometry is ``None`` or when creating a new geometry, the map\n is centered at (default_lon, default_lat). Otherwise the map is centered\n at the centroid of the geometry.\n\n``zoom``\n The zoom-level on start-up.\n\n``map_width`` and ``map_height``\n The size of the ``DIV`` container in which the map is displayed.\n\n``base_layer``\n The OpenLayers layer which will be used as background map, for example::\n\n ('base_layer', 'new OpenLayers.Layer.OSM(\"OSM\")')\n\n``map_srid``\n If the map uses a different CRS than the geometries, the geometries will be\n reprojected to this CRS. For example::\n\n ('map_srid', 900913)\n\n``openlayers_lib``\n The path to the OpenLayers JavaScript library, for example if ``OpenLayers.js`` is\n located at ``your_app/public/js/lib/OpenLayers.js`` use the following path::\n\n ('openlayers_lib', '/js/lib/OpenLayers.js')\n\n``show_map`` (default: ``True``)\n If ``show_map`` is set to ``False``, the geometry will be displayed as WKT string\n inside a text input field.\n\n``insert_libs`` (default: ``True``)\n If ``insert_libs`` is set to ``False``, the OpenLayers and GeoFormAlchemy JavaScript\n libs are not loaded in the page, nor is the default CSS for GeoFormAlchemy. If\n ``insert_libs`` is set to ``False`` the application developer is responsible for\n adding script and style tags for OpenLayers and GeoFormAlchemy. You'll set\n ``insert_libs`` to ``False`` if you have multiple map fields, or if you want\n to delay the loading of the JS code until after the page is loaded.\n\n``run_js`` (default: ``True``)\n If ``run_js`` is set to ``False``, The call to\n ``geoformalchemy.init_map()`` is not done. You can call it manually with\n ``fs.render_fields['the_geom'].renderer.render_runjs()``. You'll set\n ``run_js`` to ``False`` if you want to delay the initialization of the map\n until after the page is loaded. If you want to set ``run_js`` to ``False``\n you probably also want to set ``insert_libs`` to ``False``.\n\nTemplate files\n~~~~~~~~~~~~~~~\n\nIf you want to change the look of your forms, you can modify the template files used by\nFormAlchemy and GeoFormAlchemy. The template files are located in the folder\n``your_app/templates/forms``.\n\nGeoFormAlchemy uses the template files ``map_js.mako`` and ``map.mako``. In ``map.mako`` you can set most of the\noptions that you can also use as field modification. But unlike to field modifications,\nthe options set in the template file are used for the geometry fields of all models, whereas the options\nset as field modification are only used for the field they were set on. ::\n\n <%\n # default configuration options that will be used when\n # no field options were set\n\n options = {}\n options['default_lon'] = 10\n options['default_lat'] = 45\n options['zoom'] = 4\n options['map_width'] = 512\n options['map_height'] = 256\n options['base_layer'] = 'new OpenLayers.Layer.WMS(\"WMS\", \"http://vmap0.tiles.osgeo.org/wms/vmap0\", {layers: \"basic\"})'\n options['openlayers_lib'] = 'http://openlayers.org/api/OpenLayers.js'\n\n %>\n\nIf you want to customize the OpenLayers map, for example to add a further OpenLayers control or to add a\nsecond background layer, modify the file ``map_js.mako``.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/camptocamp/GeoFormAlchemy", "keywords": "gis sqlalchemy geoalchemy formalchemy", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "GeoFormAlchemy2", "package_url": "https://pypi.org/project/GeoFormAlchemy2/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/GeoFormAlchemy2/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/camptocamp/GeoFormAlchemy" }, "release_url": "https://pypi.org/project/GeoFormAlchemy2/2.0dev3/", "requires_dist": null, "requires_python": null, "summary": "GeoFormAlchemy - a extension for FormAlchemy that adds support for spatial databases", "version": "2.0dev3" }, "last_serial": 1381112, "releases": { "2.0dev1": [ { "comment_text": "", "digests": { "md5": "6cbab6b992bee3bddd7f2304c0f37a2a", "sha256": "2af688abb480c3d806ab1cdd48abf836c6dea34efd1a256b1ce49eed1f44da6a" }, "downloads": -1, "filename": "GeoFormAlchemy2-2.0dev1.tar.gz", "has_sig": false, "md5_digest": "6cbab6b992bee3bddd7f2304c0f37a2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13320, "upload_time": "2014-12-02T10:59:41", "url": "https://files.pythonhosted.org/packages/a0/49/b757b26bd3e19c5574d68b6eb4bd98a191202abcc8e9a2b57099de8d8f1e/GeoFormAlchemy2-2.0dev1.tar.gz" } ], "2.0dev2": [ { "comment_text": "", "digests": { "md5": "5c5426464799baef87d37116cdae16a7", "sha256": "b983f89e67c25b3b488769345defca7767b31a9c612b634da9555b3f9f19bcaa" }, "downloads": -1, "filename": "GeoFormAlchemy2-2.0dev2.tar.gz", "has_sig": false, "md5_digest": "5c5426464799baef87d37116cdae16a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13332, "upload_time": "2014-12-02T13:46:12", "url": "https://files.pythonhosted.org/packages/3b/07/3ffd164baaec9f152f2e56e5d3399790c2ae822fe6c19829604d91ce7da4/GeoFormAlchemy2-2.0dev2.tar.gz" } ], "2.0dev3": [ { "comment_text": "", "digests": { "md5": "1e0deecb700415225062b67f4d6db4d7", "sha256": "25236f9fc26bf976e9086da53cbbcc3ac640c74314abaa4412642348b6705756" }, "downloads": -1, "filename": "GeoFormAlchemy2-2.0dev3.tar.gz", "has_sig": false, "md5_digest": "1e0deecb700415225062b67f4d6db4d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13498, "upload_time": "2015-01-13T17:02:03", "url": "https://files.pythonhosted.org/packages/39/6e/01e60c93b5fd9713294d10d6a3dcbceb0963137274e1d9717f869c6fbfb4/GeoFormAlchemy2-2.0dev3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1e0deecb700415225062b67f4d6db4d7", "sha256": "25236f9fc26bf976e9086da53cbbcc3ac640c74314abaa4412642348b6705756" }, "downloads": -1, "filename": "GeoFormAlchemy2-2.0dev3.tar.gz", "has_sig": false, "md5_digest": "1e0deecb700415225062b67f4d6db4d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13498, "upload_time": "2015-01-13T17:02:03", "url": "https://files.pythonhosted.org/packages/39/6e/01e60c93b5fd9713294d10d6a3dcbceb0963137274e1d9717f869c6fbfb4/GeoFormAlchemy2-2.0dev3.tar.gz" } ] }