Search location param for region Europe

deals with geocoding and reverse geocoding in the context of PTV Geocoding&Places, PTV Geocoding&Places OSM and PTV xLocate 1 and 2
Post Reply
stefan.rotaru
Posts: 7
Joined: Sat Mar 13, 2021 2:03 pm

Search location param for region Europe

Post by stefan.rotaru »

Hi,

Is there a way to filter (get) the results for SeachLocations (by text) only for places in Europe?
(Other than writing in the request all the allowed country codes in the field allowedCountries)

Thank you!
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Search location param for region Europe

Post by Bernd Welter »

hello Stefan,

currently this is not possible. In fact we invented the "countries" based filter some versions ago and we just added the more detailed "state" filter in v2.22 (I'll demonstrate this in the webinar 24.3.2021)

I'll forward this question to PM.
Maybe a static list of european ISO2 codes would do a fine job?

As far as I know these codes are used to benefit from the index in terms of performance (and of course you wouldn't have to filter on client side).

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:
stefan.rotaru
Posts: 7
Joined: Sat Mar 13, 2021 2:03 pm

Re: Search location param for region Europe

Post by stefan.rotaru »

Ok, can you please post/send a list of european country codes that can be used as filter in the request?
Thank you!
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Search location param for region Europe

Post by Bernd Welter »

Well, the following list (66 elements) is not an official one...
Grabbed it from user Nicocavallo (https://gist.github.com/henrik/1688572)
AT,BE,BG,HR,CY,CZ,DK,EE,FI,
FR,DE,GR,HU,IE,IT,LV,LT,LU,MT,NL,
PL,PT,RO,SK,SI,ES,SE,GB,GF,GP,MQ,
ME,YT,RE,MF,GI,AX,PM,GL,BL,SX,AW,
CW,WF,PF,NC,TF,AI,BM,IO,VG,KY,FK,
MS,PN,SH,GS,TC,AD,LI,MC,SM,VA,JE,GG,GI
Is said to contain both EUROPEAN COMMUNITY and the others ;-)
Usage: at your own risk. I also forwarded this question to DATA to get an officially approved list. Our regular EU city map is based on 52 country units (incl. Russia)

Best reards,
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:
stefan.rotaru
Posts: 7
Joined: Sat Mar 13, 2021 2:03 pm

Re: Search location param for region Europe

Post by stefan.rotaru »

Ok, I will use it on my own risk :)) thanks!
Joost
Posts: 310
Joined: Fri Apr 25, 2014 1:46 pm

Re: Search location param for region Europe

Post by Joost »

We do have a list we internally use for creating high performance networks. It is a bit different then the github list.
"AD", "AL", "AM", "AT", "AW", "AZ", "BA", "BE", "BG", "BL", "BY", "CH", "CW", "CY", "CZ", "DE", "DK", "EE", "ES", "FI", "FO", "FR"
, "GB", "GE", "GF", "GI", "GL", "GP", "GR", "HR", "HU", "IE", "IS", "IT", "KZ", "LI", "LT", "LU", "LV", "MC", "MD", "ME", "MF"
, "MK", "MQ", "MT", "NC", "NL", "NO", "PF", "PL", "PM", "PT", "RE", "RO", "RS", "RU", "SE", "SI", "SJ", "SK", "SM", "SX", "TR"
, "UA", "UZ", "VA", "WF", "YT"
Joost Claessen
Senior Technical Consultant
PTV Benelux
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Search location param for region Europe

Post by Bernd Welter »

You could also use the following xRuntime request to gather the ISO 2 country codes of the countries in the map

Code: Select all

{
  "dataInformationOptions": {
    "returnOnlyLicensedMapFeatures": true
  },
  "resultFields": {
    "continents": true
  }
}
Attachments
AD,AL,AM,AT,AZ,BA,BE,BG,BY,CH,CY,CZ,DE,DK,EE,<br />ES,FI,FO,FR,GB,GE,GI,GL,GR,HR,HU,IE,IS,IT,KZ,LI,<br />LT,LU,LV,MC,MD,ME,MK,MT,NL,NO,PL,PT,RO,RS,RU,<br />SE,SI,SJ,SK,SM,TR,UA,UZ,VA
AD,AL,AM,AT,AZ,BA,BE,BG,BY,CH,CY,CZ,DE,DK,EE,
ES,FI,FO,FR,GB,GE,GI,GL,GR,HR,HU,IE,IS,IT,KZ,LI,
LT,LU,LV,MC,MD,ME,MK,MT,NL,NO,PL,PT,RO,RS,RU,
SE,SI,SJ,SK,SM,TR,UA,UZ,VA
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:
Post Reply