A PointInPolyhedronResult with the test result
import { isCoordsInPolyhedron } from '@wendylabsinc/react-three-map/maplibre';
const origin = { latitude: 51.5074, longitude: -0.1278, altitude: 0 };
const testPoint = { latitude: 51.5080, longitude: -0.1270, altitude: 25 };
const result = isCoordsInPolyhedron(testPoint, geofenceGeometry, origin);
if (result.inside) {
console.log('Point is inside the geofence');
}
Tests whether a geographic coordinate is inside a geo-polyhedron.
This is the geographic version of isPointInPolyhedron, accepting coordinates in latitude/longitude/altitude format.