Re: [OSM-dev] API threw unexpected NoMethodError exception

2013-04-07 Thread Peter K
Hey Martin,

without giving us an example of your exact problem we can just say: for
us this would work...

IMO your step by step approach is not sufficient to work properly.
You'll need a the driver's final destination and full path.
Why? Assume a route A-B-C (where B would have a traffic light) but the
fastest
or best route would be A-D-E-C (where D has no traffic light). A-B and
A-D have the same direction.
Now you app would tune the speed (or acceleration) after A regarding B
and not E if it does not know the full path.

A-D--B

  |  |

  E--C

Also here in my city (Germany) several junctions have a separate lane
for turning right.
And this lane has no traffic light, but the junction has one!
So without knowing the final destination your application would assume
there is a traffic light in this direction ...
And IMO hitting a server for every turn or road is a waste of resources
(battery, bandwith costs etc)

Regards,
Peter.

-- 
GraphHopper.com Your way is our destination!


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] API threw unexpected NoMethodError exception

2013-04-07 Thread Martin Schafran
On Sunday 07 April 2013 14:05:44 Peter K wrote:

 IMO your step by step approach is not sufficient to work properly.
 You'll need a the driver's final destination and full path.

this app is not routing. 
this app just provides speed and timing info of the next traffic signals even 
if no path is available.

as no path is known it assumes 2 things:
1. next signal is distance based
2. you go straight on

I don't want to force drivers to provide a path. 
if a path is available its even better. but this is not the problem.



 
 Also here in my city (Germany) several junctions have a separate lane
 for turning right.
 And this lane has no traffic light, but the junction has one!

you got it. 
and i can't solve it without a defined junction.
the solution is:
first define a via member of a relation (lane or direction). this via 
member 
is a junction, that consists of multiple nodes on bigger junctions.

after that you can define driving directions like from-via-to and 
distinguish between lanes.
to each lane a timing info can be assigned (see glosa tag in german forum).
 
please define at least a junction. this wouldn't hurt anybody.


and if you want glosa, define also additional glosa tags.
there are enough pretimed signals out there even in germany and the parameters 
don't change often.
the result would be as on my videos.


martin


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] API threw unexpected NoMethodError exception

2013-04-07 Thread Peter K
Hi Martin,

 Also here in my city (Germany) several junctions have a separate lane
 for turning right.
 And this lane has no traffic light, but the junction has one!
 you got it. 
 and i can't solve it without a defined junction.

All the examples I mean are properly defined (Ie. only if you really
cross the junction you'll pass a traffic signal, turning right is mapped
as a separate lane without traffic light).

So give us the concrete example you mean.

Peter.

PS: using abbreviations that only google knows doesn't really help to
understand your problem ;) (regarding glosa etc)


-- 
GraphHopper.com Your way is our destination!


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] API threw unexpected NoMethodError exception

2013-04-07 Thread Martin Koppenhoefer




Am 07/apr/2013 um 15:41 schrieb Peter K peat...@yahoo.de:

 All the examples I mean are properly defined (Ie. only if you really
 cross the junction you'll pass a traffic signal, turning right is mapped
 as a separate lane without traffic light).
 
 So give us the concrete example you mean.


but of course there are also situations without a separate lane for turning 
right, e.g. here going from Alberstraße to Stuttgarter Str.: 
http://www.openstreetmap.org/?lat=48.528626lon=9.077531zoom=18layers=M

cheers,
Martin___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] API threw unexpected NoMethodError exception

2013-04-07 Thread Martin Schafran
On Sunday 07 April 2013 15:41:14 Peter K wrote:
 All the examples I mean are properly defined (Ie. only if you really
 cross the junction you'll pass a traffic signal, turning right is mapped
 as a separate lane without traffic light).
 
 So give us the concrete example you mean.

first abbreviations:
glosa = green light optimal speed adivsory

rlda = red light duration advisory



the wiki says 
there is no well established convention 
how to map traffic signals.

