Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into newStreets
Browse files Browse the repository at this point in the history
  • Loading branch information
abyrd committed Aug 22, 2015
2 parents 80072c5 + 2e7cc2f commit e2660bf
Show file tree
Hide file tree
Showing 144 changed files with 5,476 additions and 1,567 deletions.
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
language: java

# OpenTripPlanner requires Java 8 and Travis doesn't (yet) support OpenJDK 8
jdk:
- oraclejdk8

# Replace Travis's default Maven installation step with a no-op.
# This avoids redundantly pre-running 'mvn install -DskipTests' every time.
install: true

# Replace Travis's default build step.
# Run all Maven phases at once up through verify, install, and deploy.
script: mvn clean deploy

env:
global:
# encrypted AWS access/secret keys to allow automated deployment to the Conveyal Maven repo on S3
- secure: "d1GabNiRYJwCeu+Zqr/qKnyNf4CY2pH0dLkY708Dzpe1Vgi0k2WLTMeYe9yJ3CyQydpUfOFkvwV64r4KIj4tBRDuW5C72bZyk/0o6oo931IwT1uHKstPfiovf/GiZ8qbn0SDencwfjfDefZUtaZ6I1mF6S638PvUlz4lNgl6kfA="
- secure: "DNnCaMx4Cgcuj78m96IEDwZMMtY14HCWIi6voT80DJZB5Rtu50BayT8ljxjrSHATYIfkZ+aLgFaNSPqI8MlNlt22xk2lzjOkA4J3Bn0d3xuYlgS9WT5rh78llKgtGpjH47OeRwHhpFM5PnNTCgFdnXNoj9SlZeNlWHk8+PHi5do="

# If sudo is disabled, CI runs on container based infrastructure (allows caching &c.)
sudo: false

# Retain the local Maven repository to speed up builds.
cache:
directories:
- "$HOME/.m2/repository"

