Metadata

Many metadata standards exist, including Dublin core, ISO 19115 and the Image I/O metadata defined in the javax.imageio.metadata package. Apache SIS uses the ISO 19115 series of standards as the pivotal metadata structure, and converts other metadata structures to ISO 19115 when needed. The ISO 19115 standard defines hundreds of metadata elements, but the following table gives an overview with a few of them. Note that most of the nodes accept an arbitrary number of values. For example the extent node may contain many geographic areas.

Extract of a few metadata elements from ISO 19115
Element Description
Metadata Metadata about a dataset, service or other resources.
  ├─Reference system info Description of the spatial and temporal reference systems used in the dataset.
  ├─Identification info Basic information about the resource(s) to which the metadata applies.
  │   ├─Citation Name by which the cited resource is known, reference dates, presentation form, etc.
  │   │   └─Cited responsible party Role, name, contact and position information for individuals or organizations that are responsible for the resource.
  │   ├─Topic category Main theme(s) of the resource (e.g. farming, climatology, environment, economy, health, transportation, etc.).
  │   ├─Descriptive keywords Category keywords, their type, and reference source.
  │   ├─Spatial resolution Factor which provides a general understanding of the density of spatial data in the resource.
  │   ├─Temporal resolution Smallest resolvable temporal period in a resource.
  │   ├─Extent Spatial and temporal extent of the resource.
  │   ├─Resource format Description of the format of the resource(s).
  │   ├─Resource maintenance Information about the frequency of resource updates, and the scope of those updates.
  │   └─Resource constraints Information about constraints (legal or security) which apply to the resource(s).
  ├─Content info Information about the feature catalog and describes the coverage and image data characteristics.
  │   ├─Imaging condition Conditions which affected the image (e.g. blurred image, fog, semi darkness, etc.).
  │   ├─Cloud cover percentage Area of the dataset obscured by clouds, expressed as a percentage of the spatial extent.
  │   └─Attribute group Information on attribute groups of the resource.
  │       ├─Content type Types of information represented by the values (e.g. thematic classification, physical measurement, etc.).
  │       └─Attribute Information on an attribute of the resource.
  │           ├─Sequence identifier Unique name or number that identifies attributes included in the coverage.
  │           ├─Peak response Wavelength at which the response is the highest.
  │           ├─Min/max value Minimum/maximum value of data values in each sample dimension included in the resource.
  │           ├─Units Units of data in each dimension included in the resource.
  │           └─Transfer function type Type of transfer function to be used when scaling a physical value for a given element.
  ├─Distribution info Information about the distributor of and options for obtaining the resource(s).
  │   ├─Distribution format Description of the format of the data to be distributed.
  │   └─Transfer options Technical means and media by which a resource is obtained from the distributor.
  ├─Data quality info Overall assessment of quality of a resource(s).
  ├─Acquisition information Information about the acquisition of the data.
  │   ├─Environmental conditions Record of the environmental circumstances during the data acquisition.
  │   └─Platform General information about the platform from which the data were taken.
  │       └─Instrument Instrument(s) mounted on a platform.
  └─Resource lineage Information about the provenance, sources and/or the production processes applied to the resource.
      ├─Source Information about the source data used in creating the data specified by the scope.
      └─Process step Information about events in the life of a resource specified by the scope.

The ISO 19115 standard is reified by the GeoAPI interfaces defined in the org.opengis.metadata package and sub-packages. For each interface, the collection of declared getter methods defines its properties (or attributes). The implementation classes are defined in the org.apache.sis.metadata.iso package and sub-packages. The sub-packages hierarchy is the same as GeoAPI, and the names of implementation classes are the name of the GeoAPI interfaces prefixed with Abstract or Default. In this context, the Abstract prefix means that the class is abstract in the sense of the implemented standard. It it not necessarily abstract in the sense of Java. Because incomplete metadata are common in practice, sometimes an "abstract" class may be instantiated because of the lack of knowledge about the exact sub-type. A metadata instance (abstract or not) may also have missing values for properties considered as mandatory. The latter case is handled by nil reasons.

A metadata may be created programmatically like below:

import org.apache.sis.metadata.iso.citation.DefaultCitation;
import org.opengis.metadata.citation.PresentationForm;

void main() {
    // Convenience constructor setting the "title" property to the given value.
    var citation = new DefaultCitation("Map of Antarctica");
    citation.getPresentationForms().add(PresentationForm.DOCUMENT_HARDCOPY);

    // The following code prints "Map of Antarctica".
    System.out.println(citation.getTitle());
}

But more often, metadata are obtained by parsing an XML document conforms to the ISO 19115-3 schema:

import org.apache.sis.xml.XML;
import org.opengis.metadata.Metadata;
import jakarta.xml.bind.JAXBException;

void main() throws JAXBException {
    var metadata = (Metadata) XML.unmarshal(Path.of("Map of Antarctica.xml"));
}

Metadata objects in Apache SIS are mostly containers: they provide getter and setter methods for manipulating the values associated to properties (for example the title property of a Citation object), but otherwise does not process the values. Exceptions to this rule are deprecated properties, which are not stored but rather redirected to their replacements.