Author Notes
Ideas for future research including adding support for different distance functions including “Boundary”, corresponding to minimum distance between any points in regions, and “SignedBoundary”, corresponding to distance to boundary, negative for interior points. I think “Center” is used by default, which corresponds to distance between centers of regions. I tried using RegionDistance which as of 13.3 supports region1 and region2, not just a region and a point, but the problem was what function it was using to compute the distance. I think it was using the geodesic distance over the ellipsoid. The problem was that it differed slightly from GeoDistance for some reason.
GeoDistance[,,DistanceFunction→"Boundary"] () should be equivalent to Quantity[RegionDistance[Region[["Polygon"]],Region[["Polygon"]]],"Meters"] (). The difference is . To make this work, I would need to first figure out why there is a difference here. Then I would need indicate to RegionDistance I am using not the geodesic distance but the loxodromic distance. The function SignedRegionDistance could be used for the option "SignedBoundary" once it supports two regions, and not just a region and a point. SignedRegionDistanceis effectivelyMinValue[{Norm[p-q],q∈reg},q∈reg]whenpis not inregand-MinValue[{Norm[p-q],q∉reg},q]otherwise. This could be used to compute the signed region distance while I wait for support for two regions to be introduced, but there's still the bug and the problem of using a loxodrome and not a geodesic. An example of where this could be useful is GeoDistance[,] () and GeoDistance[,,DistanceFunction→"SignedBoundary"] ().