# Notify us of the build status on the Slack channel
notifications:
slack: conveyal:RQuTZBfE7FBjVtYkKwdnNRjY

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ The main Java server code is in `src/main/`. OTP also includes a Javascript clie
Additional information and instructions are available in the [main documentation](http://opentripplanner.readthedocs.org/en/latest/), including a
[quick introduction](http://opentripplanner.readthedocs.org/en/latest/Basic-Usage/).

[![Build Status](https://travis-ci.org/opentripplanner/OpenTripPlanner.svg?branch=master)](https://travis-ci.org/opentripplanner/OpenTripPlanner)

## Development
## Development

OpenTripPlanner is a collaborative project incorporating code, translation, and documentation from contributors around the world. We welcome new contributions and prefer to format our code according to GeoTools-based formatting guidelines; an Eclipse autoformatter can be found at the root of this project (https://raw.github.com/openplans/OpenTripPlanner/master/formatter.xml). Further [development guidelines](http://opentripplanner.readthedocs.org/en/latest/Developers-Guide/) can be found in the documentation.

Expand Down
1 change: 1 addition & 0 deletions docs/Basic-Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,4 @@ interact with your local OpenTripPlanner instance. You can also try out some web

Try the `--help` option for a full list of command line parameters. See the [configuration](Configuration) page for more advanced topics.


10 changes: 9 additions & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,16 @@ connect to a network resource is the `url` field.
// Streaming differential GTFS-RT TripUpdates over websockets
{
type: "websocket-gtfs-rt-updater"
},

// OpenTraffic data
{
"type": "opentraffic-updater",
"frequencySec": -1,
// relative to OTP's working directory, where is traffic data stored.
// Should have subdirectories z/x/y.traffic.pbf (i.e. a tile tree of traffic tiles)
"tileDirectory": "traffic"
}
]
}
```

20 changes: 0 additions & 20 deletions docs/Developers-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,26 +94,6 @@ $ mkdocs serve

### Debug layers

OpenTripplanner has option to ease debugging problems with graph. Older option is graph visualizer.
Which you can enable with `--visualize` parameter instead of `--server` when starting OTP.
There you can see whole graph. You can click on edges and vertices and see the metadata. It is
useful to see if street has expected options. And if connections are where they are expected.

It can be hard to use on large graphs since, whole graph is displayed at once. And it can be hard
to search for specific streets since only street graph is shown without the rest of information.

Another option is to use debug layers, which shows extra layers on top of normal map.
To enable them you need to add `?debug_layers=true` to URL. For example
[http://localhost:8080/?debug_layers=true](http://localhost:8080/?debug_layers=true).
This adds debug layers to layer choosing dialog. Currently you can choose between:

- Wheelchair access (which colors street edges red if they don't allow wheelchair or green otherwise)
- Bike Safety (colors street edges based on how good are for cycling [smaller is better])
- Traversal permissions (colors street edges based on what types of transit modes are allowed to
travel on them (Pedestrian, cycling, car are currently supported)) Traversal permissions layer also
draws links from transit stops/bike rentals and P+R to graph. And also draws transit stops, bike rentals
and P+R vertices with different color.

Adding new renderer is very easy. You just need to create new class (preferably in
`org.opentripplanner.inspector` package) which implements EdgeVertexRenderer. It is best if class
name ends with Rendered. To implement this interface you need to write three functions `renderEdge`,
Expand Down
8 changes: 7 additions & 1 deletion docs/Scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,20 @@ Example of use using python:
```Python
#!/usr/bin/jython
from org.opentripplanner.scripting.api import *
otp = OtpsEntryPoint.fromArgs([ "--graphs", "." ])
otp = OtpsEntryPoint.fromArgs([ "--graphs", "/path/to/graphs", "--router", "amsterdam" ])
# ... the rest of your script goes here ...
```

```Bash
$ java -cp otp-x.y.z-shaded.jar:jython-standalone.jar org.python.util.jython myscript.py
```

Or, simpler:

```Bash
$ jython -Dpython.path=otp-x.y.z-shaded.jar myscript.py
```

Note that contrary to java custom the jython "main" class is all lowercase, this is not a typo.

## Script tutorial
Expand Down
54 changes: 54 additions & 0 deletions docs/Troubleshooting-Routing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Troubleshooting Routing

## Debug layers

OpenTripplanner has option to ease debugging problems with graph. Older option is graph visualizer.
Which you can enable with `--visualize` parameter instead of `--server` when starting OTP.
There you can see whole graph. You can click on edges and vertices and see the metadata. It is
useful to see if street has expected options. And if connections are where they are expected.

It can be hard to use on large graphs since, whole graph is displayed at once. And it can be hard
to search for specific streets since only street graph is shown without the rest of information.

Another option is to use debug layers, which shows extra layers on top of normal map.
To enable them you need to add `?debug_layers=true` to URL. For example
[http://localhost:8080/?debug_layers=true](http://localhost:8080/?debug_layers=true).
This adds debug layers to layer choosing dialog. Currently you can choose between:

- Wheelchair access (which colors street edges red if they don't allow wheelchair or green otherwise)
- Bike Safety (colors street edges based on how good are for cycling [smaller is better])
- Traversal permissions (colors street edges based on what types of transit modes are allowed to
travel on them (Pedestrian, cycling, car are currently supported)) Traversal permissions layer also
draws links from transit stops/bike rentals and P+R to graph. And also draws transit stops, bike rentals
and P+R vertices with different color.

### Interpretation Traversal permissions layer

A sample traversal permissions layer looks like the following
![screen shot 2015-06-26 at 11 45 22](https://cloud.githubusercontent.com/assets/4493762/8374829/df05c438-1bf8-11e5-8ead-c1dea41af122.png)
* Yellow lines is the link between a stop and the street graph.
* Grey lines are streets one can travel with the mode walk, bike, or car
* Green lines are paths one can travel with the mode walk only
* Red lines are streets one can travel with the mode car only
* Grey dots vertices where edges are connected. If two edges are crossing w/o a vertice at the intersection point, users will not be able to go from one street to the other. But this can be valid in case of over/under pass for
example. If it's an error, it's usually caused by improperly connected OSM data (a shared OSM node is required).

## OpenStreetMap tagging

### Basic Permissions

Access tags (such as bicycle/foot = yes/no/designated) can be used to override default graph-building parameters.

As a default, foot and bicycle traffic is ''not'' allowed on `highway=trunk`, `highway=trunk_link`, `highway=motorway`, `highway=motorway_link`, or `highway=construction`.

Both *are* allowed on `highway=pedestrian`, `highway=cycleway`, and `highway=footway`.

Finally, bicycles are *not*allowed on *highway=footway* when any of the following tags appear on a footway: `footway=sidewalk`, `public_transport=platform`, or `railway=platform`.

Other access tags (such as `access=no` and `access=private` affect routing as well, and can be overridden similarly. While `access=no` prohibits all traffic, `access=private` disallows through traffic.

### Further information
* [General information](https://github.com/opentripplanner/OpenTripPlanner/wiki/GraphBuilder#graph-concepts)
* [Bicycle routing](http://wiki.openstreetmap.org/wiki/OpenTripPlanner#Bicycle_routing)
* [Indoor mapping](https://github.com/opentripplanner/OpenTripPlanner/wiki/Indoor-mapping)
* [Elevators](http://wiki.openstreetmap.org/wiki/OpenTripPlanner#Elevators)
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ If you want to get started right away running your own OTP instance, the best pl

## Status

[![Build Status](http://ci.opentripplanner.org/buildStatus/icon?job=OpenTripPlanner)](http://ci.opentripplanner.org/job/OpenTripPlanner/)
[![Build Status](https://travis-ci.org/opentripplanner/OpenTripPlanner.svg?branch=master)](https://travis-ci.org/opentripplanner/OpenTripPlanner)

OpenTripPlanner is presently at **version 0.18.0**. See the [changelog](Changelog) and the [version notes](Version-Notes) to decide which branch or tag you want to work with. The software currently:

* Plans multi-modal walking, wheelchair, bicycle and transit trips
Expand Down
35 changes: 32 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
but we need the Maven project version as well, so we perform substitution. -->
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.1.7</version>
<version>2.1.15</version>
<executions>
<execution>
<goals>
Expand All @@ -188,8 +188,10 @@
</execution>
</executions>
<configuration>
<verbose>true</verbose>
<verbose>false</verbose>
<dotGitDirectory>${project.basedir}.git</dotGitDirectory>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
</configuration>
</plugin>

Expand Down Expand Up @@ -450,6 +452,8 @@
<artifactId>gt-epsg-hsql</artifactId>
<version>${geotools.version}</version>
</dependency>

<!-- TODO: this should be replaced by Jackson serialization -->
<dependency>
<groupId>de.grundid.opendatalab</groupId>
<artifactId>geojson-jackson</artifactId>
Expand All @@ -469,6 +473,12 @@
</exclusions>
</dependency>

<dependency>
<groupId>com.conveyal</groupId>
<artifactId>jackson2-geojson</artifactId>
<version>0.8</version>
</dependency>

<!-- TESTING -->
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -562,6 +572,13 @@
<artifactId>gtfs-lib</artifactId>
<!-- TODO: we set above to not download snapshots from the Conveyal Maven repo -->
<version>0.1-SNAPSHOT</version>

<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Processing is used for the debug GUI (though we could probably use just Java2D) -->
<dependency>
Expand Down Expand Up @@ -645,7 +662,7 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2</version>
<version>4.5</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down Expand Up @@ -681,6 +698,11 @@
<artifactId>bsf</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.9.40</version>
</dependency>
<!--
Scripting language dependencies such as Groovy and Jython can double the size of the OTP JAR.
Therefore we don't include them by default. You can either update the POM in your fork to include the
Expand All @@ -696,6 +718,13 @@
<version>2.7.0</version>
</dependency>
-->

<!-- support for OpenTraffic data -->
<dependency>
<groupId>io.opentraffic</groupId>
<artifactId>traffic-engine</artifactId>
<version>0.2</version>
</dependency>
</dependencies>

</project>
4 changes: 1 addition & 3 deletions src/client/js/otp/core/IndexApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,14 @@ otp.core.IndexApi = otp.Class({
maxLat : bounds.getNorthWest().lat,
minLon : bounds.getNorthWest().lng,
minLat : bounds.getSouthEast().lat,
maxLon : bounds.getSouthEast().lng,
maxLon : bounds.getSouthEast().lng
};

var url = otp.config.hostname + '/' + otp.config.restService + '/index/stops';
$.ajax(url, {
data: params,

success: function(data) {
console.log(' *** loadStopsInRectangle ' + name);
console.log(data);
callback.call(callbackTarget, data);
}
});
Expand Down
Loading

0 comments on commit e2660bf

Please sign in to comment.