I have two different WGS84 coordinates, A and B. A is just a (lat,lon,z) point and B is a (lat,lon,z) point inside the center of a box with the dimension height, width, depth (in meters).
I need to calculate the distance from A to the box, not to the center of the box but to the closest side/surface of the box. Any ideas?
I already have a method to calculate between two coordinates ((lat,lon) to (lat,lon)).
Currently using PostGIS, but open to suggestions for other software.