Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Trick17
Contributor II
Contributor II

Geolocation within () implementation in script

Dear community, 

 

I have problems identifying if a geolocation is within a certain polygon. 

Im tracking ships Geo data and I want to build a flag, that shows if ship is within a certain range of the coast. 

below is an example from my editor script: 

Geo_Location_Ship:

LOAD
Ship,
Route,
timestamp,
lat,
lon,
GeoMakePoint(lat,lon) as Geo_Reference

FROM XXX

COASTAL_AREA:

Harbour,
Area

FROM XYZ

Some additional information to this data: 

Timestamp is a recorded in 5 min intervals and each timestamp has one particular geolocation that is defined in Geo_Reference.

I have further generated a Harbour .kml file that contains the polygon shapes of the harbour areas. 

 

I now want to create a flag that equals 1 if any of the Geo_Reference points lie within any of the harbour areas. 

does anyone know how this would need to look like in the script on this particular example? 

@Patric_Nordstrom I see you have answered a similar question, however I'm not able to apply this to my example. 

 

all help is much appreciated

 

 

 

 

 

 

Labels (3)
1 Reply
Patric_Nordstrom
Employee
Employee

Should work, have a look at the examples for within: https://community.qlik.com/t5/Qlik-Sense-Documents/GeoOperations-Examples-Qlik-GeoAnalytics/ta-p/175...

 

Thanks,

Patric