No project description provided
Project description
OTLMOW-ModelBuilder
OTLMOW Project
This project aims to implement the Flemish data standard OTL (https://wegenenverkeer.data.vlaanderen.be/) in Python. It is split into different packages to reduce compatibility issues
- otlmow_model
- otlmow_modelbuilder (you are currently looking at this package)
- otlmow_converter
- otlmow_template
- otlmow_postenmapping
Installation and requirements
OTLMOW-ModelBuilder has one dependency besides the standard Python libraries: rdflib. It will be automatically installed when installing this library. Currently, you need at least Python version 3.6 to use this library.
To install the OTL MOW project into your Python project, use pip to install it:
pip install otlmow_modelbuilder
To upgrade an existing installation use:
pip install otlmow_modelbuilder --upgrade
Usage
In order to create a model, the ModelBuilder requires two Path parameters:
- otl_subset_location: the location of OTL SQLite file that is used to build the model with (this can be a subset)
- directory: the location where the model will be created
Note that the given directory will be emptied if needed.
Additionally, it is possible to also add the location of the Geometry Artefact. If used, the classes will inherit from the various geometry type classes to add validation to the property 'geometry'.
logging.basicConfig(level=logging.INFO, format='%(message)s')
current_dir = Path(__file__).parent
otl_subset_path = Path(current_dir / 'InputFiles' / 'OTL 2.6.db')
GA_file_path = Path(current_dir / 'InputFiles' / 'Geometrie_Artefact_2.6.db')
model_directory = Path(current_dir.parent.parent / 'OTLMOW-Model/otlmow_model')
ModelBuilder.build_otl_datamodel(otl_subset_location=otl_subset_path,
geometry_artefact_location=GA_file_path,
directory=model_directory)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for otlmow_modelbuilder-0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a8a0415cbf36ff3c01962f8b0e6b29cae403a0cdebb4d4373ea17a73da4b505 |
|
MD5 | 589dced4b6de7df85e86d4e0d5d41244 |
|
BLAKE2b-256 | 235a0fdd54eb25508a765fca60c11643101bd72b2fb72c734db6b53b79cdd74b |