GeoFormAlchemy v.0.1


GeoFormAlchemy is a FormAlchemy extension that makes it possible to generate forms for model classes that use the geometry types of GeoAlchemy.InstallationInstalling using easy_install:easy_install geoformalchemyManual installation for development:Download the source code as archive or clone the GIT repository:git clone GeoFormAlchemyThen run the setup:cd GeoFormAlchemy/GeoFormAlchemypython developUsage in Pylons applicationsGeoFormAlchemy includes a Paster Pylons template that builds upon FormAlchemy's administration interface for Pylons.If you want to use GeoFormAlchemy in your Pylons application, run paster create with the GeoFormAlchemy template:$ paster create -t geo_fa your_app[..]Enter admin_controller (Add formalchemy's admin controller) [False]: TrueEnter template_engine (mako/genshi/jinja2/etc: Template language) ['mako']: makoEnter sqlalchemy (True/False: Include SQLAlchemy 0.5 configuration) [False]: True[..]Then the GeoFormAlchemy extension has to be activated. Open the file your_app/forms/ and add the following lines at the end of the file:# [..]from geoformalchemy.base import GeometryFieldRendererfrom geoalchemy import geometryFieldSet.default_renderers[geometry.Geometry] = GeometryFieldRendererGeoFormAlchemy is now set up and a map will be displayed in the forms for your geometry fields. Note that you will have to tell FormAlchemy for which model classes it should create forms. To do so import your model classes in the file your_app/model/ For more information please refer to the FormAlchemy documentation.ConfigurationField modificationsThe rendering of geometry fields can be customized with additional options. For example the following statement called on the field the_geom of the custom FieldSet changes the background map (inside the file your_app/forms/ = FieldSet(model.places.Place)Place.the_geom.set(options=[ ('map_srid', 900913), ('base_layer', 'new OpenLayers.Layer.OSM("OSM")')])The following options are available in GeoFormAlchemy:default_lat and default_lon If the geometry is None or when creating a new geometry, the map is centered at (default_lon, default_lat). Otherwise the map is centered at the centroid of the geometry.zoom The zoom-level on start-up.map_width and map_height The size of the DIV container in which the map is displayed.base_layer The OpenLayers layer which will be used as background map, for example: ('base_layer', 'new OpenLayers.Layer.OSM("OSM")')map_srid If the map uses a different CRS than the geometries, the geometries will be reprojected to this CRS. For example: ('map_srid', 900913)openlayers_lib The path to the OpenLayers javascript library, for example if OpenLayers.js is located at your_app/public/js/lib/OpenLayers.js use the following path: ('openlayers_lib', '/js/lib/OpenLayers.js')show_map (default: True) If show_map is set to False, the geometry will be displayed as WKT string inside a text input field.Template filesIf you want to change the look of your forms, you can modify the template files used by FormAlchemy and GeoFormAlchemy. The template files are located in the folder your_app/templates/forms.GeoFormAlchemy uses the template files map_js.mako and map.mako. In map.mako you can set most of the options that you can also use as field modification. But unlike to field modifications, the options set in the template file are used for the geometry fields of all models, whereas the options set as field modification are only used for the field they were set on.If you want to customize the OpenLayers map, for example to add a further OpenLayers control or to add a second background layer, modify the file map_js.mako.#md5=9dd6043d7566fb993dd2e6af009ee82f

GeoFormAlchemy is a FormAlchemy extension that ... A extension for FormAlchemy that adds support for spatial databases ...

  • GeoFormAlchemy
  • 0.1
  • Camptocamp SA
  • Linux
  • Freeware
  • 10 Kb
  • 150
  • Free

Review GeoFormAlchemy

  • captcha
New Miscellaneous software
  • SocialMedia driven App Developer  v.2.72If you could look 1 year ahead, would you want to see? The SocialMedia driven App Developer is calculating your Shareware's Success. Fine-tune as many cost-driving parameters as you want. See revenue and net profit results displayed over 48 months.
  • InstallAware Free Installer  v.X6InstallAware's new Free Installer runs inside Visual Studio and creates setups automatically, by scanning your loaded solutions for dependencies and output files, and including them in your setup. This special edition of InstallAware is freeware!
  • Metamill  v.8.1.1921Metamill is a professional UML modeling tool. Supports UML 2.4 standard. All 14 UML diagrams supported. Round-trip engineering for Python, ADA, Java, C, C++, C# and VB.Net. RTF and HTML document generation.
  • Help+Manual  v.7.3.2Help+Manual is a stand-alone authoring tool with an integrated WYSIWYG editor. Working with Help+Manual is as easy as writing text with a word processor. Try yourself and download Help+Manual! Writing help has never been easier.
  • Bu for linux  v.0.1A microscopic build system ...
  • Thunkapi  v.0.1.0Python library for the thunk.