Model Builder need to merge results of iterator (kml to layer)

6050
3
05-07-2016 07:33 PM
MattCamp
New Contributor II

I'm trying to automate a very large batch conversion of kml files. I ultimately want a single shapefile or feature class with all of the kml files info and geometry. I've got the conversion part working but getting them into a single output file is where I'm stuck. My model:

Model.JPG

It won't let me link to the merger tool using the outputs from the iterator as the input.

I've also tried nesting the model above in a new model to then perform the merge:

Model2.jpg

Same result. Something about the kml to layer output isn't jibing. Here's a view of the output workspace of the conversion:Workspace.JPG

The names of the feature class in each GDB has been giving me problems and I guess could be the issue here.

I don't really need to save the intermediate data or files here, so if there is another route I should pursue that's fine as long as I can get all of these kmls into a single shapefile.

Thanks

Matt

0 Kudos
3 Replies
DanPatterson_Retired
MVP Emeritus

did you see the script example in the help files which allows you to consolidate all the gdb output of the conversion to a single gdb?  If you need to stick with modelbuilder then perhaps you can consider its workflow

KML To Layer—Help | ArcGIS for Desktop

0 Kudos
MattCamp
New Contributor II

Dan,

Thank you for your response. I did try that script. I don't know python but was able to to get it  to do the conversion. I still couldn't get it into the merge tool automatically once the script ran.

Matt

0 Kudos
AbdullahAnter
Occasional Contributor III

1- You should check shapes types (Point - polyline - polygon), you can't merge different types in single output.

2- replace Merge tool with Append Tool.

0 Kudos