I have a large JSON file which I download from ArcGIS Server REST (size is 140MB). When I try to execute the JSONToFeatures Geoprocessing tool on this file I get an error.
Code: (call below method with arguments toolName="JSONToFeatures", a path for input json and a path for output SHP file).
private object RunTool(string toolName, object[] parameters) {
IVariantArray gpParams = new VarArrayClass();
IGeoProcessorResult gpResult = new GeoProcessorResult();
foreach (object o in parameters)
gpParams.Add(o);
object rev = new object();
try {
gpResult = Geoprocessor.Execute(toolName, gpParams, null);
return gpResult.ReturnValue;
}
catch (COMException comEx) {
throw new Exception(Geoprocessor.GetMessages(ref rev), comEx);
}
finally {
ReleaseObjects(new object[] { gpParams, gpResult });
}
}
When executed returns the following error: Executing: JSONToFeatures input_path output_path Start Time: Thu Jan 31 14:32:43 2019 ERROR 999998: Unexpected Error. Failed to execute (JSONToFeatures). Failed at Thu Jan 31 14:32:45 2019 (Elapsed Time: 1,48 seconds)
When I execute JSONToFeatures tool from within ArcDesktop ModelBuilder execution proceeds successfully.
Please note that on small files of size 1-10 MB (which is the normal size of files processed by the code above) there are no problems.
This error is very generic. How do I need to proceed?