Footprint Library
Overview
The Java footprint library supports the creation of footprint overlays composed of
STC shapes embedded in a SIA or SSA query response VOTable document. The footprints are attached in additional RESOURCE elements
see DAL Extension 2005. The screenshots on this page illustrate its use for quicklook and archive browsing purposes. Another use case is the creation of complex, stand-alone footprints as required in the context of proposal preparation for the Hubble Space Telescope at STScI, Baltimore. See also the
Footprint Overlay Specification.
Download the library and documentation
Unzip and untar the file to access the javadoc and JAR file. To access test files, unpack the JAR file.
How to use the library
Using SAVOT
SavotWriter docXML = new SavotWriter();
// Define instrument shape
ArrayList coords = new ArrayList();
coords.add(new Coordinates(-60,30,Unit.deg));
coords.add(new Coordinates(60,30,Unit.deg));
coords.add(new Coordinates(60,-30,Unit.deg));
coords.add(new Coordinates(-60,-30,Unit.deg));
Shape poly = new Polygon(null,"ESO survey",coords);
// and a reference frame
ReferenceFrame frame = ReferenceFrame.createCartesianFrame(new Coordinates(0,0,Unit.deg),new Angle(0,Unit.deg),Cartesian.Projection.AIT);
// Apply the instrument shape on the reference frame
frame.addGeometry(poly);
// Define the geometry resource
GeometryResource geom = new GeometryResource("CoveragePlane",null);
// Add instrument to the geometry resource.
geom.addInstru(null,null,"Survey Coverage",frame);
// Build the footprint document
FootprintDocument doc = new FootprintDocument(geom,null);
ResourceSet ress = new ResourceSet();
// Add the footprint resources into the resourceSet
doc.toXML(ress);
SavotVOTable vot = new SavotVOTable();
vot.setResources(ress);
docXML.generateDocument(vot);
without SAVOT
// Define instrument shape
ArrayList coords = new ArrayList();
coords.add(new Coordinates(-60,30,Unit.deg));
coords.add(new Coordinates(-60,60,Unit.deg));
coords.add(new Coordinates(0,60,Unit.deg));
coords.add(new Coordinates(0,30,Unit.deg));
Shape poly = new Polygon(null,"ESO survey",coords);
// and a reference frame
ReferenceFrame frame = ReferenceFrame.createCartesianFrame(new Coordinates(0,0,Unit.deg),new Angle(0,Unit.deg),Cartesian.Projection.AIT);
// Apply the instrument shape on the reference frame
frame.addGeometry(poly);
// Define the geometry resource
GeometryResource geom = new GeometryResource("CoveragePlane",null);
// Add instrument at the geometry resource.
geom.addInstru(null,null,null,"Survey Coverage",frame);
// Build the footprint document
FootprintDocument doc = new FootprintDocument(geom,null);
//Display the footprint resources.
System.out.println(doc.toXML());
Results
Once created the VOTable using footprint resources, a software can parse it and display it:
--
JeanMalapert - 05 Oct 2007