formatting

This commit is contained in:
Joel Brown 2014-08-12 11:54:46 -06:00
parent e9d1ea8032
commit 106ecb2b9c
2 changed files with 18 additions and 7 deletions

View file

@ -254,16 +254,27 @@ void ogr_datasource::init(mapnik::parameters const& params)
OGRLayer* layer = layer_.layer();
// initialize envelope
boost::optional<std::string> ext = params.get<std::string>("extent");
if (ext && !ext->empty())
{
extent_.from_string(*ext);
}
else
{
OGREnvelope envelope;
layer->GetExtent(&envelope);
extent_.init(envelope.MinX, envelope.MinY, envelope.MaxX, envelope.MaxY);
}
// scan for index file