django-geostore


Namedjango-geostore JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/Terralego/django-geostore.git
SummaryDjango geographic store and vector tile generation
upload_time2024-01-12 14:40:52
maintainer
docs_urlNone
authorMakina Corpus
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            [![Build Status](https://travis-ci.org/Terralego/django-geostore.svg?branch=master)](https://travis-ci.org/Terralego/django-geostore/)
[![codecov](https://codecov.io/gh/Terralego/django-geostore/branch/master/graph/badge.svg)](https://codecov.io/gh/Terralego/django-geostore)
[![Maintainability](https://api.codeclimate.com/v1/badges/b6119d8175fa6f5f5949/maintainability)](https://codeclimate.com/github/Terralego/django-geostore/maintainability)
[![Documentation Status](https://readthedocs.org/projects/django-geostore/badge/?version=latest)](https://django-geostore.readthedocs.io/en/latest/?badge=latest)

![Python Version](https://img.shields.io/badge/python-%3E%3D%203.6-blue.svg)
![Django Version](https://img.shields.io/badge/django-%3E%3D%202.2-blue.svg)

# django-geostore

Dynamic geographic datastore with Vector Tiles generation from PostGIS and json schema definition and validation.

## Functions

* Geographic layer management
* Add and manage geographic features on layers
* Manage feature properties with JSON schema
* Import and export data
* Generate GeoJSON and MapBox Vector Tile on single or group of layers
* Full management API available
* Optional PGRouting capabilities with plugin django-geostore-routing

## Requirements

### General

* Python 3.6+
* Postgresql 10+
* PostGIS 2.4+

Optionnal to use PgRouting functionnalities :
  * PgRouting 2.5+ and django-geostore-routing

### Libraries

these are debian packages required

- libpq-dev   (psycopg2)
- gettext     (translations)
- binutils    (django.contrib.gis)
- libproj-dev (django.contrib.gis)
- gdal-bin    (django.contrib.gis)

recommended

- postgresql-client (if you want to use ./manage.py dbshell command)

## Installation

### from PYPI

```bash
pip install django-geostore
```

### from GitHub

```bash
git clone https://github.com/Terralego/django-geostore.git
cd django-geostore
python3 setup.py install
```

### in your project settings

```python
INSTALLED_APPS = (
    'geostore',
)
```

## Development

### with docker :
```bash
docker-compose build
docker-compose up
docker-compose run web ./manage.py test
```

### with pip :
```bash
python3.6 -m venv venv
source activate venv/bin/activate
pip install -e .[dev]
```


CHANGELOG
=========

1.0.0          (2024-01-12)
---------------------------

* Add support for django 5.0
* Add support for python 3.12
* Improve TileJSON and Tile cache keys


0.8.0          (2023-09-08)
---------------------------

* Works with fiona >= 1.9
* Add support for django 5.0
* Add support for python 3.12


0.7.3          (2023-04-17)
---------------------------

* Support django 4.2
* Allow layer access with group limit to superusers
* Drop django 2.2 and python 3.6 support


0.7.2          (2023-03-06)
---------------------------

* Allow dates and objects in feature properties by using DjangoJSONEncoder


0.7.1          (2023-03-03)
---------------------------

* Set default zoom levels to 0-23
* Limit Fiona version < 1.9 until fix


0.7.0          (2022-12-09)
---------------------------

* Don't limit psycopg2 version in setup.py
* Add migration check in CI

0.6.9          (2022-11-22)
---------------------------

* Support python 3.10 and django 4.1


0.6.8          (2022-07-04)
---------------------------

* Add layer extent endpoint

0.6.7          (2022-02-21)
---------------------------

* Change distance relation calculation with dwithin

0.6.6          (2022-02-11)
---------------------------

* Add relations in vector tiles

0.6.5          (2021-10-13)
---------------------------

* Fix missing migration


0.6.4          (2021-10-06)
---------------------------

* Fix shapefile export


0.6.3          (2021-10-05)
---------------------------

* Improve performances relations


0.6.2          (2021-10-04)
---------------------------

* Fix email link causing scam-alerts in some email clients


0.6.1          (2021-04-30)
---------------------------

* Improve performances relations


0.6.0          (2021-04-30)
---------------------------

!! WARNING - BREAKING CHANGES !!

* Add constraint extra geom empty / is_valid. Check that your feature extra geometries are not empty or invalid before using this version


0.5.8          (2021-04-30)
---------------------------

* Add format geojson relations


0.5.7          (2020-12-11)
---------------------------

* Include translation files in pypi releases.


0.5.6          (2020-12-11)
---------------------------

* Fix and include translations
* Fix template export mail with hyperlink


0.5.5          (2020-12-10)
---------------------------

* Fix templates not included in setup.py sdist
* Fix save generation export file


0.5.4          (2020-12-01)
---------------------------

* Add endpoint to get all distinct values of any layer property

0.5.3          (2020-11-16)
---------------------------

* Use get_username() to keep compatibility with custom User model
* Revert shape file url generation


0.5.2          (2020-11-06)
---------------------------

* Add functions to export layers in shape / geojson / kml in async mode with a celery worker. User should have email to receive link to download export.


0.5.1          (2020-10-28)
---------------------------

* BugFix on Polygon Vector tiles
* Improve documentation


0.5.0          (2020-10-27)
---------------------------

!! WARNING - BREAKING CHANGES !!

Features with empty geometry will not pass anymore Integrity Error Check
Please, check and fix you geostore_feature table first before making migrations


* Add constraint empty geometries
* Add validation of constraints on geometries


* geostore.routing has been extracted to django-geostore-routing
  * add django-geostore-routing to your project dependencies
  * add geostore_routing to you INSTALLED_APPS instead of geostore.routing
* Add relation property to handle relations directly in feature
* Force geometries 2d

* Improve tile generation


0.4.3          (2020-10-09)
---------------------------

* Fix settings used by renderers


0.4.2          (2020-10-06)
---------------------------

* Fix geometry file labels in feature serializer


0.4.1          (2020-10-02)
---------------------------

* Add KML and GPX renderers


0.4.0          (2020-09-02)
---------------------------

* WARNING Breaking Changes !!
  * to continue to use PGRouting features, please add geostore.routing to INSTALLED_APPS
  * Some changes in routing API response. Now final geometry and full feature segment list are provided by API
  * Configurable tolerance for routing topologies (Default value from 0.0001 to 0.00001)
  * HOSTNAME setting is deprecated. Default request HOST is now used to generate absolute full urls for vector tiles.
You can set TERRA_TILES_HOSTNAMES = [HOSTNAME, ] to avoid this

* Improvements :
  * Officially support django 3.1
  * Set HOSTNAME or TERRA_TILES_HOSTNAMES is not required anymore. Now full absolute urls are prefixed with current host request
  * Installing PGRouting is not required anymore.
  * source / target routing attributes :
    * add indexes
    * Hide by default (editable=False)
  * Using JSONField from django.db.models
  * Updating DjangoModelFactory location


0.3.19         (2020-06-25)
---------------------------

* WARNING : Ordering and Searching in feature properties are disabled for layers without schema.
* OPTIMIZATIONS : Improve API feature by disabling big queries to find layer's properties
* Fix duplicated index

0.3.18         (2020-06-24)
---------------------------

* Improve database indexes

0.3.17         (2020-03-04)
---------------------------

* Factorize Feature Extra Geom serializer to be customized directly in ViewsSet


0.3.16         (2020-01-27)
---------------------------

* Manage relations between layers and features (manual / intersections or distances).
* GeoJson renderer. Now API can render .json or .geojson endpoint (or format=?geojson)
* Partial properties patch. A patch on feature viewset keep properties not sended.
* Add Json value search filter in FeatureViewset


0.3.15         (2019-12-13)
---------------------------

* support django rest framework 3.11


0.3.14         (2019-12-11)
---------------------------

* Officially support django 3.0
* Add possibility to modify, create, update, delete extra geometries
* Add field editable to extra layers


0.3.13         (2019-12-09)
---------------------------

* Order extra geometries by layer


0.3.12         (2019-12-03)
---------------------------

Improves

* Improve documentation

Features

* Ability to define and package extra geometries for features (One to One)


0.3.11    (2019-11-05)
---------------------------

Fixes

* Prevent token group id decoding error


0.3.10         (2019-10-16)
---------------------------

News

* Ability to sort API feature results with property key content

Fixes

* Add missing migration file


0.3.9      (2019-10-15)
----------------------------

* Admin part is removed. Please use your own admin in project.
* DRF yasg is removed. Configure it in your project if required.
* Add authentication management on layers


0.3.8      (2019-10-11)
----------------------------

### Fixes

* Add permission management on FeatureViewset

0.3.7      (2019-10-09)
----------------------------

### Fixes

* Fix tilejson's layer attribution and description parsing

0.3.6      (2019-10-09)
----------------------------

### Fixes

* Fix tilejson when Layer has no Feature
* Fix deprecation warning : "ST_Line_Substring signature was deprecated in 2.1.0. Please use ST_LineSubstring"
* Fix tile generation when no feature is present in the layer
* Fix permission management of layers

0.3.5      (2019-10-03)
-----------------------

### News

* Add a method to get json schema property type by its name

### Fixes

* Fix bug with shapefile export on geometry defined layer.
* Fix group's tiles URLs in tilejson
* Fix tilejson when Layer has no Feature
* Return a tilejson even if it has no feature


0.3.4      (2019-09-26)
-----------------------

### Fixes

* integrate test/factories in packaging


0.3.3      (2019-09-25)
-----------------------

### Breaking Changes with front

* key to access tilejson is changed from 'layer_tilejson' and 'group_tilejson' to 'tilejson' in both cases.

### Fix

* Fix migration file that prevent old terracommon app migration


0.3.2      (2019-09-24)
-----------------------

### Fix

* Fix migration file that prevent old terracommon app migration


0.3.1      (2019-09-11)
-----------------------

### Breaking Changes

* App name move from terra to geostore. Structure is the same, so backup and restore your data


0.3.0      (2019-09-09)
-----------------------

First public tag

* Terra app extracted from terracommon.terra
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Terralego/django-geostore.git",
    "name": "django-geostore",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Makina Corpus",
    "author_email": "terralego-pypi@makina-corpus.com",
    "download_url": "https://files.pythonhosted.org/packages/5e/24/87419a028d4c180c515ac277d283d876c5fd39493bbab79732b2ab72d332/django-geostore-1.0.0.tar.gz",
    "platform": null,
    "description": "[![Build Status](https://travis-ci.org/Terralego/django-geostore.svg?branch=master)](https://travis-ci.org/Terralego/django-geostore/)\n[![codecov](https://codecov.io/gh/Terralego/django-geostore/branch/master/graph/badge.svg)](https://codecov.io/gh/Terralego/django-geostore)\n[![Maintainability](https://api.codeclimate.com/v1/badges/b6119d8175fa6f5f5949/maintainability)](https://codeclimate.com/github/Terralego/django-geostore/maintainability)\n[![Documentation Status](https://readthedocs.org/projects/django-geostore/badge/?version=latest)](https://django-geostore.readthedocs.io/en/latest/?badge=latest)\n\n![Python Version](https://img.shields.io/badge/python-%3E%3D%203.6-blue.svg)\n![Django Version](https://img.shields.io/badge/django-%3E%3D%202.2-blue.svg)\n\n# django-geostore\n\nDynamic geographic datastore with Vector Tiles generation from PostGIS and json schema definition and validation.\n\n## Functions\n\n* Geographic layer management\n* Add and manage geographic features on layers\n* Manage feature properties with JSON schema\n* Import and export data\n* Generate GeoJSON and MapBox Vector Tile on single or group of layers\n* Full management API available\n* Optional PGRouting capabilities with plugin django-geostore-routing\n\n## Requirements\n\n### General\n\n* Python 3.6+\n* Postgresql 10+\n* PostGIS 2.4+\n\nOptionnal to use PgRouting functionnalities :\n  * PgRouting 2.5+ and django-geostore-routing\n\n### Libraries\n\nthese are debian packages required\n\n- libpq-dev   (psycopg2)\n- gettext     (translations)\n- binutils    (django.contrib.gis)\n- libproj-dev (django.contrib.gis)\n- gdal-bin    (django.contrib.gis)\n\nrecommended\n\n- postgresql-client (if you want to use ./manage.py dbshell command)\n\n## Installation\n\n### from PYPI\n\n```bash\npip install django-geostore\n```\n\n### from GitHub\n\n```bash\ngit clone https://github.com/Terralego/django-geostore.git\ncd django-geostore\npython3 setup.py install\n```\n\n### in your project settings\n\n```python\nINSTALLED_APPS = (\n    'geostore',\n)\n```\n\n## Development\n\n### with docker :\n```bash\ndocker-compose build\ndocker-compose up\ndocker-compose run web ./manage.py test\n```\n\n### with pip :\n```bash\npython3.6 -m venv venv\nsource activate venv/bin/activate\npip install -e .[dev]\n```\n\n\nCHANGELOG\n=========\n\n1.0.0          (2024-01-12)\n---------------------------\n\n* Add support for django 5.0\n* Add support for python 3.12\n* Improve TileJSON and Tile cache keys\n\n\n0.8.0          (2023-09-08)\n---------------------------\n\n* Works with fiona >= 1.9\n* Add support for django 5.0\n* Add support for python 3.12\n\n\n0.7.3          (2023-04-17)\n---------------------------\n\n* Support django 4.2\n* Allow layer access with group limit to superusers\n* Drop django 2.2 and python 3.6 support\n\n\n0.7.2          (2023-03-06)\n---------------------------\n\n* Allow dates and objects in feature properties by using DjangoJSONEncoder\n\n\n0.7.1          (2023-03-03)\n---------------------------\n\n* Set default zoom levels to 0-23\n* Limit Fiona version < 1.9 until fix\n\n\n0.7.0          (2022-12-09)\n---------------------------\n\n* Don't limit psycopg2 version in setup.py\n* Add migration check in CI\n\n0.6.9          (2022-11-22)\n---------------------------\n\n* Support python 3.10 and django 4.1\n\n\n0.6.8          (2022-07-04)\n---------------------------\n\n* Add layer extent endpoint\n\n0.6.7          (2022-02-21)\n---------------------------\n\n* Change distance relation calculation with dwithin\n\n0.6.6          (2022-02-11)\n---------------------------\n\n* Add relations in vector tiles\n\n0.6.5          (2021-10-13)\n---------------------------\n\n* Fix missing migration\n\n\n0.6.4          (2021-10-06)\n---------------------------\n\n* Fix shapefile export\n\n\n0.6.3          (2021-10-05)\n---------------------------\n\n* Improve performances relations\n\n\n0.6.2          (2021-10-04)\n---------------------------\n\n* Fix email link causing scam-alerts in some email clients\n\n\n0.6.1          (2021-04-30)\n---------------------------\n\n* Improve performances relations\n\n\n0.6.0          (2021-04-30)\n---------------------------\n\n!! WARNING - BREAKING CHANGES !!\n\n* Add constraint extra geom empty / is_valid. Check that your feature extra geometries are not empty or invalid before using this version\n\n\n0.5.8          (2021-04-30)\n---------------------------\n\n* Add format geojson relations\n\n\n0.5.7          (2020-12-11)\n---------------------------\n\n* Include translation files in pypi releases.\n\n\n0.5.6          (2020-12-11)\n---------------------------\n\n* Fix and include translations\n* Fix template export mail with hyperlink\n\n\n0.5.5          (2020-12-10)\n---------------------------\n\n* Fix templates not included in setup.py sdist\n* Fix save generation export file\n\n\n0.5.4          (2020-12-01)\n---------------------------\n\n* Add endpoint to get all distinct values of any layer property\n\n0.5.3          (2020-11-16)\n---------------------------\n\n* Use get_username() to keep compatibility with custom User model\n* Revert shape file url generation\n\n\n0.5.2          (2020-11-06)\n---------------------------\n\n* Add functions to export layers in shape / geojson / kml in async mode with a celery worker. User should have email to receive link to download export.\n\n\n0.5.1          (2020-10-28)\n---------------------------\n\n* BugFix on Polygon Vector tiles\n* Improve documentation\n\n\n0.5.0          (2020-10-27)\n---------------------------\n\n!! WARNING - BREAKING CHANGES !!\n\nFeatures with empty geometry will not pass anymore Integrity Error Check\nPlease, check and fix you geostore_feature table first before making migrations\n\n\n* Add constraint empty geometries\n* Add validation of constraints on geometries\n\n\n* geostore.routing has been extracted to django-geostore-routing\n  * add django-geostore-routing to your project dependencies\n  * add geostore_routing to you INSTALLED_APPS instead of geostore.routing\n* Add relation property to handle relations directly in feature\n* Force geometries 2d\n\n* Improve tile generation\n\n\n0.4.3          (2020-10-09)\n---------------------------\n\n* Fix settings used by renderers\n\n\n0.4.2          (2020-10-06)\n---------------------------\n\n* Fix geometry file labels in feature serializer\n\n\n0.4.1          (2020-10-02)\n---------------------------\n\n* Add KML and GPX renderers\n\n\n0.4.0          (2020-09-02)\n---------------------------\n\n* WARNING Breaking Changes !!\n  * to continue to use PGRouting features, please add geostore.routing to INSTALLED_APPS\n  * Some changes in routing API response. Now final geometry and full feature segment list are provided by API\n  * Configurable tolerance for routing topologies (Default value from 0.0001 to 0.00001)\n  * HOSTNAME setting is deprecated. Default request HOST is now used to generate absolute full urls for vector tiles.\nYou can set TERRA_TILES_HOSTNAMES = [HOSTNAME, ] to avoid this\n\n* Improvements :\n  * Officially support django 3.1\n  * Set HOSTNAME or TERRA_TILES_HOSTNAMES is not required anymore. Now full absolute urls are prefixed with current host request\n  * Installing PGRouting is not required anymore.\n  * source / target routing attributes :\n    * add indexes\n    * Hide by default (editable=False)\n  * Using JSONField from django.db.models\n  * Updating DjangoModelFactory location\n\n\n0.3.19         (2020-06-25)\n---------------------------\n\n* WARNING : Ordering and Searching in feature properties are disabled for layers without schema.\n* OPTIMIZATIONS : Improve API feature by disabling big queries to find layer's properties\n* Fix duplicated index\n\n0.3.18         (2020-06-24)\n---------------------------\n\n* Improve database indexes\n\n0.3.17         (2020-03-04)\n---------------------------\n\n* Factorize Feature Extra Geom serializer to be customized directly in ViewsSet\n\n\n0.3.16         (2020-01-27)\n---------------------------\n\n* Manage relations between layers and features (manual / intersections or distances).\n* GeoJson renderer. Now API can render .json or .geojson endpoint (or format=?geojson)\n* Partial properties patch. A patch on feature viewset keep properties not sended.\n* Add Json value search filter in FeatureViewset\n\n\n0.3.15         (2019-12-13)\n---------------------------\n\n* support django rest framework 3.11\n\n\n0.3.14         (2019-12-11)\n---------------------------\n\n* Officially support django 3.0\n* Add possibility to modify, create, update, delete extra geometries\n* Add field editable to extra layers\n\n\n0.3.13         (2019-12-09)\n---------------------------\n\n* Order extra geometries by layer\n\n\n0.3.12         (2019-12-03)\n---------------------------\n\nImproves\n\n* Improve documentation\n\nFeatures\n\n* Ability to define and package extra geometries for features (One to One)\n\n\n0.3.11    (2019-11-05)\n---------------------------\n\nFixes\n\n* Prevent token group id decoding error\n\n\n0.3.10         (2019-10-16)\n---------------------------\n\nNews\n\n* Ability to sort API feature results with property key content\n\nFixes\n\n* Add missing migration file\n\n\n0.3.9      (2019-10-15)\n----------------------------\n\n* Admin part is removed. Please use your own admin in project.\n* DRF yasg is removed. Configure it in your project if required.\n* Add authentication management on layers\n\n\n0.3.8      (2019-10-11)\n----------------------------\n\n### Fixes\n\n* Add permission management on FeatureViewset\n\n0.3.7      (2019-10-09)\n----------------------------\n\n### Fixes\n\n* Fix tilejson's layer attribution and description parsing\n\n0.3.6      (2019-10-09)\n----------------------------\n\n### Fixes\n\n* Fix tilejson when Layer has no Feature\n* Fix deprecation warning : \"ST_Line_Substring signature was deprecated in 2.1.0. Please use ST_LineSubstring\"\n* Fix tile generation when no feature is present in the layer\n* Fix permission management of layers\n\n0.3.5      (2019-10-03)\n-----------------------\n\n### News\n\n* Add a method to get json schema property type by its name\n\n### Fixes\n\n* Fix bug with shapefile export on geometry defined layer.\n* Fix group's tiles URLs in tilejson\n* Fix tilejson when Layer has no Feature\n* Return a tilejson even if it has no feature\n\n\n0.3.4      (2019-09-26)\n-----------------------\n\n### Fixes\n\n* integrate test/factories in packaging\n\n\n0.3.3      (2019-09-25)\n-----------------------\n\n### Breaking Changes with front\n\n* key to access tilejson is changed from 'layer_tilejson' and 'group_tilejson' to 'tilejson' in both cases.\n\n### Fix\n\n* Fix migration file that prevent old terracommon app migration\n\n\n0.3.2      (2019-09-24)\n-----------------------\n\n### Fix\n\n* Fix migration file that prevent old terracommon app migration\n\n\n0.3.1      (2019-09-11)\n-----------------------\n\n### Breaking Changes\n\n* App name move from terra to geostore. Structure is the same, so backup and restore your data\n\n\n0.3.0      (2019-09-09)\n-----------------------\n\nFirst public tag\n\n* Terra app extracted from terracommon.terra",
    "bugtrack_url": null,
    "license": "",
    "summary": "Django geographic store and vector tile generation",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/Terralego/django-geostore.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e2487419a028d4c180c515ac277d283d876c5fd39493bbab79732b2ab72d332",
                "md5": "0c136c6d7c59aa3840d17db9d7b86ce8",
                "sha256": "d4148c99247102a06452e5495e74de8af03c1b22d9a69c0da161993a25430917"
            },
            "downloads": -1,
            "filename": "django-geostore-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0c136c6d7c59aa3840d17db9d7b86ce8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 50897,
            "upload_time": "2024-01-12T14:40:52",
            "upload_time_iso_8601": "2024-01-12T14:40:52.308910Z",
            "url": "https://files.pythonhosted.org/packages/5e/24/87419a028d4c180c515ac277d283d876c5fd39493bbab79732b2ab72d332/django-geostore-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-12 14:40:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Terralego",
    "github_project": "django-geostore",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "django-geostore"
}
        
Elapsed time: 0.18160s