|
|
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, a model is created that is empty (no entities). 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 dc83712 (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 72 polyline cells, which seem to correctly represent the input data. Here's a snapshot from Paraview:
|
|
|
|
|
|
![gdal](/uploads/f63f2dfa1517fb60f252371c879052f8/gdal.png)
|
|
|
|
|
|
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.
|
|
|
|
|
|
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 72 points, one for each polyline in the input data.
|
|
|
|
|
|
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 |
|
|
\ No newline at end of file |