How to filter to one country?

I have the graph for few countries but I want to filter it in the custom profile by one of them.
version: GH 3.0

I have in my custom profile that part

> {
>    "priority": [
>        {
>           "if": "country != DE",
>           "multiply_by": 0
>        }
>     ]
> }

so I had to add ‘country’ to the ‘graph.encoded_values’, later I had to have
’ spatial_rules.borders_directory: core/files/spatialrules’ in my config file.

Now I have that error
'Error: Cannot compile expression, in in ‘priority’ entry, : File 'in ‘priority’ entry, ', Line 2, Column 24: “DE” is neither a method, a field, nor a member class of “com.graphhopper.routing.ev.Country”

When I add ‘DE’ to the ‘Country’ enum I cannot find any point in any country of my graph.

Has anyone any idea how to handle it?

(I also tried the names from ‘ISO3166-1:alpha3’ )

Why are you running such an old version?

That’s true, firstly I’m going to upgrade to the newest 7.0 version.
Do you have any advice how to do it ?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.