Skip to main content

THIS PACKAGE HAS BEEN DEPRECATED.

In order to use the proper flask appbuilder addon infrastructure, this package has been deprecated in favor of flask-addon-geoalchemy. This package won’t be updated.

fab_geoalchemy

Implementation of GeoAlchemy fields for Flask Appbuilder.

It automatically transforms POINT Geometry columns to widgets with a field for latitude and longitude. The goal is to add a leaflet widget and add support for line and polygon as well.

Installation

Run pip install fab-geoalchemy.

Usage

You can find examples in the unittests in the tests folder. But in short, this is what you need to do:

from fab_geoalchemy.views import GeoModelView
from fab_geoalchemy.interface import GeoSQLAInterface

class Observation(Model):
    id = Column(Integer, primary_key=True)
    name = Column(String)
    location = Column(Geometry(geometry_type='POINT', srid=4326))

    def __repr__(self):
        if self.name:
            return self.name
        else:
            return 'Person Type %s' % self.id


class ObservationView(GeoModelView):
    datamodel = GeoSQLAInterface(Observation)
    add_columns = ['name', 'location']

This will automatically create the LatLonWidget in the form, and process the data to transform the latitude and longitude values into a point geometry in the database. The srid form the column is used by the field for the conversion of the text coordinates to the geometry. No validation is done if the entered coordinates are actually valid for the specified SRID.

Release files for fab-geoalchemy 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fab-geoalchemy 0.1.6
File Size Uploaded
fab_geoalchemy-0.1.6.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fab-geoalchemy 0.1.6
File Interpreter ABI Platform
fab_geoalchemy-0.1.6-py3.5.egg Legacy Egg format - - Details

Total release size: 17.6 kB

Release files / fab_geoalchemy-0.1.6.tar.gz

Download URL fab_geoalchemy-0.1.6.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3e966f903e231d0b16c7f6a75df3954477dcd0a748fb16028376ddf56cd0fc38
BLAKE2b-256 checksum
How to use checksums
351d81c5e6076bccffcc0d218e117345cefcd39734c35750acf029a14e5c5a2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.5.2

Release files / fab_geoalchemy-0.1.6-py3.5.egg

Download URL fab_geoalchemy-0.1.6-py3.5.egg
Size 12.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
7f966b36971ab91973ac5b609ce181af26f4305c6508501ee0853972be620817
BLAKE2b-256 checksum
How to use checksums
9a9652888168a6b097b60a36e104df08b98c29f61d2e1e84adafee53f1ee0f91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.5.2

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page