Class UrlMocCoverage
java.lang.Object
uk.ac.starlink.ttools.cone.MocCoverage
uk.ac.starlink.ttools.cone.UrlMocCoverage
- All Implemented Interfaces:
Coverage
MOC coverage implementation which reads a MOC from a given URL.
MOCs are cached by URL, so the same one won't be read twice.
Note: MOCs are cached indefinitely per service, beware that this constitutes a potential memory leak. Some smarter caching scheme may be introduced if this causes problems.
- Since:
- 9 Jun 2014
- Author:
- Mark Taylor
-
Nested Class Summary
Nested classes/interfaces inherited from interface Coverage
Coverage.Amount -
Field Summary
FieldsFields inherited from class MocCoverage
DFLT_HPI -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected cds.moc.SMocConstructs the MOC which will define this object's coverage.static UrlMocCoveragegetServiceMoc(URL serviceUrl, int nside) Returns an instance which gives coverage for a data service with a given access URL.static UrlMocCoveragegetVizierMoc(String vizierId, int nside) Returns an instance which gives coverage for a named Vizier table.Methods inherited from class MocCoverage
discOverlaps, getAmount, getMoc, initCoverage
-
Field Details
-
FOOT_SERVICE_URL
-
-
Constructor Details
-
UrlMocCoverage
-
-
Method Details
-
createMoc
Description copied from class:MocCoverageConstructs the MOC which will define this object's coverage. This method, which may be time-consuming, will be called a maximum of once by theMocCoverage.initCoverage()method ofMocCoverage, and should not be called by anyone else.- Specified by:
createMocin classMocCoverage- Returns:
- new MOC defining footprint, or null
- Throws:
IOException
-
getServiceMoc
Returns an instance which gives coverage for a data service with a given access URL. This queries the CDS service for MOCs, which at time of writing has information for all the various VizieR cone search services, plus a few other registered cone search services (UKIDSS etc).- Parameters:
serviceUrl- URL of cone search servicenside- requiested HEALPix nside for MOC, or -1 for default
-
getVizierMoc
Returns an instance which gives coverage for a named Vizier table. The name may be a vizier table name (like "V/139/sdss9") or alias as used by the CDS Xmatch service (like "SDSS DR9").- Parameters:
vizierId- vizier table name or aliasnside- requiested HEALPix nside for MOC, or -1 for default
-