FeatureJson#writeFeatureCollection queries bounds even when it does not need them

Description

The following code is from FeatureJson#writeFeatureCollection:

The bounds are retrieved even encodeFeatureCollectionBounds is false.
This can be a very costly operation and should not be executed when the caller does not need the information.
If this is accepted i can open a pull-request containing the changes.

Environment

None

Status

Assignee

Unassigned

Reporter

StefanM

Triage

None

Components

Affects versions

14.3
15-RC1

Priority

High
Configure