Skip to content

Commit 35fb266

Browse files
committed
first commit
1 parent eb52b1a commit 35fb266

File tree

121 files changed

+52061
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+52061
-0
lines changed

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: gunicorn run:app

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# VAPTool
2+
![python3.x](https://img.shields.io/badge/python-3.x-brightgreen.svg)
3+
4+
Create 3d visualizations of a city in real-time and analysing data to better living world.
5+
6+
Create 3d visualizations of a city in real-time With our 3d visualisation tools you can add 3d models to world wind web and edit their size, angles of heading, pitch, roll and position in real-time. For diaster response, economic planning and controlling through visualisation and mapping. The GDP of the world is growing at a rate of around 3%. And the population of earth is growing at a rate of 1.2%. These rates means that the world needs more cities to house the people who are lifted out of poverty. Moreover in developing world rural population is migrating to urban centres further escalating the need of housing. For these reasons we need to be prepared for the environmental impact these the urban centres will bring to the earth. For this we have developed a 3d visualisation tool where you can visualise the existing cities, neighbourhoods. With World Wind Web we want government and planners to be equipped with a tool where they can easily go through multiple plans.
7+
Our tools can also find empty spaces in cities which are perfectly suitable to plant trees.
8+
9+
### Visualising Existing Areas
10+
Looking cities in 3d can help architectures, planners and government to combat housing shortage by mapping potential areas for buildings and adding 3d models there. Our prediction tools will be able to predict carbon footprint of each building and each neighbourhood. Denser cities means more land left for forests.
11+
12+
### Creating New Areas
13+
With this need of housing existing cities are sprawling to miles and new cities are springing up. With World Wind Web we want government and planners to be equipped with a tool where they can easily go through multiple plans. Our analysis and prediction will be able to predict how much population the 3d plans can hold and how much impact will they have on environment.
14+
15+
### Finding Space For Greenery
16+
Our tools can also find empty spaces in cities which are perfectly suitable to plant trees.
17+
18+
## Getting Started
19+
Leaflet and World Wind Web have been used to build this project.
20+
On leaflet map on the left side you can click and place a footprint indicating the placement of 3d model on the right side World Wind Web.
21+
You have the facility to choose a model from dropdown above. Just select a model and start clicking to place the selected model.
22+
You have the facility to choose a model from dropdown above. Just select a model and start clicking to place the selected model.
23+
You can also edit the scale(which determines the size of the model), heading, roll and pitch(rotation along x, y and z axes).
24+
25+
## How to Navigate
26+
The Left Leaflet Map :- Use the scroll to zoom in or zoom out. Or use the buttons on top left of the map. To move the map around, just drag the map while holding the left click.
27+
The World Wind Map:- Use scroll to zoom in or zoom out. To move the map around, drag the map while holding the left click. To pan around in 3d, drag the map while holding the right click.
28+
29+
### 1. Clone the Repository
30+
```
31+
git clone https://github.com/defineapoorv/VAPTool.git
32+
```
33+
34+
### 2. Setup Virtual Environment
35+
```
36+
cd VAPTool
37+
virtualenv venv
38+
source venv/bin/activate
39+
```
40+
41+
### 3. Install Dependencies
42+
```
43+
pip install -r requirements.txt
44+
```
45+
46+
### 4. Run the app
47+
```
48+
python run.py
49+
50+
```
51+
## Future Planning
52+
In future, the facilities to rotate, scale and translate the 3d model will come into place. You will be able to edit the footprint which will immediately scale, rotate or move the 3d model on World Wind Web.
53+
We are also adding the functionality to upload unlimited 3d models to choose from while creating a 3d plan.
54+
And finally you will be able to save these plans, come back, view them and edit them, anytime. We will also provide ways to download entire plans as sketchup or revit files.
55+
56+
## Contributing
57+
58+
Bug reports and pull requests are welcome on GitHub at https://github.com/defineapoorv/VAPTool. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
59+
60+
To submit a pull request -
61+
62+
1. Fork/clone the repository.
63+
2. Develop.
64+
3. Create a new branch from the master branch.
65+
4. Open a pull request on Github describing what was fixed or added.

fabfile.py

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# python 2 only!!
2+
3+
4+
from fabric.api import local, settings, abort
5+
from fabric.contrib.console import confirm
6+
7+
# prepare for deployment
8+
9+
10+
def test():
11+
with settings(warn_only=True):
12+
result = local("py.test tests", capture=True)
13+
if result.failed and not confirm("Tests failed. Continue?"):
14+
abort("Aborted at user request.")
15+
16+
17+
def commit():
18+
message = raw_input("Enter a git commit message: ")
19+
local("git add . && git commit -am '{}'".format(message))
20+
21+
22+
def push():
23+
local("git push origin master")
24+
25+
26+
def prepare():
27+
test()
28+
commit()
29+
push()
30+
31+
# deploy to heroku
32+
33+
34+
def pull():
35+
local("git pull origin master")
36+
37+
38+
def heroku():
39+
local("git push heroku master")
40+
41+
42+
def heroku_test():
43+
local("heroku run py.test tests")
44+
45+
46+
def deploy():
47+
pull()
48+
test()
49+
commit()
50+
heroku()
51+
heroku_test()
52+
53+
# rollback
54+
55+
56+
def rollback():
57+
local("heroku rollback")

main/__init__.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import logging
2+
3+
from flask import Flask, request as req
4+
from settings import config
5+
6+
from main.routes import account, pages
7+
8+
9+
def create_app(config_filename):
10+
app = Flask(__name__)
11+
app.config.from_object(config[config_filename])
12+
13+
app.register_blueprint(account.blueprint)
14+
app.register_blueprint(pages.blueprint)
15+
16+
app.logger.setLevel(logging.NOTSET)
17+
18+
@app.after_request
19+
def log_response(resp):
20+
app.logger.info("{} {} {}\n{}".format(
21+
req.method, req.url, req.data, resp)
22+
)
23+
return resp
24+
25+
return app

main/forms/__init__.py

Whitespace-only changes.

main/forms/account.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
from flask_wtf import Form
2+
from wtforms import TextField, PasswordField
3+
from wtforms.validators import DataRequired, EqualTo, Length
4+
from flask import Blueprint
5+
6+
account_form = Blueprint('AccountForm', __name__)
7+
8+
class RegisterForm(Form):
9+
name = TextField(
10+
'Username', validators=[DataRequired(), Length(min=6, max=25)]
11+
)
12+
email = TextField(
13+
'Email', validators=[DataRequired(), Length(min=6, max=40)]
14+
)
15+
password = PasswordField(
16+
'Password', validators=[DataRequired(), Length(min=6, max=40)]
17+
)
18+
confirm = PasswordField(
19+
'Repeat Password',
20+
[DataRequired(),
21+
EqualTo('password', message='Passwords must match')]
22+
)
23+
24+
25+
class LoginForm(Form):
26+
name = TextField('Username', [DataRequired()])
27+
password = PasswordField('Password', [DataRequired()])
28+
29+
30+
class ForgotForm(Form):
31+
email = TextField(
32+
'Email', validators=[DataRequired(), Length(min=6, max=40)]
33+
)

main/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from flask.ext.sqlalchemy import SQLAlchemy
2+
db = SQLAlchemy()

main/routes/__init__.py

Whitespace-only changes.

main/routes/account.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from flask import render_template, Blueprint, request
2+
from main.forms.account import *
3+
4+
blueprint = Blueprint('account', __name__)
5+
6+
7+
################
8+
#### routes ####
9+
################
10+
@blueprint.route('/login')
11+
def login():
12+
form = LoginForm(request.form)
13+
return render_template('forms/login.html', form=form)
14+
15+
16+
@blueprint.route('/register')
17+
def register():
18+
form = RegisterForm(request.form)
19+
return render_template('forms/register.html', form=form)
20+
21+
22+
@blueprint.route('/forgot')
23+
def forgot():
24+
form = ForgotForm(request.form)
25+
return render_template('forms/forgot.html', form=form)

main/routes/pages.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from flask import render_template, Blueprint, request
2+
3+
blueprint = Blueprint('pages', __name__)
4+
5+
6+
################
7+
#### routes ####
8+
################
9+
10+
11+
@blueprint.route('/')
12+
def home():
13+
return render_template('pages/home.html')
14+
15+
16+
@blueprint.route('/analysis')
17+
def analysis():
18+
return render_template('pages/analysis.html')
19+
20+
@blueprint.route('/prediction')
21+
def prediction():
22+
return render_template('pages/prediction.html')
23+
24+
25+
@blueprint.route('/visualisation')
26+
def visualisation():
27+
return render_template('pages/visualisation.html')

0 commit comments

Comments
 (0)