|
10 | 10 | # pylint: enable=wildcard-import,unused-wildcard-import,wrong-import-order,wrong-import-position,import-error,no-name-in-module |
11 | 11 |
|
12 | 12 | # Third-party imports |
13 | | -import json |
14 | 13 | import arcpy |
15 | 14 |
|
16 | 15 | # Local imports |
@@ -89,26 +88,12 @@ def _create_layers(self, layer_path): |
89 | 88 | layer_obj = create_layer(self._proj_zip, layer_string) |
90 | 89 | self._layers.append(layer_obj) |
91 | 90 |
|
92 | | - if layer_obj: |
93 | | - |
94 | | - # Mosaic imagery datasets have different internal structures and need |
95 | | - # to be handled differently from other layers. |
96 | | - layer_json = json.loads(layer_string) |
97 | | - if layer_json["type"] == "CIMMosaicLayer": |
98 | | - mosaic_children_paths = layer_obj._get_mosaic_child_paths() |
99 | | - |
100 | | - for mosaic_child_path in mosaic_children_paths: |
101 | | - mosaic_child_layer = self._create_layers(mosaic_child_path) |
102 | | - |
103 | | - # build parent/child relationships |
104 | | - mosaic_child_layer._parent = layer_obj |
105 | | - layer_obj._children.append(mosaic_child_layer) |
106 | | - else: |
107 | | - for child_path in layer_obj._get_child_paths(): |
108 | | - child_layer = self._create_layers(child_path) |
109 | | - |
110 | | - # build parent/child relationships |
111 | | - child_layer._parent = layer_obj |
112 | | - layer_obj._children.append(child_layer) |
| 91 | + if layer_obj: |
| 92 | + for child_path in layer_obj._get_child_paths(): |
| 93 | + child_layer = self._create_layers(child_path) |
| 94 | + |
| 95 | + # build parent/child relationships |
| 96 | + child_layer._parent = layer_obj |
| 97 | + layer_obj._children.append(child_layer) |
113 | 98 |
|
114 | 99 | return layer_obj |
0 commit comments