Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#8768 closed defect (fixed)

plugin routing, create new routing layer fail

Reported by: anonymous Owned by: franpd
Priority: normal Milestone:
Component: Plugin routing Version:
Keywords: Cc:

Description (last modified by Don-vip)

Repository Root:
Build-Date: 2013-06-05 01:34:49
Last Changed Author: Don-vip
Revision: 5990
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Date: 2013-06-05 00:52:58 +0200 (Wed, 05 Jun 2013)
Last Changed Rev: 5990

Identification: JOSM/1.5 (5990 en) Linux Ubuntu 12.04.2 LTS
Memory Usage: 559 MB / 883 MB (254 MB allocated, but free)
Java version: 1.6.0_27, Sun Microsystems Inc., OpenJDK Server VM
VM arguments: []

Dataset consistency test:
[WARN - NO NODES] Way {Way id=219775407 version=1 V nodes=[{Node id=2289104233 version=1 V lat=40.2091388,lon=44.53027}]} has only one node

Plugin: ImportImagePlugin (29531)
Plugin: PicLayer (29601)
Plugin: buildings_tools (29596)
Plugin: geotools (29435)
Plugin: imagery_offset_db (29467)
Plugin: jts (29613)
Plugin: log4j (29435)
Plugin: pbf (29435)
Plugin: print (29529)
Plugin: routing (29596)
Plugin: turnlanes (29435)
Plugin: turnrestrictions (29435)

	at com.innovant.josm.jrt.core.RoutingGraph.addEdge(
	at com.innovant.josm.jrt.core.RoutingGraph.addEdgeBidirectional(
	at com.innovant.josm.jrt.core.RoutingGraph.createGraph(
	at com.innovant.josm.plugin.routing.RoutingLayer.<init>(
	at com.innovant.josm.plugin.routing.RoutingPlugin.addLayer(
	at com.innovant.josm.plugin.routing.gui.RoutingMenu$1.actionPerformed(
	at javax.swing.AbstractButton.fireActionPerformed(
	at javax.swing.AbstractButton$Handler.actionPerformed(
	at javax.swing.DefaultButtonModel.fireActionPerformed(
	at javax.swing.DefaultButtonModel.setPressed(
	at javax.swing.AbstractButton.doClick(
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(
	at java.awt.Component.processMouseEvent(
	at javax.swing.JComponent.processMouseEvent(
	at java.awt.Component.processEvent(
	at java.awt.Container.processEvent(
	at java.awt.Component.dispatchEventImpl(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.LightweightDispatcher.retargetMouseEvent(
	at java.awt.LightweightDispatcher.processMouseEvent(
	at java.awt.LightweightDispatcher.dispatchEvent(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Window.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.EventQueue.dispatchEventImpl(
	at java.awt.EventQueue.access$300(
	at java.awt.EventQueue$
	at java.awt.EventQueue$
	at Method)
	at java.awt.EventQueue$
	at java.awt.EventQueue$
	at Method)
	at java.awt.EventQueue.dispatchEvent(
	at java.awt.EventDispatchThread.pumpOneEventForFilters(
	at java.awt.EventDispatchThread.pumpEventsForFilter(
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(
	at java.awt.EventDispatchThread.pumpEvents(
	at java.awt.EventDispatchThread.pumpEvents(

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by Don-vip

Description: modified (diff)
Resolution: fixed
Status: newclosed

Fixed in [o29629].

comment:2 Changed 4 years ago by ksmlgl

After this fix, i think the RoutingGraph addEdge method can not work accurately.
I think, the code block should be changed as below:

private void addEdge(Way way, Node from, Node to) {

OsmEdge edge = new OsmEdge(way, from, to);
double length = edge.getLength();
graph.addEdge(from, to, edge);
weight = getWeight(way);
double weight = getWeight(way, length);
setWeight(edge, length);
logger.debug("edge for way " + way.getId() + "(from node " + from.getId() + " to node " + to.getId()

+ ") has weight: " + weight);

((DirectedWeightedMultigraph<Node, OsmEdge>) graph).setEdgeWeight(edge, weight);


Last edited 4 years ago by ksmlgl (previous) (diff)

comment:3 Changed 4 years ago by stoecker

Please don't add comments to already closed tickets. Create a new ticket and be a bit more verbose in your description. Also patch format is preferred, as that helps to understand what changes you actually suggest.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain franpd.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.