http://wiki.openstreetmap.org/wiki/Tag:highway%3Dtraffic_signals#How_to_map

take this example:
http://wiki.openstreetmap.org/wiki/File:Traffic_signals_alternative_mapping.png

tell me an algo that solves this question:
after passing the first signal, when the car left the junction and where to?

you could solve this for this particular junction, but not generally for all 
junctions because of no well established convention.
having junction tags, you could ask. am I at a junction node? if yes, wait to 
next tick and ask again.

a junction relation could also allow you to map traffic signals in all 
alternative ways, e.g. at crossing points or at junction entry and exit 
points.


martin___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] API threw unexpected NoMethodError exception

2013-04-07 Thread Peter K
Hi Martin(s),


 All the examples I mean are properly defined (Ie. only if you really
 cross the junction you'll pass a traffic signal, turning right is mapped
 as a separate lane without traffic light).

 So give us the concrete example you mean.


 but of course there are also situations without a separate lane for
 turning right, e.g. here going from Alberstraße to Stuttgarter
 Str.: 
 http://www.openstreetmap.org/?lat=48.528626lon=9.077531zoom=18layers=M


Of course, there are such situations without separate lanes :)
I meant an example of where he has problems with. This particular
junction won't be a problem for him IMO


 the wiki says

 there is no well established convention

 how to map traffic signals.


Ok, this is an argument but still I would like to see a concrete example
which is problematic for you.



http://wiki.openstreetmap.org/wiki/Tag:highway%3Dtraffic_signals#How_to_map

 take this example:


http://wiki.openstreetmap.org/wiki/File:Traffic_signals_alternative_mapping.png

 tell me an algo that solves this question:


Still don't get it. Why would this junction be a problem for you?
The traffic light is mapped only once on the road: For every
combinations of directions you'll get only one traffic signal. See
http://www.openstreetmap.org/edit?bbox=3.09915%2C50.95096%2C3.10087%2C50.95144

But probably this all is a big misunderstanding on my side ...

Peter.

-- 
GraphHopper.com Your way is our destination!

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] API threw unexpected NoMethodError exception

2013-04-07 Thread Martin Schafran
On Sunday 07 April 2013 17:12:16 Peter K wrote:

Still don't get it. Why would this junction be a problem for you? The traffic 
light is mapped only once on the road: For every combinations of directions 
you'll get only one traffic signal. See 
http://www.openstreetmap.org/edit?bbox=3.09915%2C50.95096%2C3.10087%2C50.95144 
But probably this all is a big misunderstanding on my side ...




going on the Diksmuidsesteenweg (our example) from west to east.

if you just passed the first traffic signals, have you also passed the junction 
and where to?
answer: not passed and don't know where to, i'm just some where in the middle 
of the crossing.


next example

http://wiki.openstreetmap.org/wiki/File:Mapnik_traffic_signals.png

passing a simple junction like this from west to east.
if you just passed the first traffic signals, have you also passed the junction?
answer: yes and the direction is just the node behind the junction.


same algo and different answers - bad solution.



first example again having junction tags.
answer: 
not passed BECAUSE next (closest) node has a junction tag
or
passed BECAUSE next node hasn't a junction tag
and where to: the first node without junction tag.

martin
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] API threw unexpected NoMethodError exception

2013-04-06 Thread Martin Schafran
On Friday 05 April 2013 22:43:45 you wrote:
 That said, it sounds like this can only happen when the database has 
 been placed in an inconsistent state by importing data - the rails code 
 would never allow such data to be created.

this guys in forum also tried to import data partially.

how can i import data partially and consistent?
i want only roads for car navigation.

