Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
naveen341
Creator
Creator

The data like country state city in my database is not getting recognised by Idevio maps . is there any base file for idevio maps so that i can map my data to the idevio maps and it recognise the country state city and zipcode

The data like country state city in my database is not getting recognised by Idevio maps . is there any base file for idevio maps so that i can map my data to the idevio maps and it recognise the country state city and zipcode

12 Replies
Ana_Yakushi
Employee
Employee

Hello Naveen,

The location server recognizes multiple names for the same location.

If you are using Area Layers, might be that the data you are looking for is not available. The detail of data varies with the country. Could you tell which country are you working with?

There are more Datapoints than Areas available, you can check first using a Bubble Layer to see if you get any result.

This is a doc that specifies how to help the location server applying formats to your geonames, to reduce coincidences and limiting the search options.

Location Services

Best Regards,

Ana Yakushi

Qlik GeoAnalytics

naveen341
Creator
Creator
Author

HI Ana Yakushi

Thanks for your response.

I tried to investigate on the location services.They specified a format.Can you please explain in briefy about this format.

name[[[,admin2code],admin1code],countrycode][:type]

where

  • name - the name of the feature that should be looked up
  • type - the type of name or type followed by * to match several types, see below for available types
  • admin2code - the region to find the name in
  • admin1code - the first order division, such as state, to find the name in
  • countrycode - the two or three letter ISO country code to find the name in

I have the fields Country,State(Example:IL,NJ,NY),City.

Can you please tell me how to write these fields in the above format.


Appreciate your help.


Regards,

Naveen.

Ana_Yakushi
Employee
Employee

Of course.

Let's say for example that you want to display the city of San Jose in California on the map.

If you use  the text 'San Jose', you will probably get a location anywhere around the world, since there're multiple locations (cities, states, municipalities, etc) with the same name in different countries.

To reduce the coincidences, you should add a location type to specify that you are looking only for a city, like this:

'San Jose:P*'

Again, you can have more than one city with that name, to limit your search to US territory only: 'San Jose,US:P*'

Now, depending on the country, might be that you find more than one San Jose city in different States then you need to add State to your geoname: 'San Jose,California,US:*P'.

When the city exists in different counties: 'San Jose,Santa Clara,California,US:*P'


As you can see, the need to be more specific depends on the country. If you know that the city name is unique across the country, then 'San Jose,US:P*' should be enough. You add more detail to your text if the coincidence rate is high.


By the way, you can use the full name or code for States: 'San Jose,Santa Clara,CA,US:*P'


In your particular case, I suggest to use the format 'City,State,Country:P*'

And for cities we don't have the areas, only the coordinates for the center point, so it is possible to work only with Bubble Layer.


Best Regards,

Ana Yakushi

Qlik GeoAnalytics

naveen341
Creator
Creator
Author

Thanks Much Ana,

If you dont mind few more questions.

1.I am using a line layer so for drill down option in the line layer i had written the expression as below.

ID:

if(count(total distinct OriginCountry)>1, OriginCountry) &

if(count(total distinct OriginCountry)=1 and count(total distinct dlvry_origin_prov_state)>1, dlvry_origin_prov_state) &

if(count(total distinct OriginCountry)=1 and count(total distinct dlvry_origin_prov_state)=1, dlvry_origin_city)&

' - '&

if(count(total distinct DestinationCountry)>1, DestinationCountry) &

if(count(total distinct DestinationCountry)=1 and count(total distinct dlvry_dest_prov_state)>1, dlvry_dest_prov_state) &

if(count(total distinct DestinationCountry)=1 and count(total distinct dlvry_dest_prov_state)=1, dlvry_dest_city).

FROM:

if(count(total distinct OriginCountry)>1, OriginCountry) &

if(count(total distinct OriginCountry)=1 and count(total distinct dlvry_origin_prov_state)>1, dlvry_origin_prov_state) &

if(count(total distinct OriginCountry)=1 and count(total distinct dlvry_origin_prov_state)=1, dlvry_origin_city)

To:

if(count(total distinct DestinationCountry)>1, DestinationCountry) &

if(count(total distinct DestinationCountry)=1 and count(total distinct dlvry_dest_prov_state)>1, dlvry_dest_prov_state) &

if(count(total distinct DestinationCountry)=1 and count(total distinct dlvry_dest_prov_state)=1, dlvry_dest_city).

The issue i am facing here is it is showing the IL state of US in Israel.as ISO code of israel is IL.

Can you please help me in writing this expression in the above format for drill down as you specified.

Once again thanks much for your help.

Regards,

Naveen.

Ana_Yakushi
Employee
Employee

I don't know exactly what is the content of your variables OriginCountry,  dlvry_origin_prov_state, dlvry_origin_city

But let's say that you have:

Country= 'US'

State='IL'

City='Abingdon'

OriginCountry=Country&':XCISO2'

dlvry_origin_prov_state= State&','&Country&':AADM1'

dlvry_origin_city=OriginCity&','OriginState&','&OriginCountry&':P*'

'XCISO2' is to specify the text is a 2-letter country code ( if you have the country full name then use 'APCLI' instead), 'AADM1' is to indicate States and 'P*' for cities.

The geonames sent to the location service would be like:

OriginCountry: 'US:XCISO2' or 'United States of America:APCLI'

dlvry_origin_prov_state: 'IL,US:AADM1'

dlvry_origin_city: 'Abingdon,IL,US:P*'

With this you are solving the problem of IL State being mixed up with Israel.

Best Regards,

Ana

naveen341
Creator
Creator
Author

HI Ana,

Thanks for clarification.

1.I not only have issue with one state IL.i Have like this for many State.So can i directly use the field name like this

OriginCountry=OriginCountry&':XCISO2' ?.

2. IS my conditional drill down expression correct?


Regards,

Naveen.


naveen341
Creator
Creator
Author

HI Ana

I think City look up is not working fine.

is there any other way to lookup for cities.

dlvry_origin_city&','& dlvry_origin_prov_state&','&dlvry_origin_cntry&':P*'.

I Have zipcode also.can i use it after the city? and what is the format for zipcode if i want to use.

It says

city in florida unsucessfull lookup.png

Ana_Yakushi
Employee
Employee

Hi Naveen,

Looking at your error, apparently you are using an Area Layer to display cities on your map.

As I said before, the location server return only center points (no areas) for cities. Try using a Bubble Layer, that should work.

Best Regards,

Ana

naveen341
Creator
Creator
Author

HI Ana

1.my requirement is to use the line layer  and area layer when i drill down to city level the cities are not recognised properly and some countries to in line layer.what is the format i need to use for correct recognisation of countries states and cities in line layer.

2.if i want to use the zipcode also in lne and area layer what is the format i need to use.

Regards,

Naveen.