Hi,
In principle that is just the likelihood of a non-homogeneous Poisson process.
However, this involves the integral of the density exp(Xs) over the spatial region, where Xs is the GMRF,
which will break the sparsity of the Hessian in the Laplace approximation.
TMB is not efficient for such models.
Instead one has to discretize the spatial region in some way. I assume this is the basis
for implementation of log-Gaussian Cox Processes in INLA:
Janine B. Illian. Sigrunn H. Sørbye. Håvard Rue. "A toolbox for fitting complex spatial point process models using integrated nested Laplace approximation (INLA)." Ann. Appl. Stat. 6 (4) 1499 - 1530, December 2012.
https://doi.org/10.1214/11-AOAS530
I am not aware of any TMB code for this.
Hans