mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
raster.input - attempt getting bounding box from image_reader
This commit is contained in:
parent
74c96f0bda
commit
1dfad4b10b
@ -84,6 +84,16 @@ raster_datasource::raster_datasource(parameters const& params)
|
||||
{
|
||||
extent_initialized_ = extent_.from_string(*ext);
|
||||
}
|
||||
else //bounding box from image_reader
|
||||
{
|
||||
std::unique_ptr<image_reader> reader(mapnik::get_image_reader(*file));
|
||||
auto bbox = reader->bounding_box();
|
||||
if (bbox)
|
||||
{
|
||||
extent_ = *bbox;
|
||||
extent_initialized_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (! extent_initialized_)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user