CSV and KML file

Discussions about CSEntry
Post Reply
khurshid.arshad
Posts: 572
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

CSV and KML file

Post by khurshid.arshad »

Dear Team

There is a way to get information in CAPI from KML and CSV files on Andriod. We are using Mapit for data collection. Mapit save all the data in CSV and KML file.
Thanks.
A.
sah
Posts: 97
Joined: May 28th, 2015, 3:16 pm

Tablet Specification

Post by sah »

Hello Team,
Have any one use HP Pro 10 EE G1 Tablet for CAPI.Any review on using the Windows Tablet will be appreciated as I plan to use it for my current project.

Thanks,
Sah
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: CSV and KML file

Post by josh »

There is no easy way to read CSV or KML in CSPro. It is possible to write your own CSV or KML parser in CSPro logic using the fileread() function. This is not too hard for CSV files since the format is not too complicated but it is very complicated for KML since that is not a simple format.

For CSV you would call fileread() in a loop to read one of line of text from the file at a time into a string variable. Then for each line you would use the pos() function to find the positions of the commas in the line and then extract the strings in between the commas using substring expressions. The tricky part is handling commas inside double quotes since in a CSV file you are not supposed to treat those as separators but if MapIt doesn't generate any such strings then you could ignore them.
khurshid.arshad
Posts: 572
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: CSV and KML file

Post by khurshid.arshad »

thanks.
a.
Post Reply