This project is an open-source, prototype toolkit for sustainable urban design. Go check out our website. To stay updated about progress and events in the community, follow us on Twitter and subscribe to our YouTube channel. To chat with community members, check out Matrix/Riot, and if you'd like to support the project financially you can do so on OpenCollective.
Below, you can see a user-interface mockup showing the main components of the toolkit.
Our team would love for people to help out in anyway they can, right now we're looking for translators and anyone willing to help out.
If you dont have the latest version of python then do download it from here.
The GDAL project is required as a dependency of GeoDjango. GDAL enables us to handle geospatial data formats, so that we can store information about locations of points of interest in urban environments. Please ensure that you install GDAL on your system.
GDAL can be installed on Ubuntu 20.04 with the following command:
sudo apt install gdal-bin
We are using Postgres/PostGIS for the database backend. For convenience, we have included a Docker compose file that you may use to run a PostGIS container. With Docker installed on your local computer, run the following command from the project root directory in order to start up PostGIS:
docker-compose up
Note: If you are reinstalling you will need to delete the previous instance with the following command:
docker system prune
This should result in the Postgres database management system running in the background. You can connect to it using the pgAdmin graphical user interface. Navigate your web browser to at http://localhost and enter the default pgAdmin credentials:
- email: pgadmin4@pgadmin.org
- password: admin
Once logged in to pgAdmin, create a server for this project. Right click on the Servers tree item and then click Create > Server. This will open a dialog box. Use the following settings, overwriting any that are already filled in:
- Under the "General" tab:
- Name: suds
- Under the "Connection" tab:
- Host: postgres
- Username: postgres
- Password: changeme
and click Save.
Next, create a PostGIS enabled database to store OpenStreetMap data for this project. Right click on the Databases tree item under the newly created suds server and then click Create > Database. This will open another dialog box. Use the following settings: - Under the "General" tab: - Database: openstreetmap - Owner: postgres
and click Save.
Enable the PostGIS extension on the OpenStreetMap
database. With the OpenStreetMap
database highlighted in the tree, select "Query Tool" from the "Tools" drop-down menu at the top of the window. Enter the following query in the query editor and click the play-shaped "Execute" icon at the top of the editor:
CREATE EXTENSION postgis;
Finally, create another database to store projects and design patters. As above, right click on the Databases tree item under the newly created suds server and then click Create > Database. Use the following settings: - Under the "General" tab: - Database: suds - Owner: postgres
Notes: The PostGIS database service should only be used for local development purposes and not deployed to the web.
The Postgres database management system is accessible at port 5432 using the user postgres
with the password changeme
.
You can override PostGIS and pgAdmin configuration prior to running docker-compose
by creating any of the following environment variables:
POSTGRES_USER
POSTGRES_PASSWORD
PGADMIN_DEFAULT_EMAIL
PGADMIN_DEFAULT_PASSWORD
PGADMIN_LISTEN_PORT
The next step is to run through some Jupyter Notebooks that will import OpenStreetMap data into PostGIS. First, download some OpenStreetMap data in the *.shp.zip format. Then create a the following directory:
''' mkdir -p notebooks/data/OSM '''
and extract the downloaded archive into this location.
Refer to the README in the notebooks folder to run through the Notebooks.
If you wish to keep the project's python environment separate from your global environment, you should create a virtual environment
python3 -m venv env
source env/bin/activate
Use pip to install the dependencies:
pip install -r requirements.txt
Move into the Project Folder:
cd platform
Before you can run the project, you will need to set up the database by running the migrations:
./manage.py migrate
Move into the Project Folder:
cd platform
Create a new super user account:
python manage.py createsuperuser
Username: *your username*
Email address: *your email*
Password: *your password*
Password (again): *your password*
It may warn you if you use a password that is similar to your user name, or if it's too short or too common. You can bypass this warning by typing Y
and then Enter. It doesn't matter in a development environment, but be sure to use secure credentials when deploying in production.
You can run the server with
python manage.py runserver
The server will now tell you that it's running on http://127.0.0.1:8000/
You can connect to the admin interface at http://127.0.0.1:8000/admin with your newly created superuser account.
- See CONTRIBUTING.md
Twitter YouTube OpenCollective Riot/Matrix
Thanks goes to these awesome people (emoji key):
Max Thakur π π» π π π€ π§ |
Nowserep π |
Brylie Christopher Oxley π» π π π π€ π |
Pierre Grimaud π |
John Inman π» π |
rmk118 π π¨ |
This project follows the all-contributors specification. Contributions of any kind welcome!