function encodeGeometryLayout(geom) {
  const layout = geom.getLayout();
  let dimInfo = '';
  if (layout === 'XYZ' || layout === 'XYZM') {
    dimInfo += Z;
  }
  if (layout === 'XYM' || layout === 'XYZM') {
    dimInfo += M;
  }
  return dimInfo;
}
@param {import("../geom/SimpleGeometry.js").default} geom SimpleGeometry geometry.
@return {string} Potential dimensional information for WKT type.