Spatial

class pyvo.registry.Spatial(geom_spec, order=6)[source]

Bases: pyvo.registry.rtcons.Constraint

A RegTAP constraint selecting resources covering a geometry in space.

This is a RegTAP 1.2 extension not yet available on all Registries (in 2022). Also note that not all data providers give spatial coverage for their resources.

To find resources having data for RA/Dec 347.38/8.6772:

>>> registry.Spatial((347.38, 8.6772))

To find resources claiming to have data for a spherical circle 2 degrees around that point:

>>> registry.Spatial(347.38, 8.6772, 2))

To find resources claiming to have data for a polygon described by the vertices (23, -40), (26, -39), (25, -43) in ICRS RA/Dec:

>>> registry.Spatial([23, -40, 26, -39, 25, -43])

To find resources claiming to cover a MOC, pass an ASCII MOC:

>>> registry.Spatial("0/1-3 3/")
Parameters
geom_specobject

For now, this is DALI-style: a 2-sequence is interpreted as a DALI point, a 3-sequence as a DALI circle, a 2n sequence as a DALI polygon. Additionally, strings are interpreted as ASCII MOCs. Other types (proper geometries or pymoc objects) might be supported in the future.

orderint, optional

Non-MOC geometries are converted to MOCs before comparing them to the resource coverage. By default, this contrains uses order 6, which corresponds to about a degree of resolution and is what RegTAP recommends as a sane default for the order actually used for the coverages in the database.

Attributes Summary

takes_sequence

Attributes Documentation

takes_sequence = True