Skip to content

Commit

Permalink
Merge branch 'master' into refactor_geometries
Browse files Browse the repository at this point in the history
  • Loading branch information
systemed committed Nov 5, 2023
2 parents 4db8c25 + fcec727 commit 06b68df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/read_shp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ void readShapefile(const Box &clippingBox,
if (shapeBox.min_corner().get<0>() > clippingBox.max_corner().get<0>() ||
shapeBox.max_corner().get<0>() < clippingBox.min_corner().get<0>() ||
shapeBox.min_corner().get<1>() > clippingBox.max_corner().get<1>() ||
shapeBox.max_corner().get<1>() < clippingBox.min_corner().get<1>()) { continue; }
shapeBox.max_corner().get<1>() < clippingBox.min_corner().get<1>()) {
SHPDestroyObject(shape);
continue;
}

if (shapeType==1) {
// Points
Expand Down Expand Up @@ -265,6 +268,7 @@ void readShapefile(const Box &clippingBox,
// Not supported
cerr << "Shapefile entity #" << i << " type " << shapeType << " not supported" << endl;
}
SHPDestroyObject(shape);
}

SHPClose(shp);
Expand Down

0 comments on commit 06b68df

Please sign in to comment.