Returns the bounds of all geometry columns in the layer using any approach that proves
to be faster than the plain bounds aggregation
(e.g., better than the "plain select extent(geom) from table" on PostGIS),
or null if none exists or the fast method has not been enabled (e.g., if the fast method is
just an estimate of the bounds you probably want the user to enable it manually)

The implementation might just use CRS.decode("EPSG:" + srid), but most spatial databases will have
their own SRS database that can be queried as well.

As a rule of thumb you should override this method if your spatial database uses codes that are
not part of the EPSG standard database, of if for some reason you deem it preferable to use
your database definition instead of an official EPSG one.

Most overrides will try out to decode the official EPSG code first, and fall back on
the custom database definition otherwise

getOptimizedBounds

Returns the bounds of all geometry columns in the layer using any approach that proves
to be faster than the plain bounds aggregation
(e.g., better than the "plain select extent(geom) from table" on PostGIS),
or null if none exists or the fast method has not been enabled (e.g., if the fast method is
just an estimate of the bounds you probably want the user to enable it manually)