Changeset 15106 in osm for applications


Ignore:
Timestamp:
2009-05-19T01:21:12+02:00 (16 years ago)
Author:
juangui
Message:

Fixed bugs in RoutingGraph. Added interfaces EdgeIterator and RoutingEdge.

Location:
applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java

    r14760 r15106  
    8989         * <code>false</code> Graph not created.
    9090         */
    91         public boolean graphState;
     91//      public boolean graphState;
    9292
    9393        /**
     
    108108         */
    109109        public RoutingGraph(DataSet data) {
    110                 this.graphState = false;
     110//              this.graphState = false;
    111111                this.graph = null;
    112                 this.data = data;
     112//              this.data = data;
    113113                routeType=RouteType.SHORTEST;
    114114                routingProfile=new RoutingProfile("default");
     
    147147                        }
    148148                }
    149                 graph.vertexSet().size();
     149//              graph.vertexSet().size();
    150150                logger.debug("End Create Graph");
    151151                logger.debug("Vertex: "+graph.vertexSet().size());
     
    167167                // weight = getWeight(way);
    168168                double weight = getWeight(way, length);
    169                 getWeight(edge, length);
     169                setWeight(edge, length);
    170170                logger.debug("edge for way " + way.id
    171171                                     + "(from node " + from.id + " to node "
     
    176176
    177177        /**
    178          * Returns the weight for the given segment depending on the highway type
     178         * Set the weight for the given segment depending on the highway type
    179179         * and the length of the segment. The higher the value, the less it is used
    180180         * in routing.
     
    184184         * @return
    185185         */
    186         private void getWeight(OsmEdge osmedge, double length) {
     186        private void setWeight(OsmEdge osmedge, double length) {
    187187               
    188188                osmedge.setLength(length);
Note: See TracChangeset for help on using the changeset viewer.