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:

stellarium-003.jpg

stellarium-query.jpg

-- JeanMalapert - 05 Oct 2007

Topic attachments
I Attachment Action Size Date Who Comment
ziptgz Footprint.tgz manage 304.8 K 2007-12-19 - 17:20 JeanMalapert  
jpgjpg stellarium-003.jpg manage 159.9 K 2007-10-05 - 09:42 JeanMalapert  
jpgjpg stellarium-query.jpg manage 93.9 K 2007-10-05 - 14:22 JeanMalapert  
Topic revision: r7 - 2008-10-09 - 19:44:30 - BrunoRino
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback