Elevation data - java.lang.NullPointerException

117 views
Skip to first unread message

marco.bo...@gmail.com

unread,
Jul 23, 2018, 2:53:03 AM7/23/18
to OpenTripPlanner Users
I'm trying to build a graph for a specific area.
I'm using otp-1.3.0-SNAPSHOT-shaded.jar.
When I build with GTFS files without OSM files, everything works well.

When I add an OSM file, compiler start print:

  • (OSMDatabase.java:578) Could not infer floor number for layer called '-1;-0.5' at 607163790. Vertical movement will still be possible, but elevator cost might be incorrect. Consider an OSM level map.
  • (OSMDatabase.java:755) Bad turn restriction at relation 5736421. Reason: One of from|via|to edges are empty in relation

And it end with this error:

    Exception in thread "main" java.lang.NullPointerException

at org.opentripplanner.openstreetmap.model.OSMLevel.fromSpecList(OSMLevel.java:148)

at org.opentripplanner.openstreetmap.model.OSMLevel.mapFromSpecList(OSMLevel.java:171)

at org.opentripplanner.graph_builder.module.osm.OSMDatabase.processLevelMap(OSMDatabase.java:827)

at org.opentripplanner.graph_builder.module.osm.OSMDatabase.processRelations(OSMDatabase.java:728)

at org.opentripplanner.graph_builder.module.osm.OSMDatabase.postLoad(OSMDatabase.java:316)

at org.opentripplanner.graph_builder.module.osm.OpenStreetMapModule.buildGraph(OpenStreetMapModule.java:177)

at org.opentripplanner.graph_builder.GraphBuilder.run(GraphBuilder.java:157)

at org.opentripplanner.standalone.OTPMain.run(OTPMain.java:111)

at org.opentripplanner.standalone.OTPMain.main(OTPMain.java:86)


I've tried to add an RSTM elevation map (tiff), nothing has change for the 'Consider an OSM level map' warning.

Someone knows how to resolve this problem? Seems something releated to 'elevation map', right?

Thank you

Marcus Young

unread,
Jul 23, 2018, 10:58:18 AM7/23/18
to OpenTripPlanner Users
Those are quite normal warnings, not related to providing elevation data. My guess would be that the exception is because you ran out of RAM while building the graph.

Marcus

Andrew Byrd

unread,
Jul 23, 2018, 12:05:07 PM7/23/18
to Marcus Young, OpenTripPlanner Users
It’s true that those warnings are common, and are probably related to elevator nodes having fractional floor numbers or lists of floor numbers. These unusual cases are not properly handled by OTP, but I don’t recall seeing them cause crashes.

I would not expect a java.lang.NullPointerException to be caused by running out of memory. That usually leads to a java.lang.OutOfMemoryError with the message "GC overhead limit exceeded”. So I think this is a bug.

Please create an issue at:

-Andrew


On 23 Jul 2018, at 22:58, Marcus Young <mar...@graspit.co.uk> wrote:

Those are quite normal warnings, not related to providing elevation data. My guess would be that the exception is because you ran out of RAM while building the graph.

Marcus

--
You received this message because you are subscribed to the Google Groups "OpenTripPlanner Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Holger Bruch

unread,
Jul 23, 2018, 12:15:39 PM7/23/18
to OpenTripPlanner Users
Looking into the code, I think the exception is caused by a relation of type ‚level_map‘ but no ‚levels‘ tag.

If you can identify this relation, you could fix the OSM data, otherwise the code must be fixed.

The ‚Could not infer floor number‘ has nothing to do with the Exception. It is quite common for spli levels as e.g. 0.5 or ways with multiple levels, e.g. elevators mapped as arrays, steps or ramps.

Regards, Holger

marco.bo...@gmail.com

unread,
Jul 23, 2018, 1:22:00 PM7/23/18
to OpenTripPlanner Users
Yes, usually I receive this: java.lang.OutOfMemoryError with the message "GC overhead limit exceeded”.

The osm file (pbf) has been reduced from the original osm file
  • osmconvert xxx-latest.osm.pbf -b=6.35,36.43,18.87,47.9 --complete-ways -o=xxx.pbf
Could be releated to the problem?

The pbf file I'm using is this


Holger Bruch

unread,
Jul 23, 2018, 11:39:45 PM7/23/18
to OpenTripPlanner Users
No, the data error is not related to the conversion.
Station Novate Milanese has a level_map without levels: https://overpass-turbo.eu/s/Avw
Anyway, as Andrew Byrd wrote, you should create an issue, as OpenTripPlanner should report a warning instead of throwing an exception.
Regards,
Holger

marco.bo...@gmail.com

unread,
Jul 24, 2018, 7:09:46 PM7/24/18
to OpenTripPlanner Users
Ok, thank you. I've tried to open a ticket as you told me. https://github.com/opentripplanner/OpenTripPlanner/issues/2611

Reply all
Reply to author
Forward
0 new messages