Currency Romanian leu - Romania code ROL

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.
Post Reply
nirengp
Posts: 15
Joined: Wed Jun 28, 2017 12:54 pm

Currency Romanian leu - Romania code ROL

Post by nirengp »

Hi,

We encountered the problem of wrong ISO Code 3 for Romanian leu - Romania currency is returned from PTV xRouteServer. Actually ISO Code 3 should be RON. However, in CountryInfo.Currency code we are getting it as ROL.
So how can this be corrected?

Thank you
Regards,
Niren Patel
Core Developer
BRABENDER tech
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Currency Romanian leu - Romania code ROL

Post by Bernd Welter »

Hello Niren,

I created a bugtracking task (MPXSRV-4404). Looks like we have an issue here ;-)

Now we need a feedback from DEV.

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:
nirengp
Posts: 15
Joined: Wed Jun 28, 2017 12:54 pm

Re: Currency Romanian leu - Romania code ROL

Post by nirengp »

Hello Bernd,

Any timelines by which we can expect response from DEV.

Thanks
Regards,
Niren Patel
Core Developer
BRABENDER tech
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Currency Romanian leu - Romania code ROL

Post by Bernd Welter »

at least I have a feedback from a consulting colleague (Thanks Joost!):
The countryInfo.currency is deprecated. It is an enumeration so we cannot change this without breaking backwards compatibility. The customer should use currencyISOCode, which is returned if you set countryInfoOptions.currencyDescription=true in your input. The currencyISOCode is correct.
sample response...
sample response...
Please consider to switch to the recommended property,
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:
nirengp
Posts: 15
Joined: Wed Jun 28, 2017 12:54 pm

Re: Currency Romanian leu - Romania code ROL

Post by nirengp »

Hello Bernd,

I tried setting countryInfoOptions.currencyDescription=true while calling calculateExtendedRoute().
However, getting currencyISOCode as null in response.

Is their any sample which I can check to see what am I missing for this?

Thanks
Regards,
Niren Patel
Core Developer
BRABENDER tech
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Currency Romanian leu - Romania code ROL

Post by Bernd Welter »

here's a sample JSON... Maybe a bit oversized (Budapest to Bukarest)

Code: Select all

{
  "waypoints": [
    {
      "$type": "TourPointDesc",
      "linkType": "AUTO_LINKING",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 2902433.3262,
            "y": 5526905.5204
          }
        }
      ]
    },
    {
      "$type": "TourPointDesc",
      "linkType": "AUTO_LINKING",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 2117212.5605,
            "y": 6017026.8256
          }
        }
      ]
    }
  ],
  "options": [
    {
      "parameter": "REQUEST_VERSION",
      "value": "1.6"
    },
    {
      "parameter": "COUNTRY_ENCODING",
      "value": "ISO2"
    },
    {
      "parameter": "ROUTE_LANGUAGE",
      "value": "EN"
    },
    {
      "parameter": "DISTANCE_MEASURE",
      "value": "KM"
    }
  ],
  "exceptionPaths": null,
  "details": {
    "manoeuvres": false,
    "texts": false,
    "nodes": false,
    "binaryPathDesc": false,
    "polygon": false,
    "polygonElevations": false,
    "detailLevel": "STANDARD",
    "dynamicInfo": false,
    "segments": false,
    "segmentAttributes": false,
    "segmentAttributePiggyback": false,
    "manoeuvreAttributes": false,
    "brunnelManoeuvres": false,
    "urbanManoeuvres": false,
    "manoeuvreGroups": false,
    "tollManoeuvres": false,
    "boundingRectanglesC": 0,
    "boundingRectanglesOffset": 1000,
    "totalRectangle": false,
    "extSegments": false,
    "speedLimits": false,
    "featureDescriptions": false,
    "utcOffsets": true
  },
  "countryInfoOptions": {
    "$type": "CountryInfoVehicleOptions",
    "detailedTollCosts": false,
    "allEuro": false,
    "calculatePartTollCosts": true,
    "namedToll": true,
    "tollTotals": true,
    "currencyDescription": true,
    "waypointIndexInTollCostInfo": true
  },
  "callerContext": {
    "properties": [
      {
        "key": "Profile",
        "value": "truckfast"
      },
      {
        "key": "CoordFormat",
        "value": "PTV_MERCATOR"
      }
    ]
  }
}
Here's also the response:

Code: Select all

