Tech:Source Code
From Cyclopath
Cyclopath is open source software under a slightly modified version of the Apache license; see the README file in the source tarball for details.
This page explains how to download the source code; for installing, see Tech:Open Source/Install Guide.
Please note that these directions are incomplete and poorly tested. Also, installation will likely be quite difficult for the first few people as we at Cyclopath HQ have never installed in other environments. In particular, we have not done so without simply copying the Cyclopath database, which we are unable to offer here. However, we felt it was better to release sooner with a difficult install rather than later with a smooth one. Please let us know of any bugs so we can improve things, and please also feel free to edit these wiki pages with what you learn.
The place for discussing the source code, installation, and hacking is the cyclopath-dev mailing list.
Contents |
[edit] Download source code
Download the following files (approx. 600MB total):
- cyclopath.tar.gz - Cyclopath source code
- schema.sql - Database schema
- data.sql - Data for a few support tables
- tiles.tar.gz - Raster tiles and elevation info
- fixperms - Perl script to help make permissions right. Put it somewhere in your $PATH.
Note: We are working on a more elegant Subversion-based solution, which we'll make available as soon as we can.
[edit] Download source code (DRAFT - this is not yet ready)
Download the following support files:
- schema.sql - Database schema
- data.sql - Data for a few support tables
- elevation.tif - Elevation info (700M)
- fixperms - Perl script to help make permissions right. Put it somewhere in your $PATH.
Get the source code with Subversion:
svn co svn://magic.cyclopath.org/cyclingproject/public/trunk cyclopath
Note: You will want a separate Subversion working directory for each bug/feature/project you're working on, as when you submit a patch (see below) we'll need it to be concise and targeted to only one thing.
[edit] Install it
See Tech:Installing and Cyclopath Installation Guide
Note that you do not need to run either tilecache_update.py or routed to have a working installation. The former is going away soon, and I wouldn't bother (it's a big pain in the neck), and the latter is only needed if you want to compute routes.
[edit] Initialize database
This is the part that is likely to be especially rocky for early adopters.
- Do a search and replace /export/scratch/reid/postgis-1.3in data.sql with the path where you installed PostGIS.
- Run data.sql
- Run schema.sql
- You now have a valid, but empty database.
- Download some map data from MNDOT: http://www.dot.state.mn.us/maps/gisbase/html/datafiles.html (you want one or more of the 7 metro counties)
- Use the import scripts in scripts/ to put it in your database.
- Run script/nodes_build.py
In theory, you should now have a working Cyclopath database. Let us know how it goes in practice. :)
[edit] Submitting patches
This is how you send your changes to us for inclusion in the main Cyclopath source tree.
Patches should be concise, address only one thing, and follow Cyclopath coding style and standards. Patches which aren't these things will be rejected.
- svn update
- Resolve any conflicts
- svn diff > /tmp/carefully-named-patch.diff
- Attach this diff to the relevant bug in Bugzilla
- Ask for a review of the patch on cyclopath-dev
Note: you'll want to svn update fairly frequently as you work, to reduce the likelihood of difficult conflicts.
