Metadata-Version: 2.1
Name: pypn-ref-geo
Version: 1.0.0
Summary: Référentiel géographique
Home-page: https://github.com/PnX-SI/RefGeo
Maintainer: Parcs nationaux des Écrins et des Cévennes
Maintainer-email: geonature@ecrins-parcnational.fr
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE

# Référentiel géographique

Prérequis : vous devez installer l’extension postgis sur votre base de donnée.

Création et remplissage du référentiel géographique :

    python3 -m venv venv
    source venv/bin/activate
    pip install -e .
    pip install psycopg2  # for postgresql database
    export SQLALCHEMY_DATABASE_URI="postgresql://user:password@localhost:5432/database"
    alembic -x local-srid=2154 upgrade ref_geo@head
    alembic upgrade ref_geo_fr_municipalities@head  # Insertion des communes françaises
    alembic upgrade ref_geo_fr_departments@head  # Insertion des départements français
    alembic upgrade ref_geo_fr_regions@head  # Insertion des régions françaises
    alembic upgrade ref_geo_fr_regions_1970@head  # Insertion des anciennes régions françaises
    alembic upgrade ref_geo_inpn_grids_1@head  # Insertion du maillage 1×1km de l’hexagone fourni par l’INPN
    alembic upgrade ref_geo_inpn_grids_5@head  # Insertion du maillage 5×5km de l’hexagone fourni par l’INPN
    alembic upgrade ref_geo_inpn_grids_10@head  # Insertion du maillage 10×10km de l’hexagone fourni par l’INPN


