Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix #894 (NPEs in NED builder)

  • Loading branch information...
commit 04693a602e299928c728d493105e1bec94440235 1 parent 146a97a
Matt Conway authored
View
9 ...pplanner-graph-builder/src/main/java/org/opentripplanner/graph_builder/impl/ned/NEDGraphBuilderImpl.java
@@ -153,8 +153,13 @@ private void assignMissingElevations(Graph graph, List<EdgeWithElevation> edgesW
BinHeap<ElevationRepairState> pq = new BinHeap<ElevationRepairState>();
// elevation for each vertex (known or interpolated)
- @SuppressWarnings("unchecked")
- HashMap<Vertex, Double> elevations = (HashMap<Vertex, Double>) knownElevations.clone();
+ // knownElevations will be null if there are no ElevationPoints in the data
+ // for instance, with the Shapefile loader.)
+ HashMap<Vertex, Double> elevations;
+ if (knownElevations != null)
+ elevations = (HashMap<Vertex, Double>) knownElevations.clone();
+ else
+ elevations = new HashMap<Vertex, Double>();
HashSet<Vertex> closed = new HashSet<Vertex>();
Please sign in to comment.
Something went wrong with that request. Please try again.