GeoAnalytics

Discussion Board for collaboration regarding Qlik GeoAnalytics.

Announcements
Happy New Year! Cheers to another year of collaboration, connections and success.

Who Me Too'd this solution

joostvanegmond7
Partner - Creator
Partner - Creator

Hi ASC-Mike, 

You should change the datetype of the fields, using GeoMakePoint. Storing the fields as text is causing the issue.

 

Solution: 

// Step 1: Load minimal test data
GeoCustomer2Test:
LOAD distinct
GeoCustomerSID,
GeoMakePoint(40.7128,-74.0060) AS CustomerGeoPoint, // New York coordinates directly as string
GeoMakePoint(34.0522,-118.2437) AS WarehouseGeoPoint // Los Angeles coordinates directly as string
INLINE [
GeoCustomerSID
1
2
];

[RoutesResultTable]:
Load * Extension GeoOperations.ScriptEval('
SELECT _autoIndex_, Distance, Duration, Status, LowResLine, dataset.WarehouseGeoPoint, dataset.CustomerGeoPoint FROM
Routes(criteria="fastest", transportation="car", destField="WarehouseGeoPoint", geometryType="point")
DATASOURCE dataset INTABLE crs="auto", pointField="CustomerGeoPoint"
', GeoCustomer2Test);

 

georoutes.png

View solution in original post

Who Me Too'd this solution