Skip to content

Instantly share code, notes, and snippets.

View mattwigway's full-sized avatar

Matthew Wigginton Bhagat-Conway mattwigway

View GitHub Profile
package models;
import javax.persistence.*;
import java.util.*;
import play.db.jpa.*;
import play.data.validation.*;
@Entity
public class NtdAgency extends Model {
@mattwigway
mattwigway / index.html
Created June 7, 2012 00:38
VTA Transit Times Analysis
<html>
<head>
<title>VTA 35S and 40S transfers</title>
<script src="http://d3js.org/d3.v2.js"></script>
</head>
<body>
<h2>VTA Transfer Time Analysis</h2>
<div id="barActual"></div>
<script src="transitTimes.js"></script>
@mattwigway
mattwigway / MemoryTests.java
Created May 19, 2012 06:30
Test of Java memory consumption
/**
* Test memory consumption and garbage collection over time.
* Copyright (C) 2012 Matt Conway. Licensed under the Apache 2 license.
*/
import java.util.ArrayList;
public class MemoryTests {
public static void main (String[] args)
throws InterruptedException {
@mattwigway
mattwigway / graph-config.xml
Created May 4, 2012 23:46
exception building graph
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<bean id="gtfsBuilder" class="org.opentripplanner.graph_builder.impl.GtfsGraphBuilderImpl">
<property name="gtfsBundles">
matthewc@ip-10-252-67-208:~/otp/OpenTripPlanner$ mvn install -Dmaven.test.skip=true
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] OpenTripPlanner
[INFO] openstreetmap
[INFO] opentripplanner-admin-webapp
[INFO] opentripplanner-utils
[INFO] opentripplanner-routing
[INFO] opentripplanner-graph-builder
[INFO] opentripplanner-api-extended
matthewc@ip-10-252-67-208:~/otp/OpenTripPlanner$ mvn install -Dmaven.test.skip=true -pl openstreetmap,opentr
ipplanner-api-common,opentripplanner-api-webapp,opentripplanner-graph-builder,opentripplanner-webapp,opentripplanner-routing
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] openstreetmap
[INFO] opentripplanner-routing
[INFO] opentripplanner-graph-builder
[INFO] OpenTripPlanner API Common
[INFO] opentripplanner-api-webapp
[INFO] opentripplanner-webapp
@mattwigway
mattwigway / exception
Created February 29, 2012 01:35
exception planning trip
SEVERE: exception planning trip:
java.lang.NullPointerException
at org.opentripplanner.routing.impl.StreetVertexIndexServiceImpl.getClosestVertex(StreetVertexIndexServiceImpl.java:244)
at org.opentripplanner.routing.impl.StreetVertexIndexServiceImpl.getClosestVertex(StreetVertexIndexServiceImpl.java:186)
at org.opentripplanner.routing.impl.GenericPathService.getVertexForPlace(GenericPathService.java:72)
at org.opentripplanner.routing.impl.GenericPathService.getVertexForPlace(GenericPathService.java:58)
at org.opentripplanner.routing.impl.ContractionPathServiceImpl.plan(ContractionPathServiceImpl.java:99)
at org.opentripplanner.api.ws.PlanGenerator.generate(PlanGenerator.java:104)
at org.opentripplanner.api.ws.Planner.getItineraries(Planner.java:282)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
@mattwigway
mattwigway / graph-builder.xml
Created February 29, 2012 01:31
SF Graph Builder Config
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<bean id="graphBundle" class="org.opentripplanner.model.GraphBundle">
<property name="path" value="/var/otp/graphs/sf/" />
</bean>
@mattwigway
mattwigway / otpanalyst.xml
Created January 30, 2012 02:59
GDAL WMS def for OTP Analyst
<GDAL_WMS>
<Service name="WMS">
<!-- I don't think the version matters -->
<Version>1.1.1</Version>
<!-- Set the special parameters here. There is no other way to
specify special parameters as far as I know -->
<ServerUrl>http://localhost:8080/opentripplanner-analyst-core/wms?DIM_ORIGINLAT=37.36234646943972&DIM_ORIGINLON=-122.12711334228516&time=2012-01-12T23:30:00Z&</ServerUrl>
<!-- This state plane CA zone 3 meters
You should set it to your local projection. -->
<SRS>EPSG:26943</SRS>
@mattwigway
mattwigway / otpeverywhere.py
Created December 31, 2011 04:01
OTP to Everywhere
#!/usr/bin/python
# otpeverywhere - make otp maps like
# http://www.flickr.com/photos/walkingsf/6536396399/
# Copyright 2011 Matt Conway
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at