I am trying to developing an iOS app using AGSSceneView exactly like the sample in arcgis-ios-sdk-samples. When I am using the Mission files *.CSV file given in the above sample it is working fine. But when I try to use a self created mission file it give error Precondition failed in below module.Can somebody help me that how to create a Mission file in CSV format.
Thanks in advance.
Solved! Go to Solution.
Hi Afroz,
Unfortunately I cannot reproduce your error. I tried with the csv you provided and it doesn't yield the precondition failure.
One observation I have is that your csv file has a line ending character of CR (\r), or Carriage Return, which means it's the Mac OS 9 style of line ending. It could be the problem that makes your program not work, depending on your machine's locale. To see if it is the issue, try with the file attached, or use any text editor to change line ending symbol to LF (\n), or Line Feed.
Further, would you please let me know the best method of creating the Mission file in CSV format with all 6 parameters.
There isn't a reason we have to use csv. There is also no trick to create csv. We simply need a way to provide some tabular data to the program. It can be txt, or csv, or yaml, etc. Just make sure the way you parse the data matches how you created them.
Me personally tend to use a purely "text-editor plus scripting" way to deal with csv files.
Text editors: Sublime, Notepad++, VSCode, Atom, etc.
Code: Python with import csv and import pandas
Hope it helps!
Hi,
Can you share your csv file or at least a few lines in it? The screenshot seems to indicate the data in your csv is not 6-component/column. Maybe your csv has some encoding issue and the `StringProtocol.components(separatedBy:)` function is not parsing it correctly.
The csv themselves are pretty intuitive: longitude, latitude, z (height), heading, pitch, roll.
Hello Ting,
Thanks a lot for your reply. I am sharing my CSV file as an attachment. Here, I would like to eleborate that I am creating a tabular file using Number App of Apple and then export as CSV file. While debugging the code I noticed that it automatically insert a blank line like ("") and it give error as the value find by Precondition is 1 not 6. I also noticed that when I directory drag the mission file from ArcGIS Runtime Sample, it works fine but if I change any parameter out of 6, it starts giving the same error. I am sure you can better analyze the problem.
Further, would you please let me know the best method of creating the Mission file in CSV format with all 6 parameters.
Looking forward anxiously to get the solution from your side.
Thanks & regards,
Afroz Alam
Hi Afroz,
Unfortunately I cannot reproduce your error. I tried with the csv you provided and it doesn't yield the precondition failure.
One observation I have is that your csv file has a line ending character of CR (\r), or Carriage Return, which means it's the Mac OS 9 style of line ending. It could be the problem that makes your program not work, depending on your machine's locale. To see if it is the issue, try with the file attached, or use any text editor to change line ending symbol to LF (\n), or Line Feed.
Further, would you please let me know the best method of creating the Mission file in CSV format with all 6 parameters.
There isn't a reason we have to use csv. There is also no trick to create csv. We simply need a way to provide some tabular data to the program. It can be txt, or csv, or yaml, etc. Just make sure the way you parse the data matches how you created them.
Me personally tend to use a purely "text-editor plus scripting" way to deal with csv files.
Text editors: Sublime, Notepad++, VSCode, Atom, etc.
Code: Python with import csv and import pandas
Hope it helps!