Skip to main content

I have a dynamic workbench which reads KML and/or KMZ files (OGC/Google KML Reader with selected Multiple Files *.kml and *.kmz) do some translation and writes output features to Geodatabase.

Workbench does all the translation and writes output Geodatabase, but when I run this workbench with only KML files (no KMZ files in input folder) I get an error message: 

KML: Cannot open dataset `G:\\path\\**\\*.kmz'

KML: Error initializing reader

When I run this workbench only with KMZ files (no KML files in input folder) I get an error message: 

KML: Cannot open dataset `G:\\path\\**\\*.kml'

KML: Error initializing reader

When I run this workbench with both KML and KMZ files in the input folder I don't get the error message.

 

Can you give me some tips on how to work around this problem so that the error message does not show up in the log? Or can it show up as a warning rather than an error? It is confusing for the Workbench user when they get the error message, and the workbench actually works correctly.

 

I've tried to use the Scripted parameter, which checks for KML or KMZ files or both types of files in the input folder and returns a string: G:\\path\\**\\*.kml or G:\\path\\**\\*.kmz or G:\\path\\**\\*.kml, G:\\path\\**\\*.kml depending on the files found in the input folder. And the Scripted parameter is linked to Source Google KML File or URL (Dataset) as Default Value by $(Scripted parameter Identifier).

 

However, this workaround only works in cases where the input folder contains only KML files or only KMZ files. If the input folder contains both KML and KMZ files, the workbench returns an error:

KML: Cannot open dataset `C:\\path\\**\\*.kml,C:\\path\\**\\*.kmz'

KML: Error initializing reader

and fails. 

 

Hi @urszulacl​,

Instead of a combination of *.kml and *.kmz, please try using *.km? instead. This will pick up both KML and KMZ files, avoiding the error.


Reply