Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
dilip1234
Creator
Creator

How to use NamedPointLoopkup and NamedAreaLookup service in Qlik sense Geo analytics?

I am using Geo analytics and performance of my map was very slow. Earlier I was using Country_Name in area layer dimension, now I am using Country_Geometry which I got from Qlik service. After that I have noticed that performance of map is increased by 20-30%.

How I got Country_Geometry column of LocationService:

Named Area Layer.PNG
Once after submit this setting I will get script like below in editor:

SQL SELECT [Country_Name], [Country_Geometry], [CountryIso2], [Country_Adm1Code], [Country_Adm2Code], [LocationDbType], [LocationDbId] FROM Load(dataset='Country')

  DATASOURCE Country LOCATIONSERVICE geometry='AREA', type='APCLI', country='', serviceName='default';

Same thing I want to do for my bubble layer pins, so that I can use bubble lat long directly instead of using City name in bubble layer dimension. I am trying the same thing for City in location service:

Named Point Lookup.PNG

Can anybody suggest me that how to use "NamedAreaLookup" and "NamedPointLookup" service to load geometry data?

Thanks

Dilip Solanki

Thanks
Dilip Solanki
5 Replies
Anonymous
Not applicable

Hi Dilip,

There's a couple of approaches to consider. Firstly, if you just want a list of cities and their geographies for example, you could just use the Load operation to include them as a table in your app, like so:

Load operation.PNG

If instead however you have a list of geography names you want to look up the geometry for, such as country, you can use the lookup operations as you've suggested. In the example below I have some country names already loaded from another table ([Suppliers], with fields [ID] and [CountryName]) and I want to look up the area geometries:

named area lookup.PNG

This operation allows me to load a table with the geometries of the countries I already have in my app. As you say, with the geometries stored locally in your app you can overcome the latency issue that affects some regions when using the cloud hosted geoanalytics server. Another option is to purchase your own geoanalytics server instance and implement it such that latency is no longer an issue.

I trust I've understood your query properly and managed to assist.

Cheers,

Rod

dilip1234
Creator
Creator
Author

Hi Rod,

Thanks for your answer.

I have tried getting cities geography as you have shown above. I am getting licensing issue might. I will take care of that. But when I see the city location script, there is one field "Cities_Geometry", will this field return latitude - longitude of city or geometry?

Is there any way to get lat long through Qlik sense?

/* Generated by GeoAnalytics for operation Load ---------------------- */

[Cities]:

SQL SELECT [Cities_Name], [Cities_Geometry], [CountryIso2], [Cities_Adm1Code], [Cities_Adm2Code], [LocationDbType], [LocationDbId] FROM Load(dataset='Cities')

DATASOURCE Cities LOCATIONSERVICE geometry='POINT', type='P*', country='', serviceName='default'

;

/* End GeoAnalytics operation Load ----------------------------------- */

Thanks

Dilip Solanki

Thanks
Dilip Solanki
Anonymous
Not applicable

Hi Dilip,

It will return at lat-long pair expressed as a geometry. Geometry is used as a generic term, it could be a point or a shape depending on the context. Note the entry for "Geometry Kind" in the Load operation example, it is set to "Point".

Here's an example:

/* Generated by GeoAnalytics for operation Load ---------------------- */

[Cities]:

SQL SELECT [Cities_Name], [Cities_Geometry] FROM Load(dataset='Cities')

DATASOURCE Cities LOCATIONSERVICE geometry='POINT', type='P*', country='AU', serviceName='default'

;

Loads:

Capture.PNG

Cheers,

Rod

dilip1234
Creator
Creator
Author

Ok. That's really great. Let me resolve my licensing issue and then will see this.

Thanks Rod.

Thanks
Dilip Solanki
dilip1234
Creator
Creator
Author

Hi Rod,

I have installed Geoanalytics plus setup and resolved above issue, but while loading data from this service, I'm getting below issue:

GeoPlusResult.PNG

Can you help me out with this?

Thanks

Dilip Solanki

Thanks
Dilip Solanki