Maximum speed in segment

deals with geocoding and reverse geocoding in the context of PTV Geocoding&Places, PTV Geocoding&Places OSM and PTV xLocate 1 and 2
pedrod.marcos
Posts: 6
Joined: Fri Jun 19, 2020 1:54 pm

Maximum speed in segment

Post by pedrod.marcos »

Hi,
When we call PTV xLocate in order to know cartographic reference of a point (with coordinates), we receive city, postal code, street, state, country, etc, but we need the speed limit of the segment of the road.
Can you let us know how we can get this speed limit using xLocate?

Thanks and regards.
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Maximum speed in segment

Post by Bernd Welter »

Hello Pedro,

As you might know we currently support 2 different major versions of our APIs (xServer1 and xServer2).
In xServer 1 there was some option to gather the speeds more or less (through a dummy routing with slightly different coordinates):
https://xserver.ptvgroup.com/forum/view ... imit#p3046
Unfortunately the coverage of this kind of data wasn’t optimal – depending on the provider you used.

I'm not aware of a proper successor in xServer2 at the moment and therefore I forwarded the topic to our Development to get a strategic statement.

Can you give us more details about the usecase? Maybe this helps us to understand how to approach this challenge properly.

Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
pedrod.marcos
Posts: 6
Joined: Fri Jun 19, 2020 1:54 pm

Re: Maximum speed in segment

Post by pedrod.marcos »

Bernd Welter wrote: Can you give us more details about the usecase? Maybe this helps us to understand how to approach this challenge properly.
Hi Bernd,
We are a GPS data provider for vehicles fleet. Our customers need to know if its vehicle is faster than maximum speed is allowed. We invoke to xLocate with coordinates and xLocate send to us postal code, city, state, address, ... even road, but not speed limit of this segment of the road.
To invoke a second call to xRoute to get this speed limit has several cons,
1. it takes a long time for us,
2. we need two points, when only need this speed limit in a place (that is inside one segment, and only one),
3. if we invoke xRoute with two points, we could find several segments, with differents speed limit each one.

Thanks and regards.
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Maximum speed in segment

Post by Bernd Welter »

Hello Pedro,

thanks foir the usecase description. I also forwared the thread to your primary consulting contact. Furthermore I will ask one of our dutch buddies (he is in touch with some customers who have the same usecase) whether he could summarize his customers strategy in a public post.

One potential idea I have in mind right now is a look-aside table which contains the speed values:

determineSpeed(x,y)
  • determine SegmentID based on (x,y) - webservice call towards PTV xServer INTERNET
  • determine speed of segmentID - database call to a local database
The additional database table would have to be licensed and as the segments IDs vary from map version to map version it would require a proper update license strategy, too.

Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Joost
Posts: 310
Joined: Fri Apr 25, 2014 1:46 pm

Re: Maximum speed in segment

Post by Joost »

Reading your use case: I would recommend build this solution around xLocate. There is often to many inaccuracies in a GPS signal causing xLocate to snap to the incorrect road. I would advise to look at xMapmatch and it's ability to also take heading into account and more. In my experience there is very little room in business case around speed limits for falsely flagging a speed violation because the software took retuned a small side road in stead of a main road so to speak.

xMapmatch also has another advantage: it can return the most common speed limit directly. However if you need to be able to handle more (like time dependent speed limits) you still need the side lookup tables.
Joost Claessen
Senior Technical Consultant
PTV Benelux
pedrod.marcos
Posts: 6
Joined: Fri Jun 19, 2020 1:54 pm

Re: Maximum speed in segment

Post by pedrod.marcos »

Hi Joost,
How can I invoke a call to xmapmatch to get the speed limit we need?
Would you be good enough to send me some example?

Thanks in advance.
pedrod.marcos
Posts: 6
Joined: Fri Jun 19, 2020 1:54 pm

Re: Maximum speed in segment

Post by pedrod.marcos »

Hi all,
Amar tell us what is possible is to get back the provider ID and look up the speed limits in a separate table. Thus we need invoke two calls to xServer. The first call is that we are doing now. But the second one (in order to get the speed limit with provider ID) would be a new invoke for us. We need to know how fast is this second invoke, if it takes the same order of time as calculating a route between two points, or it takes the same order of time as getting inverse georeference. This it is very important for us.

Thanks in advance.
pedrod.marcos
Posts: 6
Joined: Fri Jun 19, 2020 1:54 pm

Re: Maximum speed in segment

Post by pedrod.marcos »

Hi all,
We have installed database with countries tables speed limits.
The columns are LINKID, DIRECTION and SPEEDLIMITID.
How can I know which DIRECTION is? If I know bearing how can I know to use DIRECTION 0 or DIRECTION 1?
Thanks and regards.
Joost
Posts: 310
Joined: Fri Apr 25, 2014 1:46 pm

Re: Maximum speed in segment

Post by Joost »

For xmapmatch you can parse it out of the vendorId on the matched segment on the matchedLocation.path.Last() .

For xLocate we do not have a way for you determine the DIRECTION.

The direction is determined by our data provider and they do not have a orientation rule as far as I am aware of. So our engine need to traverse the segment to determine the direction. xMapmatch does this, xLocate does not.

For xLocate i usually take the highest limits defined.
Joost Claessen
Senior Technical Consultant
PTV Benelux
pedrod.marcos
Posts: 6
Joined: Fri Jun 19, 2020 1:54 pm

Re: Maximum speed in segment

Post by pedrod.marcos »

Ok Joost, we will review this point.
Another question: Inside each .spl file there are several columns, and I don't know what is its function,
For Nederland,
* LEGALLIMITTYPE: possibles values, 1 and 2
* LIMITTYPE: only one value, 1
* LIMITWHEATHERCONDITION: possibles values, 1 and 2
* LIMITDRIVERCONDITION: only one value, 0
* LIMITTIMECONDITION: possibles values, 0 and 1
* TIMEPERIODID: no values
* LIMITAREACONDITION: 4 possibles values, 0, 1, 2 and 3
* LIMITMANNERCONDITION: only one value, 0
* LIMITLANECONDITION: only one value, 0
* NUMLANES: only one value, 0
* LIMITROADCONDITION: possibles values, 0 and 1
* TSYSCODE: no values
* DESCRIPTION: no values
Can you explain me?

Thanks and regards.
Post Reply