Adjusting an existing path to the map

This forum deals with mapmatching.
Post Reply
joaofigueira
Posts: 4
Joined: Fri Jun 20, 2014 10:18 am

Adjusting an existing path to the map

Post by joaofigueira »

I have the following use case that I would like to know if it is possible to implement (and how):

- Given an existing vehicle path, determine the incurred toll costs.

Toll costs are calculated using the route service, but this service does not seem to cope very well when fed with real GPS-generated vehicle locations (lat / long pairs). This is understandable because the sampled vehicle GPS data is not exact and some of these points lie outside of the road or, on some occasions, might even lie on adjacent roads. After feeding this type of data to the route service I got multiple crossings of the same toll, or multiple crossings in opposite directions.

It seems clear that my data needs to, somehow, be "adjusted" to the map so that it can then be fed to the route service. Can this be done with the map match service?

TIA
Joost
Posts: 307
Joined: Fri Apr 25, 2014 1:46 pm

Re: Adjusting an existing path to the map

Post by Joost »

This can be done by xMapmatch. You fan feed the GPS coordinates to xMapmatch and receive correct coordinates back. Apart from the corrected coordinates you also receive the segment id. You can use this to feed the xRoute to have it calculate the exact routing with the toll costs details.

You can have a look at my test client http://xserver.ptvgroup.com/forum/viewt ... p?f=8&t=12 . It comes with c# source code.

Note: since GPS signals are very different from each other (different accuracy, different poll rate), using the proper profile becomes really important to get out a proper result. If you do not get proper result i would recommend having you data analysed to come up with a better profile to suit your needs.
joaofigueira
Posts: 4
Joined: Fri Jun 20, 2014 10:18 am

Re: Adjusting an existing path to the map

Post by joaofigueira »

Hi,
Thank you for your sample. It really is helping me figure out what information I was missing. You mention a "profile" for the data input (set on the CallerContext). Where can I read more about this profile?

Regards,
JP
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Adjusting an existing path to the map

Post by Bernd Welter »

Hello Joao,

within your xMapmatch server's configuration folder there are several files named xmapmatch-[profilename].properties:
  • xmapmatch-default.properties
  • xmapmatch-dense-signal.properties
  • xmapmatch-local-matching.properties
  • xmapmatch-sparse-signal.properties
These files contain a lot of additional algorithm parameters that have important impact on the quality of the results.
Now by using a specific CallerContext and it's profile value you can request which file to be used (default is the standard)

Code: Select all

<ns2:CallerContext_5>
<ns6:wrappedProperties>
<ns6:CallerContextProperty value="sparse-signal" key="Profile"/>
</ns6:wrappedProperties>
</ns2:CallerContext_5>
Now please have a look the files and the descriptions of the parameters. If necessary you can also create a new profile xmapmatch-joaorules.properties and adapt the values in the way you want...

Does this answer the question?

Regards Bernd
joaofigueira
Posts: 4
Joined: Fri Jun 20, 2014 10:18 am

Re: Adjusting an existing path to the map

Post by joaofigueira »

Hi Bernd,

I believe this does answer my question. I am changing my code in order to reflect Joost's code sample because it did seem to provide a quite accurate match to my data. I am also looking at the contents of these files in order to check if I need to customize any of the parameters.

Thank you very much!

JP
joaofigueira
Posts: 4
Joined: Fri Jun 20, 2014 10:18 am

Re: Adjusting an existing path to the map

Post by joaofigueira »

Hi Bernd,

Should I see these files somewhere in my project directory, or are these downloadable from the web?

Thanks!
JP
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Adjusting an existing path to the map

Post by Bernd Welter »

Hello Joao,

depends:
  • Local installation
    in case of a local installation you should find the files in the CONF folder, see attached screenshot of my laptop.
  • xServer internet aka xSaaS
    If you use xServer internet aka xSaaS you need to know the names of the available files and you can't add further files because the configuration is fix.
Regards Bernd
Attachments
bernds xmapmatch directory
bernds xmapmatch directory
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Adjusting an existing path to the map

Post by Bernd Welter »

About xSaaS:

the available profiles are listed in the
http://xserver.ptvgroup.com/en-uk/cookb ... formation/

Just check the section Available xServers and Addons
https://svc-eu-n-test.cloud.ptvgroup.co ... rInfo.ashx

Bernd
Joost
Posts: 307
Joined: Fri Apr 25, 2014 1:46 pm

Re: Adjusting an existing path to the map

Post by Joost »

Extra note about the profiles:

From version 1.18.1 xml profiles are being used instead of properties files. You now can find them in the <xMapmatch directory>/conf/profiles directory. The reference documentation for profiles: http://xserver.ptvgroup.com/fileadmin/f ... e%7C_____0

If you need to convert old profiles, please use the converter which is included in the xMapmatch. You can find the converter in the <xMapmatch directory>/tools/profileconverter directory. There is a html file with documentation how to use the converter included in this directory.
Post Reply