Skip to content

Commit

Permalink
support MULTIPOLYGON filters in readers.ept
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Sep 24, 2019
1 parent 2055497 commit 3f6e0da
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions io/EptReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,26 @@ void EptReader::initialize()
boundsSrs.getWKT(), getSpatialReference().getWKT());

// Transform polygons and bounds to point source SRS.
std::vector <Polygon> exploded;
for (Polygon& poly : m_args->m_polys)
{
if (!poly.valid())
throwError("Geometrically invalid polyon in option 'polygon'.");
poly.transform(getSpatialReference());

std::vector<Polygon> polys = poly.polygons();
if (polys.size())
for (auto p: polys)
{
exploded.emplace_back(p);
}
}

if (exploded.size())
m_args->m_polys.clear();
for (auto p: exploded)
m_args->m_polys.emplace_back(p);

try
{
handleOriginQuery();
Expand Down

0 comments on commit 3f6e0da

Please sign in to comment.