kikolino
03-18-2008, 04:36 AM
Hi,
I developed a VBA code which returns a distance matrix between every destination I have to visit. But to analyze the costs I have to know how much kilometres the vehicles drove both on highways and freeways because there is an extra tax for using freeways.
By the way, the calculate method always calculates the shortest way between two points, isnīt it?
So is it possible to possible to point out how much kilometres my vehicles drove on each road type?
Greetz
Kikolino
Mattys Consulting
03-18-2008, 08:40 AM
Hi Kikolino,
I think it can be done, but not easily, using the segmentdirection action
and instruction and the pixel.
Mike Mattys
kikolino
03-20-2008, 07:55 AM
Hi Mike,
Thanks, I think I get your idea, I have to count the segment directions and then calculate with the pixels the kilometers droven on each road or direction. Is it something like that? Unfortunately I donīt know how to handle it.
Best regards
Kikolino
Mattys Consulting
03-20-2008, 08:59 AM
Hidden right in front of everyone is the fact that road-type
is designated by a specific color. One has to be very good
with graphics in order to take advantage of this.
Worse yet, though, is the fact that one cannot zoom in to
a specific place when addressing a segment direction.
This was a very clever 'by-design' feature.
Mike Mattys
lfdmike
03-20-2008, 10:00 AM
I do not know the Euro edition of MP, but I know in the NA version the route planner gives out the road name and distance traveled on it. Here is a snippet from a route by my house
Time Mile Instruction For Toward
9:03 AM 2.0 Turn LEFT (East) onto CR-VV [Silver Spring Dr] 3.6 mi
9:08 AM 5.6 Keep STRAIGHT onto CR-VV [W Silver Spring Dr] 1.4 mi
9:10 AM 7.0 Road name changes to CR-E [W Silver Spring Dr] 0.3 mi
9:11 AM 7.4 Take Ramp (RIGHT) onto US-45 [Zoo Fwy] 6.4 mi US-45
9:17 AM 13.8 Take Ramp (LEFT) onto I-94 0.9 mi I-94 / Milwaukee
9:18 AM 14.7 At exit 306, turn RIGHT onto Ramp 0.2 mi WI-181 / 84th Street
9:18 AM 14.9 Turn RIGHT (South) onto SR-181 [S 84th St] 0.2 mi
CR means it is a county road
SR means it is a state hgihway
US means it is a US Highway
I means it is part of the US Interstate System
After that is the name/number of the road.
If I drive down by Mr Frost's place to the south of me, there are toll roads. The route planner also tells me that by saying *toll road* at the beginning of the line
Depending on how that tax is setup, you may have to integrate a db lookup on a roads name in cases where some roads of a type are taxed and others are not
I hope some of this info may help you, Mike
Mattys Consulting
03-20-2008, 10:27 AM
Hey Mike!
I hadn't looked at that for a while - thanks!
I'll be rewriting some code ...
Mike Mattys
lfdmike
03-20-2008, 01:19 PM
What looks hard can be easy and vice versa.
Glad it isn't just some harebrained idea of mine
Eric Frost
03-20-2008, 01:57 PM
If I drive down by Mr Frost's place to the south of me...
Let me know when you're coming and I'll make sure we have a six pack to crack open.. :smoking: