Suppose that $W\subset \mathbb{R}^n$ is open and I want to compute its $n$-dimensional Lebesgue measure $\mathcal{L}^n$. Then by the coarea formula it holds that $$\mathcal{L}^n(W)=\int_{\mathbb{R}^n\cap W}1\,d\mathcal{L}^n=\int_0^{\infty}\int_{S^{n-1}_r\cap W}1\, d\mathcal{H}^{n-1}\,dr $$ where $S^{n-1}_r:=\left\{x\in \mathbb{R}^n:|x|=r\right\}$. I am looking for an analogous formula when $W\subset \mathbb{R}^n$ is a subset with Hausdorff dimension $n-1$. Then, one might be tempted to write $$ \mathcal{H}^{n-1}(W)=\int_{\mathbb{R}^n\cap W}1\,d\mathcal{H}^{n-1}=\int_0^{\infty}{\color{red}{\int_{S_r^{n-1}\cap W}1\, d\mathcal{H}^{n-2}}}\,dr$$ However the formula is not quite right. For instance if $W$ is a circle (say $n=2$) centred in the origin, then the integral in red is equal to zero a.e., and hence we would get $\mathcal{H}^{n-1}(W)=0$, which is false. Instead, if $W$ is a line through the origin, the formula yields the correct value, since the integral in red (notice that $\mathcal{H}^{n-2}$ is the counting measure) is equal to $2$ for all $r\in (0,+\infty)$.
At the same time, one might as well write $$\mathcal{H}^{n-1}(W)=\int_{S^{n-1}}\color{blue}{\#\left\{tw\in W:t\in (-\infty,+\infty)\right\}}\,d\mathcal{H}^{n-1}(w) $$ This would yield the correct measure in the case of the circle (since the number in blue is equal to $1$ for all $w\in S^{n-1}$). On the other hand, if $W$ is a line through the origin, then the number in blue is equal to zero a.e., so the formula is incorrect.
What I am thinking is that $\mathcal{H}^{n-1}(W)$ must always be smaller than the sum of the two quantities above, since the circle and the line (or subsets thereof with the same Hausdorff dimension) are the only 'pathological' cases where the intersection of the sphere (resp. the line) with $W$ does not have the expected dimension ($n-2$ and $0$, respectively), which messes up the calculation. Does that make sense? If so, any reference?