Use 2D box for pgraster bounding box

Using a 3D box causes errors with postgis 2.3 when clipping is
enabled as ST_Clip throws an error clipping a raster to a 3D box.
This commit is contained in:
Tom Hughes 2016-11-17 15:27:48 +00:00
parent 8adc190117
commit a3106a6a6e

View file

@ -627,10 +627,10 @@ std::string pgraster_datasource::sql_bbox(box2d<double> const& env) const
b << "ST_SetSRID(";
}
b << "'BOX3D(";
b << "'BOX(";
b << std::setprecision(16);
b << env.minx() << " " << env.miny() << ",";
b << env.maxx() << " " << env.maxy() << ")'::box3d";
b << env.maxx() << " " << env.maxy() << ")'::box2d";
if (srid_ > 0)
{