Scripts to fetch and simplify OSM network.
- remove cul-de-sac
- split links to oneways
- simplify links (removing deg 2 nodes)
- process list in columns
- add elevation and slopes
./update-lambda.sh
python tests/run_tests.py
for coverage report:
pip install coverage
coverage run -m unittest discover
coverage report
for a nicer report:
coverage html
- create a test.env file at the root of this folder (with the DockerFile)
AWS_ACCESS_KEY_ID=[your access key]
AWS_SECRET_ACCESS_KEY=[your secret key]
AWS_REGION=ca-central
BUCKET_NAME=quenedi-osm
AWS_LAMBDA_FUNCTION_MEMORY_SIZE=3000
- Build the Docker
docker build -t osm-api:latest .
- Run the docker with the environment variable
docker run -p 9000:8080 --env-file 'test.env' osm-api
- from another terminal window:
curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d "{\"bbox\":[45.436521914253944,-73.79789929568945,45.59889118488431,-73.46685884481215],\"highway\":[\"motorway\",\"motorway_link\",\"trunk\",\"trunk_link\",\"primary\",\"primary_link\",\"secondary\",\"secondary_link\",\"cycleway\"],\"callID\":\"test\",\"elevation\":true}"
CallId correspond to a folder on the s3 Bucket.