Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jamelmessaoud
Creator II
Creator II

Load Data

Hi guys,

I have downloaded a sample Geo-Analytics file which calculates the mileage between two points

[points]:

LOAD * INLINE "

id|start|end

1|'[-3.043363,52.848618]'|'[-2.745306,53.214716]'

2|'[-2.752572,53.037916]'|'[-1.479477,53.239670]'

" (delimiter is '|') ;

The above load statement works brilliantly but my problem is that I would like to load the data from a QVD file

I have tried to replicate the QVD load (like above) but this doesn't work

[points]:

LOAD

    vehicle as id,

    '[' & start_longitude & ',' & start_latitude & ']' as start,

    '[' & end_longitude & ',' & end_latitude & ']' as end

FROM

     QVD File (qvd)  

Is it because the QVD file needs loading pipe delimited?  Not sure you can do this?

What I am seeing when I load like this is the same distance calculated for two completely different routes which is obviously not correct.

Perhaps I am going about this the wrong way?  I would appreciate any advice

Thanks


2 Replies
Patric_Nordstrom
Employee
Employee

Hi Jamel,

Should work, try plotting start and end on the QGA map just to make sure the formatting works and the points are in the right place.

Another option is to use GeoMakePoint(lat_field_name, long_field_name) which does the same thing

Thanks,

Patric

jamelmessaoud
Creator II
Creator II
Author

Hi Patric,

Thanks for the reply.

I have found the problem.  I was using a vehicle registration number as the ID column so in essence the ID was always the same for each row of data. I have used a unique ID now and it works!

Thanks also for the tip regarding Geomakepoint that will save me some time/hassle