{
  "$type": "ExtendedRoute",
  "route": {
    "info": {
      "distance": 831805,
      "time": 44433,
      "cost": 540349
    },
    "stations": [
      {
        "$type": "WayPoint",
        "accTime": 0,
        "accDist": 0,
        "iuCode": 40,
        "polyIdx": 0,
        "nodeIdx": 0,
        "segmentIdx": 0,
        "manoeuvreIdx": 0,
        "locationCoord": {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 2902428.6809,
            "y": 5526904.9147
          }
        },
        "matchCoord": {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 2902433.6999,
            "y": 5526905.3336
          }
        },
        "wayPointType": "START",
        "countryCode": "RO",
        "utcOffset": 180
      },
      {
        "$type": "WayPoint",
        "accTime": 44433,
        "accDist": 831804,
        "iuCode": 36,
        "polyIdx": 4864,
        "nodeIdx": 3536,
        "segmentIdx": 2302,
        "manoeuvreIdx": 29,
        "locationCoord": {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 2117208.2621,
            "y": 6017026.2036
          }
        },
        "matchCoord": {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 2117212.7982,
            "y": 6017026.1125
          }
        },
        "wayPointType": "DEST",
        "countryCode": "HU",
        "utcOffset": 120
      }
    ]
  },
  "countryInfos": [
    {
      "iuCode": 40,
      "partRouteInfo": {
        "distance": 613653,
        "time": 33152,
        "cost": 0
      },
      "currency": "ROL",
      "currencyName": "Romanian Leu",
      "currencyISOCode": "RON",
      "countryCode": "RO",
      "additionalInfo": "",
      "tollName": "",
      "tollTotals": {
        "distance": 0,
        "cost": 0
      },
      "perNCRouteInfo": [
        {
          "distance": 453470,
          "time": 20659,
          "cost": 0
        },
        {
          "distance": 148420,
          "time": 11227,
          "cost": 0
        },
        {
          "distance": 10635,
          "time": 1063,
          "cost": 0
        },
        {
          "distance": 1128,
          "time": 203,
          "cost": 0
        },
        {
          "distance": 0,
          "time": 0,
          "cost": 0
        },
        {
          "distance": 0,
          "time": 0,
          "cost": 0
        },
        {
          "distance": 0,
          "time": 0,
          "cost": 0
        },
        {
          "distance": 0,
          "time": 0,
          "cost": 0
        }
      ],
      "perTypeTollDistance": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "perTypeTollPrice": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ]
    },
    {
      "iuCode": 36,
      "partRouteInfo": {
        "distance": 218151,
        "time": 11281,
        "cost": 204202
      },
      "currency": "HUF",
      "currencyName": "Hungarian Forint",
      "currencyISOCode": "HUF",
      "countryCode": "HU",
      "additionalInfo": "",
      "tollName": "",
      "tollTotals": {
        "distance": 204360,
        "cost": 1062783
      },
      "perNCRouteInfo": [
        {
          "distance": 204935,
          "time": 9687,
          "cost": 204202
        },
        {
          "distance": 0,
          "time": 0,
          "cost": 0
        },
        {
          "distance": 8238,
          "time": 789,
          "cost": 0
        },
        {
          "distance": 4301,
          "time": 642,
          "cost": 0
        },
        {
          "distance": 677,
          "time": 163,
          "cost": 0
        },
        {
          "distance": 0,
          "time": 0,
          "cost": 0
        },
        {
          "distance": 0,
          "time": 0,
          "cost": 0
        },
        {
          "distance": 0,
          "time": 0,
          "cost": 0
        }
      ],
      "perTypeTollDistance": [
        0,
        204360,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        204360,
        0
      ],
      "perTypeTollPrice": [
        0,
        1062783,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        1062783,
        0
      ]
    }
  ],
  "partTollCosts": [
    {
      "distance": 204360,
      "costs": [
        {
          "cost": 1062783,
          "currency": "HUF",
          "currencyISOCode": "HUF",
          "currencyName": "Hungarian Forint",
          "iuCode": 36,
          "type": "NATIONALTOLL"
        }
      ]
    }
  ]
}
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:
nirengp
Posts: 15
Joined: Wed Jun 28, 2017 12:54 pm

Re: Currency Romanian leu - Romania code ROL

Post by nirengp »

Hello Bernd,

I tried setting coutryInfoOptions as per the sample you provided.
Still the currencyISOCode in response is null. Not sure why!!.

Is their any configuration required in PTV xServer. We are using xServer version 1.24.
I will give it one more try, and will get back to you.

Thanks
Regards,
Niren Patel
Core Developer
BRABENDER tech
nirengp
Posts: 15
Joined: Wed Jun 28, 2017 12:54 pm

Re: Currency Romanian leu - Romania code ROL

Post by nirengp »

Hello Bernd,

It worked. Thanks for the help.
Regards,
Niren Patel
Core Developer
BRABENDER tech
Post Reply