A conceptual, logical, and archetype data model for the Smart Readiness Indicator (SRI). The project extends CityGML via an Application Domain Extension (ADE) and integrates with Django to provide a REST API and GIS-based web application.
The concept is illustrated in the following figure:
The project consists of four main components:
- SRI Data Model: Defines the data structure for SRI and functionality levels.
- Digital Archetypes: Predefined building configurations for different SRI levels.
- CityGML & 3DCityDB Extension: Enhances CityGML with an ADE for SRI.
- Django App & API: Provides an installable Django app to manage and query SRI-related data.
django-sri is an extension for CityGML and 3DCityDB, allowing for the integration of SRI-related data into a Django-based environment. It is compliant with the 3DCityDB schema and ADE specifications, and enables:
- Storage of mapped SRI data and functionality levels
- REST API for querying CityGML objects with SRI extensions
- Django templates and static JavaScript for GIS-based web applications
To run this app, you need:
- PostgreSQL with PostGIS
- InfluxDB (for time-series data if required)
- Django environment
As a reference for setting up dependencies, you can use vDistrict, which includes detailed installation instructions for databases and the Django environment.
git clone [SSH-Key/Https]pip install -e [Path/to/your/django-sri/Clone]Add sridb to your INSTALLED_APPS in settings.py:
INSTALLED_APPS = [
...
'sridb',
]Include sri URLs in your urls.py:
from django.urls import include, path
urlpatterns = [
path('sridb/', include('sridb.urls')),
]Run database migrations (Necessary for relationship in joint table!):
python manage.py migrate sridb --fake-initial
python manage.py makemigrations sridb
python manage.py migrateVerify installation:
python manage.py runserverAccess at: http://127.0.0.1:8000/sri/
The django-sri module includes archetype definitions to automatically configure buildings based on their SRI levels.
- Upload service catalog from a SRI catalogue with
python manage.py populate_service_catalog <path_to_catalogue> <building_id> - Upload assessment from Service sheet v4.5 with
python manage.py upload_builiding <path_to_catalogue> <building_id> - Create digital archetypes with
python manage.py create_archetype <path_to_catalogue> <building_id>
This module extends CityGML with an ADE for SRI-related information.
from citygml.generate_citygml import generate_citygml
citygml_data = generate_citygml("B123")
print(citygml_data)This is version 0.1.0.
Thanks for contributing! Please follow our contribution guide.
This project is licensed under MIT License.
django-sri has been developed within public-funded projects with financial support by BMWk (German Federal Ministry for Economic Affairs and Climate Action) and the Institute for Energy Efficient Buildings and Indoor Climate.

