Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

Move analyst cluster interface classes to OTP #108

Open
wants to merge 4 commits into
base: queues
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/Api.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import utils.JsonUtil;
import utils.QueryResults;
import utils.QueueManager;
import utils.ResultEnvelope;
import org.opentripplanner.analyst.cluster.ResultEnvelope;

import java.io.IOException;
import java.io.StringWriter;
Expand Down
11 changes: 8 additions & 3 deletions app/controllers/Gis.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,24 @@
import org.opengis.feature.simple.SimpleFeatureType;
import org.opentripplanner.analyst.PointSet;
import org.opentripplanner.analyst.ResultSet;
import org.opentripplanner.analyst.cluster.ResultEnvelope;
import org.opentripplanner.analyst.cluster.ResultEnvelope.Which;
import play.Logger;
import play.mvc.Controller;
import play.mvc.Result;
import play.mvc.Security;
import utils.DirectoryZip;
import utils.HashUtils;
import utils.QueryResults;
import utils.ResultEnvelope;
import utils.ResultEnvelope.Which;

import java.io.File;
import java.io.Serializable;
import java.util.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Security.Authenticated(Secured.class)
public class Gis extends Controller {

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/QueueReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import play.mvc.Result;
import utils.JsonUtil;
import utils.QueueManager;
import utils.ResultEnvelope;
import org.opentripplanner.analyst.cluster.ResultEnvelope;

import java.io.ByteArrayInputStream;
import java.io.FileInputStream;
Expand Down
10 changes: 8 additions & 2 deletions app/controllers/SinglePoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@
import models.Shapefile;
import org.opentripplanner.analyst.Histogram;
import org.opentripplanner.analyst.ResultSet;
import org.opentripplanner.analyst.cluster.AnalystClusterRequest;
import org.opentripplanner.analyst.cluster.OneToManyProfileRequest;
import org.opentripplanner.analyst.cluster.OneToManyRequest;
import org.opentripplanner.analyst.cluster.ResultEnvelope;
import org.opentripplanner.analyst.cluster.ResultEnvelope.Which;
import play.Play;
import play.libs.F;
import play.mvc.Controller;
import play.mvc.Result;
import utils.*;
import utils.ResultEnvelope.Which;
import utils.IdUtils;
import utils.JsonUtil;
import utils.QueueManager;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/SinglePointTiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import tiles.AnalystTileRequest;
import tiles.SurfaceComparisonTile;
import tiles.SurfaceTile;
import utils.ResultEnvelope;
import org.opentripplanner.analyst.cluster.ResultEnvelope;

/**
* Tiles for single point. Intentionally not annotated with @Security.Authenticated;
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/TilesImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import play.mvc.Security;
import tiles.AnalystTileRequest;
import tiles.AnalystTileRequest.*;
import utils.ResultEnvelope;
import org.opentripplanner.analyst.cluster.ResultEnvelope;

/** These are tiles which require authentication in all cases */
@Security.Authenticated(Secured.class)
Expand Down
2 changes: 1 addition & 1 deletion app/migrations/MigrateQueryResults.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import utils.DataStore;
import utils.QueryResultStore;
import utils.ResultEnvelope;
import org.opentripplanner.analyst.cluster.ResultEnvelope;

/** Migrate query results from the old, slow storage format to the new, slightly faster, storage format */
public class MigrateQueryResults {
Expand Down
25 changes: 21 additions & 4 deletions app/models/Bundle.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
package models;

import com.conveyal.gtfs.GTFSFeed;
import com.conveyal.gtfs.model.*;
import com.conveyal.gtfs.model.Agency;
import com.conveyal.gtfs.model.Route;
import com.conveyal.gtfs.model.Shape;
import com.conveyal.gtfs.model.Stop;
import com.conveyal.gtfs.model.StopTime;
import com.conveyal.gtfs.model.Trip;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.google.common.base.Function;
Expand All @@ -15,19 +20,31 @@
import jobs.ProcessTransitBundleJob;
import org.apache.commons.io.FileUtils;
import org.geotools.geometry.Envelope2D;
import org.mapdb.*;
import org.mapdb.Atomic;
import org.mapdb.BTreeMap;
import org.mapdb.DB;
import org.mapdb.DBMaker;
import org.mapdb.Fun;
import org.mapdb.Fun.Tuple2;
import org.opentripplanner.analyst.cluster.ClusterGraphService;
import play.Logger;
import play.Play;
import play.libs.Akka;
import scala.concurrent.ExecutionContext;
import scala.concurrent.duration.Duration;
import utils.*;
import utils.Bounds;
import utils.ClassLoaderSerializer;
import utils.DataStore;
import utils.HashUtils;

import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.TimeUnit;
import java.util.zip.ZipException;
Expand Down
10 changes: 9 additions & 1 deletion app/models/Query.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@
import org.joda.time.LocalDate;
import org.opentripplanner.analyst.PointFeature;
import org.opentripplanner.analyst.PointSet;
import org.opentripplanner.analyst.cluster.AnalystClusterRequest;
import org.opentripplanner.analyst.cluster.OneToManyProfileRequest;
import org.opentripplanner.analyst.cluster.OneToManyRequest;
import org.opentripplanner.analyst.cluster.ResultEnvelope;
import org.opentripplanner.common.model.GenericLocation;
import org.opentripplanner.routing.core.TraverseModeSet;
import otp.Analyst;
import play.Logger;
import play.Play;
import utils.*;
import utils.DataStore;
import utils.IdUtils;
import utils.JsonUtil;
import utils.QueryResultStore;
import utils.QueueManager;

import java.io.IOException;
import java.io.Serializable;
Expand Down
27 changes: 22 additions & 5 deletions app/models/Shapefile.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.MultiPolygon;
import com.vividsolutions.jts.geom.Polygon;
import com.vividsolutions.jts.geom.Polygonal;
import com.vividsolutions.jts.geom.prep.PreparedPolygon;
import com.vividsolutions.jts.index.strtree.STRtree;
import controllers.Application;
Expand All @@ -30,14 +31,30 @@
import org.opentripplanner.analyst.PointFeature;
import org.opentripplanner.analyst.PointSet;
import org.opentripplanner.analyst.UnsupportedGeometryException;
import org.opentripplanner.analyst.cluster.PointSetDatastore;
import play.Logger;
import play.Play;
import play.libs.Akka;
import scala.concurrent.ExecutionContext;
import utils.*;

import java.io.*;
import java.util.*;
import utils.Bounds;
import utils.DataStore;
import utils.HaltonPoints;
import utils.HashUtils;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
Expand Down Expand Up @@ -122,7 +139,7 @@ public List<PreparedPolygon> getPreparedPolygons() {

if(geom instanceof Polygon) {

PreparedPolygon pp = new PreparedPolygon((Polygon)geom);
PreparedPolygon pp = new PreparedPolygon((Polygonal)geom);
preparedPolygons.add(pp);

}
Expand Down
2 changes: 1 addition & 1 deletion app/tiles/AnalystTileRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import utils.NaturalBreaksClassifier;
import utils.QueryResults;
import utils.QueryResults.QueryResultItem;
import utils.ResultEnvelope;
import org.opentripplanner.analyst.cluster.ResultEnvelope;

import java.awt.*;
import java.io.IOException;
Expand Down
4 changes: 2 additions & 2 deletions app/tiles/SurfaceComparisonTile.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import org.opentripplanner.analyst.PointSet;
import org.opentripplanner.analyst.ResultSet;
import utils.HaltonPoints;
import utils.ResultEnvelope;
import utils.ResultEnvelope.Which;
import org.opentripplanner.analyst.cluster.ResultEnvelope;
import org.opentripplanner.analyst.cluster.ResultEnvelope.Which;

import java.awt.*;
import java.io.IOException;
Expand Down
4 changes: 2 additions & 2 deletions app/tiles/SurfaceTile.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import org.opentripplanner.analyst.PointSet;
import org.opentripplanner.analyst.ResultSet;
import utils.HaltonPoints;
import utils.ResultEnvelope;
import utils.ResultEnvelope.Which;
import org.opentripplanner.analyst.cluster.ResultEnvelope;
import org.opentripplanner.analyst.cluster.ResultEnvelope.Which;

import java.awt.*;
import java.io.IOException;
Expand Down
52 changes: 0 additions & 52 deletions app/utils/AnalystClusterRequest.java

This file was deleted.

Loading