Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've created small python script that calculates OD matrix between certain locations, i.e. not between each origin and destination but for each origin I have a set of destinations that I want to calculate routes for. I end up with 17 results saved as a .lyr file (don't necessary need to save them on hard drive as such). I would like to merge those results together. The problem is a OD Cost Matrix Layer is in fact a group of layers and I'm only interested in layer Lines.

To sum up: if layer is OD Cost Matrix Layer (group of layers) and Lines is one of the layer in that group and I want to use Merge tool to merge a few of such Lines layers - how do I do it as

arcpy.Merge_management(layer, output)

is obviously giving me an error of input not being a table view.

Many thanks, J

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Found the soultion: to merge those layers I need a list of OD layer names with "\Lines" added to them. Something like that

layers = ["ODlayer1\Lines", "ODlayer2\Lines", "ODlayer3\Lines"]
arcpy.Merge_management(layers, output)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.