1. Installation¶
You can use JunctionArt as an intersection and road generator, or you can use it as a library to build features upon. Both needs the package to be installed. You can install it from the source or the pypi package. To view the roads, you need a tool like esmini or Mathworks Roadrunner. Many of our test codes are integrated with esmini odrplot.
Python version: Works in python 3.7.9. There are some internal python library issues with 3.7.11.
There are some libraries that may face permission errors. In such cases, run your terminal in administrator mode
1.1. To use our generatiors in your project¶
Install via PIP
pip install junctionart
(Optional) Install https://trac.osgeo.org/osgeo4w/ for analysis tools
Read the User Manual
1.2. Extending JunctionArt¶
Extending JunctionArt requires installing the source and installing poetry to publish in the PyPi repository.
1.2.1. Installing from source¶
Clone the repository from https://github.com/AugmentedDesignLab/junction-art
Install poetry and conda https://python-poetry.org/docs/ https://www.anaconda.com/
Go to the root folder of the junction-art. Create a new virtual environment with conda.
Run these commands in order
poetry config virtualenvs.create false --local
conda env update -f requirements.yml --prune
pip install --upgrade pip
conda install -c conda-forge shapely
conda install -c conda-forge matplotlib
conda install -c conda-forge tabulate
conda install -c conda-forge psutil
conda install -c conda-forge scikit-spatial
poetry install
OR
poetry config virtualenvs.create false --local
pip install -r requirements-pip.txt
pip install --upgrade pip
conda install -c conda-forge shapely
conda install -c conda-forge matplotlib
conda install -c conda-forge tabulate
conda install -c conda-forge psutil
conda install -c conda-forge scikit-spatial
poetry install
If you are going to use the analysis tools, you need to make sure libgeos_c is installed (the conda install -c conda-forge shapely command should install it by default.)
1.2.2. Option 1: Install via conda (recommended)¶
Activate or create a conda environment for the project with python 3.7+
Put the name of your environment in the first line of requirements.yml file (located in the root).
name: your_env_name
and run:
$ conda env update -f requirements.yml --prune
–prune
Remove –prune if you need the existing python packages installed in your environment.
1.2.3. Option 2: Install via pip¶
$ pip install -r requirements-pip.txt