Skip to content

Commit

Permalink
Don't attempt to transform polygon SRS if if doesn't have one. (#3277)
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Oct 29, 2020
1 parent ad31669 commit d76da36
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions io/EptReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,12 @@ void EptReader::initialize()
{
if (!poly.valid())
throwError("Geometrically invalid polyon in option 'polygon'.");
auto ok = poly.transform(getSpatialReference());
if (!ok)
throwError(ok.what());
if (poly.srsValid())
{
auto ok = poly.transform(getSpatialReference());
if (!ok)
throwError(ok.what());
}
std::vector<Polygon> polys = poly.polygons();
exploded.insert(exploded.end(),
std::make_move_iterator(polys.begin()),
Expand Down

0 comments on commit d76da36

Please sign in to comment.