docs: public void postConstruct() {
          Assert.isTrue(this.spacing == null || this.spacing.length == 2,
                        GridLayer.class.getSimpleName() +
                                ".spacing has the wrong number of elements.  Expected 2 (x,y) but was: " +
                                Arrays.toString(this.spacing));
          Assert.isTrue(this.numberOfLines == null || this.numberOfLines.length == 2,
                        GridLayer.class.getSimpleName() +
                                ".numberOfLines has the wrong number of elements.  Expected 2 (x,y) but was: " +
                                Arrays.toString(this.numberOfLines));
          Assert.isTrue(this.pointsInLine > 2,
                        "There must be at least 2 points in a line.  There were: " + this.pointsInLine);
          Assert.isTrue(this.indent >= 0, "The indent is not permitted to be negative: " + this.indent);
          Assert.isTrue(this.labelColor != null, "labelColor should not be null");
          Assert.isTrue(this.haloColor != null, "haloColor should not be null");
          Assert.isTrue(this.font != null, "font should not be null");
  
          try {
              if (this.labelProjection != null) {
                  if (this.longitudeFirst != null) {
                      this.labelCRS = CRS.decode(this.labelProjection, this.longitudeFirst);
                  } else {
                      this.labelCRS = CRS.decode(this.labelProjection);
                  }
              }
          } catch (FactoryException e) {
              throw new IllegalArgumentException("The projection code: " + this.labelProjection +
                                                         " is not valid. Error message when parsing code: " +
                                                         e.getMessage());
          }
          if (this.labelFormat != null || this.valueFormat != null || this.unitFormat != null) {
              GridLabelFormat format = GridLabelFormat.fromConfig(this);
              if (format == null) {
                  throw new IllegalArgumentException("`labelFormat` or `valueFormat` must be set");
              }
              try {
                  format.format(2.0, "m");
              } catch (IllegalFormatException e) {
                  throw new IllegalArgumentException("Invalid label format");
              }
              this.gridLabelFormat = format;
          }
      }