Merge branch 'master' into custom-variant-2
This commit is contained in:
commit
1d02eb0d1d
1 changed files with 7 additions and 1 deletions
|
@ -261,7 +261,13 @@ void ogr_datasource::init(mapnik::parameters const& params)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OGREnvelope envelope;
|
OGREnvelope envelope;
|
||||||
layer->GetExtent(&envelope);
|
OGRErr e = layer->GetExtent(&envelope);
|
||||||
|
if (e == OGRERR_FAILURE)
|
||||||
|
{
|
||||||
|
std::ostringstream s;
|
||||||
|
s << "OGR Plugin: Extent missing for layer '" << layer->GetName() << "'. Use <extent> paramater to define a custom extent value.";
|
||||||
|
throw datasource_exception(s.str());
|
||||||
|
}
|
||||||
extent_.init(envelope.MinX, envelope.MinY, envelope.MaxX, envelope.MaxY);
|
extent_.init(envelope.MinX, envelope.MinY, envelope.MaxX, envelope.MaxY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue