We've had a problem loading an ERDC-generated shp file for quite awhile now. The problem occurs somewhere in vtkCMBGeometry2DReader, which is now part of SMTK. I (john T) can provide the input files (cropped_polys.dbf, .prj, .shp, .shx) to anyone interested in working the issue; the basic symptom is that, after maybe 1 minute of processing, ModelViewer seg faults after a series of error messages:
Generic Warning: In /media/ssd/sim/cmb_core/gitlab/cmb/ThirdParty/SMTK/smtk/bridge/discrete/extension/meshing/cmbFaceMesherInterface.cxx, line 375 Failed to build a face mesh.
Following is a summary of the processing observed in the vtkCMBGeometry2DReader::RequestData() internal pipeline. I modified the code to write out various vtp files that capture the interim steps.
These results were obtained from a cmb:master build on 18-Dec-2015. Its SMTK submodule is at commit dc837125 (Fri Dec 11, 2015). The platform is Ubuntu 14.04 (gcc 4.8.4).
1. The input file is parsed by vtkGDALVectorReader, and the output vtkPolyData is saved to /tmp/gdal.vtp. The polydata has 5054 points and 73 polyline cells, which seem to correctly represent the input data. Here's a snapshot from Paraview:
2. The next pipeline stage is vtkSplitPlanarLines. Its output polydata is saved to splitLines.vtp. The polydata has 5067 points and 5734 line cells, which again seems to correctly reflect the input data. This stage adds an integer vtkPedigreesId to the cell data; the values in that array are numbered between 0 and 72, which seems consistent with the input.
3. The next stage is vtkDiscoverRegions, which generates a second output polydata that is saved to regionPoints.vtp. This polydata has 33 points with a point data array "Region". My current hunch is that this processing is hosed, since I would expect this stage to output 73 points, one for each polyline in the input data. (But some of the comments in this class imply that it works on 3D input, so perhaps "regions" are actually volume entities?)
4. The next stage is vtkRegionsToLoops. Its output polydata is saved to regionsToLoops.vtp. This polydata has the same 5067 points plus 3 vtkFieldData arrays:
- "IsRegionAHole" has 636 Int32 values, all set to 0.
- "RegionGroupMemberShip" has 636 Int64 values, all set to -1
- "ModelFaceRegionsMap" has 5734 Int64x3 tuples, of various values
This stage also constructs a vtkTable that is written out to splitLinesContainment.vtk. That table is very short:
# vtk DataFile Version 4.0 vtk output ASCII DATASET TABLE ROW_DATA 3 FIELD FieldData 6 ContainedShellIds 1 3 vtkIdType 465 356 356 ContainedShellCells 1 3 vtkIdType 3934 5039 5099 ContainedShellSense 1 3 int 1 1 1 ContainerShellIds 1 3 vtkIdType 465 356 356 ContainerShellCells 1 3 vtkIdType 3876 2606 828 ContainerShellSense 1 3 int 1 1 1