Skip to content

Commit 278ea56

Browse files
committed
Fix issue with boundary entries layering
1 parent 6b01a58 commit 278ea56

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Plugin/CityJSONReader/vtkMyCityJSONFeature.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
#include "vtkMyCityJSONFeature.h"
22

33
// VTK Includes
4-
#include "vtkAbstractArray.h"
5-
#include "vtkBitArray.h"
64
#include "vtkCellArray.h"
75
#include "vtkCellData.h"
86
#include "vtkDoubleArray.h"
9-
#include "vtkIntArray.h"
107
#include "vtkLine.h"
118
#include "vtkNew.h"
129
#include "vtkObjectFactory.h"
1310
#include "vtkPoints.h"
1411
#include "vtkPolyData.h"
1512
#include "vtkPolyLine.h"
1613
#include "vtkPolygon.h"
17-
#include "vtkStringArray.h"
1814

1915
#include <sstream>
2016
#include <string>
@@ -51,6 +47,11 @@ vtkPolyData *vtkMyCityJSONFeature::ConnectTheDots(const Json::Value &cityObject,
5147
for (Json::Value element : boundary) {
5248
for (Json::Value vertices : element) {
5349

50+
// Sometimes vertices is a layer shallower than other times, so go back a layer in that case
51+
if (vertices.isInt()) {
52+
vertices = element;
53+
}
54+
5455
vtkCellArray *polys = outputData->GetPolys();
5556
vtkNew<vtkPolygon> poly;
5657
vtkIdList *polyPointIds = poly->GetPointIds();

0 commit comments

Comments
 (0)