The magnetic-field-dependent critical current ${I}_{\text{c}}(B)$ of a Josephson junction is determined by the screening currents in its electrodes. In macroscopic junctions, a local vector potential drives the currents; however, in thin-film planar junctions, with electrodes of finite size and various shapes, they are governed by nonlocal electrodynamics. This complicates the extraction of parameters such as the geometry of the effective junction area, the effective junction length, and the critical current density distribution from the ${I}_{\text{c}}(B)$ interference patterns. Here, we provide a method to tackle this problem by simulating the phase differences that drive the shielding currents and use those to find ${I}_{\text{c}}(B)$. To this end, we extend the technique proposed by Clem [Phys. Rev. B 81, 144515 (2010)] to find ${I}_{\text{c}}(B)$ for Josephson junctions separating a superconducting strip of length $L$ and width $W$ with rectangular, ellipsoid, and rhomboid geometries. We find the periodicity of the interference pattern ($\mathrm{\ensuremath{\Delta}}B$) to have geometry-independent limits for $L\ensuremath{\gg}W$ and $L\ensuremath{\ll}W$. By fabricating elliptically shaped superconductor--normal-metal--superconductor junctions with various aspect ratios, we experimentally verify the $L/W$ dependence of $\mathrm{\ensuremath{\Delta}}B$. Finally, we incorporate these results to correctly extract the distribution of critical currents in the junction by the Fourier analysis of ${I}_{\text{c}}(B)$, which makes these results essential for the correct analysis of topological channels in thin-film planar Josephson junctions.