my filters:
osmosis 
--rbf file=/home/m/planetFiles/20130402/germany-latest.osm.pbf
outPipe.0=ger workers=1
--buffer bufferCapacity=12000 inPipe.0=ger outPipe.0=a
--tf inPipe.0=a outPipe.0=b accept-ways highway=*
--tf inPipe.0=b outPipe.0=c reject-ways 
highway=footway,cycleway,service,path,track,steps,platform,pedestrian area=yes
--used-node inPipe.0=c outPipe.0=d  idTrackerType=Dynamic
--wb inPipe.0=d omitmetadata=false usedense=false compress=none
file=/home/m/planetFiles/20130402/germany_streets.osm.pbf

martin

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] API threw unexpected NoMethodError exception

2013-04-06 Thread Shaun McDonald

On 6 Apr 2013, at 11:35, Martin Schafran mar...@ampelmeter.com wrote:

 On Saturday 06 April 2013 11:28:28 Tom Hughes wrote:
 Well you almost certainly don't want to use an API database to start 
 with. You want to use a database whose schema is optimised for routing 
 rather than for editing.
 
 I want to (let) edit my data with josm and have all changes tracked.
 The optimized schema would be the simple schema.

By making the afore mentioned change, you end up with data where the relation 
members may not exist. This is likely to be fine for what you are doing 
assuming that you handle that in your routing system. You probably have to deal 
with that anyway if you are using extracts in the routing anyway. 

Are you sure you wouldn't be better making the edits directly in OSM instead of 
just locally?

Shaun
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] API threw unexpected NoMethodError exception

2013-04-06 Thread Martin Schafran
On Saturday 06 April 2013 13:48:35 Shaun McDonald wrote:
 Are you sure you wouldn't be better making the edits directly in OSM instead
 of just locally?


I would like to, but I couldn't convince the (german) community to have 
features like green light optimal speed adivsory (glosa) and red light 
duration advisory (rlda). May be there are good reasons, so I don't complain.
link to forum:
http://forum.openstreetmap.org/viewtopic.php?id=20041

link how glosa works:
www.ampelmeter.com

this features require to have a clean junction and traffic signals model and 
additional tags.
one junction = one relation, this is already proposed since many years and 
nothing happens.
driving directions as relations from-via-to


I don't see other options than:
fork osm
or
implement my and other peoples proposals.

I think osm is fixated to have a good-looking maps but is overloaded for 
routing and my application, e.g. some bigger junctions have a lot of nodes and 
ways. I planned to simplify roads and junctions.

What would you do?

martin

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] API threw unexpected NoMethodError exception

2013-04-06 Thread Martin Schafran
routing is not enough

martin

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] API threw unexpected NoMethodError exception

2013-04-06 Thread Peter K
Martin,

 routing is not enough

Why not? I don't see your problem. Do you have an example?

 how can i import data partially and consistent?

Regarding routing: IMO this is possible when you just import the ways in
your current boundary (and all of the involved nodes).

 one junction = one relation, this is already proposed since many years and 

You can generate the data you like out of OSM like all routing software
is doing these days ...

Regards,
Peter.

 routing is not enough

 martin


-- 
GraphHopper.com Your way is our destination!


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] API threw unexpected NoMethodError exception

2013-04-06 Thread Martin Schafran
On Saturday 06 April 2013 23:55:19 Peter K wrote:
 Martin,
 
  routing is not enough
 
 Why not? I don't see your problem. Do you have an example?
 
i need a different routing namely:
give me the next traffic signals in my driving  direction and a radius of 2 km. 
this is already implemented.
its not give me the route from A to B.


  how can i import data partially and consistent?
 
 Regarding routing: IMO this is possible when you just import the ways in
 your current boundary (and all of the involved nodes).

i deleted all relations and it works

  one junction = one relation, this is already proposed since many years and
 
 You can generate the data you like out of OSM like all routing software
 is doing these days ...

i need to know when the car leaves the junction area: 
to fire the next request
and to determine the driving directions.
traffic signals can have different timings for diff. directions. i need to know 
them for showing and synchronizing GLOSA for all directions.

small crossings work fine and i can generate all data automatically.
its not working on bigger junction unless the junction nodes are in a 
relation.

martin


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev