CONTAINSPOINTICRSgeom
CONTAINSPOINTICRSgeom is a spatial query function that determines whether a given point lies within a specified geometry in an arbitrary International Celestial Reference System (ICRS). It is typically used in astronomical data processing libraries that provide support for celestial coordinate transformations and geometric operations. The function accepts a point defined by its right ascension and declination (or equivalently, cartesian coordinates in the ICRS) and a geometry object, which may be a polygon, polyhedron, or other closed shape described in the same coordinate system. Internally, the function projects both the point and the geometry onto a common plane or makes use of spherical geometry algorithms to accurately compute containment on the celestial sphere. The result is a boolean value or a numeric count indicating whether the point lies inside the geometry’s boundary. Because the ICRS is a fixed reference frame, CONTAINSPOINTICRSgeom can be reliably used to compare data sets from different surveys or instruments without requiring a coordinate system transformation. The function is part of several open-source astronomy toolkits, including the Astropy spatial module, and is frequently employed in tasks such as cross‑matching astronomical catalogs, defining region masks for source extraction, and verifying source positional consistency across observations.