Skip to content

aperiodic/pds-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDS Tools

This is a C shared library that parses the labels of NASA Planetary Data Science (PDS) files into structs with hashmap access to metadata and embedded objects. Labels only - metadata, but no data yet. The eventual goal of this project is to provide low-overhead conversion of PDS data files into 3D coordinates, but the label parsing is a necessary first step. It also has Java Native Interface bindings.

The library is currently only distributed via git. Its only dependency, Christopher Clark's hashtable library, is checked in to the lib folder, so it can be compiled as long as you have a C compiler and runtime.

This project is still quite new and hasn't been extensively tested on extant PDS files. If you find a PDS label that doesn't parse correctly, or causes errors, please open an issue about it, email me, or tweet @aperiodic.

Usage - C Tool

To get started:

git clone https://github.com/aperiodic/pds-tools

cd pds-tools
make run

The default make target produces a shared library named libpdstools.so in the bin folder. The demo target produces bin/pds-parse-demo, and can be run on an included PDS label by executing the run target with make run.

Usage - Java Bindings

The Java bindings live in bindings/java.

cd bindings/java
make && make run label=../../samples/mola.lbl

The make command for the Java bindings produces two things:

  • a libpdstools.so native shared library that will need to be in your java.library.path.
  • a PDSTools.jar JAR that contains a Java wrapper around the native library. You may want to look at the definition of the run target in the Java bindings' Makefile for how exactly to run a simple demo of the Java bindings.

That demo also serves as documentation on the Java bindings. The bindings/java/org/aperiodic/PDSTools.java file contains a main method that parses a PDS label file, then prints its version, metadata, and embedded objects (and their attributes).

Debugging

The debug make target can be used to turn on print statements emitted during parsing that can be helpful when debugging errors.

make debug && ./build/pds-parse samples/mola.lbl

License & Copyright

Copyright © Dan Lidral-Porter 2014.

This library's source and its bindings are licensed under the GPLv3 (see COPYING). The included hash table library from Christopher Clark is included in lib under the terms of the MIT License; the GPLv3 license that applies to the rest of this repository does not include the contents of the lib directory.

About

Parse Planetary Data Science (PDS) label files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages