 * @param        @description
 * co_id         identifier for city object group
 * set_envelope  if 1 (default = 0) the envelope column is updated
+* calc_member_envelopes if 1 (default) the envelope of group 
+*               members is calculated otherwise it is taken from
+*               the ENVELOPE column
 * schema_name   name of schema
 *
 * @return

  query TEXT;
  envelope GEOMETRY;
BEGIN
  IF get_member_envelopes <> 0 THEN
    EXECUTE format(
      'WITH collect_geom AS (
         -- cityobjectgroup geometry

CREATE OR REPLACE FUNCTION citydb_pkg.get_envelope_cityobjectgroup(
  co_id INTEGER, 
  set_envelope INTEGER DEFAULT 0,
  calc_member_envelopes INTEGER DEFAULT 1,
  schema_name VARCHAR DEFAULT 'citydb'
  ) RETURNS GEOMETRY AS
$$
