Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!

GeoOperations Examples Qlik GeoAnalytics

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Patric_Nordstrom
Employee
Employee

GeoOperations Examples Qlik GeoAnalytics

Last Update:

Jan 30, 2023 4:24:53 AM

Updated By:

Patric_Nordstrom

Created date:

Oct 20, 2020 7:44:42 AM

Attachments

Examples and guides for the Qlik GeoOperations. The examples are self sufficient with data and reloadable. The examples are minimal to explain to basic functionality. Please use the documentation for details of the operations. The examples works on Qlik SaaS and requires a GeoAnalytics license.

GeoOperations is simple, for instance, here's how to load a shapefile:

 

 

 

Load * Extension GeoOperations.ScriptEval('
load() DATASOURCE shape GEOFILE type="shape", 
url="https://dl.dropbox.com/s/ipi6tazxwkbuzu6/continents.zip?dl=0"');

 

 

 

 

Load * Extension GeoOperations.ScriptEval('
load() DATASOURCE cont GEOFILE type="shape", 
url="lib://DataFiles/continents.shpzip")';

 

 

 

GeoOperations Examples.qvf: Example with all basic operations

  • Binning
  • Cluster
  • Closest
  • Dissolve
  • Intersect
  • Load
  • Routes
  • Simplify
  • TravelAreas
  • Within

GeoOperations BigQuery.qvf : Example how to load from Google Big Query (requires a Google BigQuery license and instance).

GeoOperations CSV example.qvf : Example how to use more than one internal table as input.

Qlik Geocoding in GeoOperations.qvf : Example how to use Geocoding, TravelArea and Closest in runtime (requires a Qlik Geocoding license).

Note,  please use the GeoOperations template for Qlik Geocoding, available here: https://community.qlik.com/t5/Qlik-GeoAnalytics-Documents/Qlik-Geocoding-Geocoding-Template-Data-and...

Jan 27, 2022 updated with more examples and DataFiles access.

 

Tags (1)
Labels (1)
Comments
julian_rodriguez
Partner - Specialist
Partner - Specialist

Hello Patric,

Good examples, however, I'd like to test the cluster operation with my own data. ¿Could you provide me an example, please?

thanks

Julian

0 Likes
Patric_Nordstrom
Employee
Employee

@julian_rodriguez  it's very similar to how to do Binning from points, here's an example. Loading first airports and store as points. Then use the points as indata.

 

 

cp_ap:
Load * Extension GeoOperations.ScriptEval('
	Select Name as cp_ap, LocationPoint as cp_ap_pt from
    Load() DATASOURCE cp_ap LOCATIONSERVICE geometry="POINT", type="XIATA", country="us"
');

cp:
Load * Extension GeoOperations.ScriptEval('
  Select INTABLE.cp_ap as cp_ap, ClusterID as cp_id, Clusters.ClusterPoint as cp_pt from
  Cluster(distance="500000")
', cp_ap);

 

 

0 Likes
CHansford
Luminary
Luminary

@Patric_Nordstrom  As the World's expert on GeoOperations, I am trying to generate dynamic Travel Areas that show an individually sized Travel Areas for each point on my map.

Whilst I can get individual Travel areas for 5kms I'm trying to get one point with 5kms and others with 2.5 or 1km .

I'm using the [Data.Source Site Name] as my dimension and this expression in the locations input 

=GeoOperations.ScriptEvalStr('Select TravelArea from TravelAreas(costValue="$(vTA)", costUnit="kilometers", transportation="bird")', GeoTAPoint)

vTA =Aggr(Avg(USDistance),[Data.Source Site Name])

 

Is this possible?

Greatest Regards

Chris

 

 

0 Likes
Contributors
Version history
Last update:
‎2023-01-30 04:24 AM
Updated by: