diff --git a/plugins/input/pgraster/pgraster_datasource.cpp b/plugins/input/pgraster/pgraster_datasource.cpp index e4fc32284..bbd95d412 100644 --- a/plugins/input/pgraster/pgraster_datasource.cpp +++ b/plugins/input/pgraster/pgraster_datasource.cpp @@ -624,12 +624,8 @@ std::string pgraster_datasource::sql_bbox(box2d const& env) const b << "ST_MakeEnvelope("; b << std::setprecision(16); b << env.minx() << "," << env.miny() << ","; - b << env.maxx() << "," << env.maxy(); - if (srid_ > 0) - { - b << ", " << srid_; - } - b << ")"; + b << env.maxx() << "," << env.maxy() << ","; + b << srid_ << ")"; return b.str(); } diff --git a/plugins/input/postgis/postgis_datasource.cpp b/plugins/input/postgis/postgis_datasource.cpp index 24e5c51df..97d494f0d 100644 --- a/plugins/input/postgis/postgis_datasource.cpp +++ b/plugins/input/postgis/postgis_datasource.cpp @@ -516,12 +516,8 @@ std::string postgis_datasource::sql_bbox(box2d const& env) const b << "ST_MakeEnvelope("; b << std::setprecision(16); b << env.minx() << "," << env.miny() << ","; - b << env.maxx() << "," << env.maxy(); - if (srid_ > 0) - { - b << ", " << srid_; - } - b << ")"; + b << env.maxx() << "," << env.maxy() << ","; + b << srid_ << ")"; return b.str(); }