| 77 | == How do I tag interior polygons? == |
| 78 | |
| 79 | At the moment create_mesh_from_regions does not allow interior |
| 80 | polygons with symbolic tags. If tags are needed, the interior |
| 81 | polygons must be created subsequently. For example, given a filename |
| 82 | of polygons representing solid walls (in Arc Ungenerate format) can |
| 83 | be tagged as such using the code snippet: |
| 84 | {{{ |
| 85 | # Create mesh outline with tags |
| 86 | mesh = create_mesh_from_regions(bounding_polygon, |
| 87 | boundary_tags=boundary_tags) |
| 88 | # Add buildings outlines with tags set to 'wall'. This would typically |
| 89 | # bind to a Reflective boundary |
| 90 | mesh.import_ungenerate_file(buildings_filename, tag='wall') |
| 91 | |
| 92 | # Generate and write mesh to file |
| 93 | mesh.generate_mesh(maximum_triangle_area=max_area) |
| 94 | mesh.export_mesh_file(mesh_filename) |
| 95 | }}} |
| 96 | |
| 97 | Note that a mesh object is returned from \{{{create_mesh_from_regions}}} |
| 98 | when file name is omitted. |